HOW TO CLONE A DATABASE IN WINDOWS IN SAME SERVER:
************************************************************
Assume Old Database Name=ORCL and New Database Name=AUX
Follow the below 7 steps:
Step 1:Create a password file.
orapwd file=$ORACLE_HOME/database/orapwaux password=pwd entries=5
Connect to orcl database and create pfile
Step 2: Create pfile='path/initaux.ora from spfile;
Step 3:Edit the pfile according to the new database path for adump,bdump,cdump and udump. If its not already there create those directories and place the path in pfile.
and we need to change the db_name=AUX and we need to include two important parameters in new init file.
db_file_name_convert= ('C:\oracle\oradata\orcl','C:\auxdir\oradata\aux')
log_file_name_convert=('C:\oracle\oradata\orcl','C:\auxdir\oradata\aux')
Step 4:Add the tnsnames.ora and listener.ora file for the new database(aux).
Below is the example for tnsentry and listener entry.
aux=
(Description=
(Address=(protocol=TCP)(HOST=santhanamuthu.in.ibm.com)(port=1521)
(connect_data=
(server=dedicated)
(server_name=aux)
)
)
Listener entry
(SID_DESC=
(GLOBAL_DBNAME=AUX)
(ORACLE_HOME=C:\oracle\product\10.2.0\db_1)
(SID_NAME=aux)
)
)
Step 5: Now we need to stop and start the listener or we need to do reload.
lsnrctl stop
lsnrctl start
Step 6:Create a service in window, use the below command:
oradim -new -sid AUX -starmode m - pfile=C:\oracle\product\10.2.0\db_1\database\initaux.ora
Step 6:In RMAN prompt give the below commands.
rman>connect auxilary sys/pwd@aux
rman>connect target sys/pwd@orcl
rman>startup clone nomount force;
instance started
rman>duplicate target database to aux;
It will take some time depend on size of the source database and we can exit once completed.
rman>exit
Now cloned database is ready;
set the environment to new aux database
rman>connect target sys/pwd;
you will get the below message
Connected to target database : AUX (DBID=157465780900)
If we want we can verify the new cloned database now.. :)
Thursday, July 22, 2010
Sunday, September 13, 2009
Grid Agent Failed to start with HTTP LISTENER failed
The agent fails to start with: Starting agent ....... failed. Failed to start HTTP listener. Consult the log files in: /u01/app/oracle/product/agent10g/sysman/log
2007-07-09 09:06:18 Thread-1 Starting Agent 10.2.0.3.0 from /u01/app/oracle/product/agent10g2007-07-09 09:06:18 Thread-1 : Startup of HTTP LISTENER failure (00716)
1. Agent crashes. As a result it is still listening on its port, rendering it unavailable. This port is defined in the/sysman/config/emd.properties file in the EMD_URL parameter.2. The agent is part of a High Availability cluster with multiple VIP's defined, and one VIP was just moved to another node, where there was an agent already running on another VIP.
SolutionCASE 1:
1. Get the Agent port number by looking at the EMD_URL parameter as defined in the/sysman/config/emd.properties file (if it's a cluster agent, look under //sysman/config)
2. Check to see if the port is still in use (usually it's 1830 or 3872):
netstat -an grep
If it is in use you will see something like the following:
tcp 0 0 0.0.0.0:3872 0.0.0.0:* LISTEN
3. If this is the case then kill off the rogue emagent processes
ps -ef grep emagent awk ' {print $2}' xargs kill -9
4. Re-start the agent
CASE 2:
This can be solved by using "ListenOnAllNICs=false" in emd.properties. This is explained in step F.2 inNote 406014.1 How to Configure Grid Control Agents to Monitor Virtual Hostname in HA environments
2007-07-09 09:06:18 Thread-1 Starting Agent 10.2.0.3.0 from /u01/app/oracle/product/agent10g2007-07-09 09:06:18 Thread-1
1. Agent crashes. As a result it is still listening on its port, rendering it unavailable. This port is defined in the
SolutionCASE 1:
1. Get the Agent port number by looking at the EMD_URL parameter as defined in the
2. Check to see if the port is still in use (usually it's 1830 or 3872):
netstat -an grep
If it is in use you will see something like the following:
tcp 0 0 0.0.0.0:3872 0.0.0.0:* LISTEN
3. If this is the case then kill off the rogue emagent processes
ps -ef grep emagent awk ' {print $2}' xargs kill -9
4. Re-start the agent
CASE 2:
This can be solved by using "ListenOnAllNICs=false" in emd.properties. This is explained in step F.2 inNote 406014.1 How to Configure Grid Control Agents to Monitor Virtual Hostname in HA environments
Subscribe to:
Posts (Atom)