Home » RDBMS Server » Backup & Recovery » RMAN error while cloning hot database.
RMAN error while cloning hot database. [message #74387] Thu, 02 December 2004 06:54 Go to next message
Natraj
Messages: 53
Registered: March 2003
Member
Hi,

i am creating a new database 9.2.0.4 on solaris by cloning a production database (hot)using RMAN.I am getting the following error.when i am executing the script.

connected to recovery catalog database

connected to target database: xxxxxx (DBID=yyyyyyyy)

connected to auxiliary database (not started)(my comments:i feel there is a problem here, i m starting the database in nomount stage but it is giving error database not started..)

executing command: SET until clause

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of allocate command at 12/01/2004 15:41:47
RMAN-06403: could not obtain a fully authorized session
RMAN-04006: error from auxiliary database: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory.the tnsnames and listener.ora are properly configured. i cannot shutdown the hot database.i have tried shutting down and restarting the target database(the database i am trying to clone.) but the error persists. I looked for solution in many sites.but didnt find the exact answer.kindly help

 
Re: RMAN error while cloning hot database. [message #74388 is a reply to message #74387] Thu, 02 December 2004 08:34 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>connected to auxiliary database (not started)(my comments:i feel there is a problem here, i m starting the database in nomount stage but it is giving error database not started..)

auxillary database should be in nomount stage before during the start of clonin process.
check that out.

>>but it is giving error database not started
check it.
make make sure you have a ORACLE_SID=target< SID > set.
Re: RMAN error while cloning hot database. [message #74389 is a reply to message #74388] Thu, 02 December 2004 09:21 Go to previous messageGo to next message
Natraj
Messages: 53
Registered: March 2003
Member
yea, the database is in nomount stage and the sid's are correct mahesh!!!
Re: RMAN error while cloning hot database. [message #74390 is a reply to message #74389] Thu, 02 December 2004 09:34 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
post your script.
There is somthing not working right!.
You aux db (db to be cloned) should be in nomount stage
prior to start of cloning.
when you issue
rman>duplicate target database to < Auxdb >
rman would try to mount the db.
and there was a mistake in my last postig..i apologize.
it is supposed to be'>>but it is giving error database make make sure you have a ORACLE_SID=AUXILLARY< SID > set.
NOT target< sid>
Re: RMAN error while cloning hot database. [message #74391 is a reply to message #74390] Thu, 02 December 2004 10:42 Go to previous messageGo to next message
Natraj
Messages: 53
Registered: March 2003
Member
Hi Mahesh,
all that is correct mahesh. i have set the SID's properly.actually i created this new database.and its in nomount stage only .i have created the orapwd files also correctly.
Re: RMAN error while cloning hot database. [message #74392 is a reply to message #74391] Thu, 02 December 2004 11:02 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
i never have any trouble with cloning. Infact we have completely automted it.
You must be missing something basic.
assuming you have set ORACLE_SID and ORACLE_HOME properly the current session i.e. inside the script! (A full ORACLE_HOME is required . NOT a linked one)

did you try to mount and open the database with RMAN ( NOt duplicate command.).
these comands would mount the aux database and open it!

RMAN> run
2> {
3> sql "alter database mount";
4> }

sql statement: alter database mount

RMAN> RUN
2> {
3> sql "alter database open";
4> }


and ofcourse i beleive you are trying to duplicate in the same machine . right?
Re: RMAN error while cloning hot database. [message #74393 is a reply to message #74392] Thu, 02 December 2004 11:11 Go to previous messageGo to next message
Natraj
Messages: 53
Registered: March 2003
Member
hi mahesh
i am duplicating on another machine.production db is one 1machine. and this db on another machine.
Re: RMAN error while cloning hot database. [message #74394 is a reply to message #74393] Thu, 02 December 2004 11:14 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
so from where are you executing this script?
It should be executed from the ANOTHERMACHINE.
MAKE tns entries in ANOTHERMACHINE to talk to database in machine.
THe ORACLE_SID=auxillyarySID is local only to ANOTHERMACHINE.
Re: RMAN error while cloning hot database. [message #74395 is a reply to message #74394] Thu, 02 December 2004 11:20 Go to previous messageGo to next message
Natraj
Messages: 53
Registered: March 2003
Member
i am executing the script from production mchine.this is correct as we have proper procedures.and i have refreshed databases in this manner.however this is the first time i created a new database previously i used to refresh already created dataabases. i have made the appropriate entry in tnsnames.ora of production and tnsping is working. also i updated the listener.ora file in the auxiliary database machine.to include the sid of auxiliary database.
Re: RMAN error while cloning hot database. [message #74396 is a reply to message #74395] Thu, 02 December 2004 11:40 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Okie.
As long as tns entries are set and used properly, it should work.
did you try to mount and open the database using RMAN?
if that works, duplication should work.
THe issue is with the environment ( variables, passwordfile etc)
Re: RMAN error while cloning hot database. [message #74397 is a reply to message #74395] Thu, 02 December 2004 11:42 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Did YOU configure the lISTENER for the aux datbase?.
Becuase it should ACCEPT the connects for the DUPLICATED database!
Re: RMAN error while cloning hot database. [message #74398 is a reply to message #74395] Thu, 02 December 2004 11:46 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
TYPOS..(end of my day?)
It was LISTENER. did you configure LISTENER for AUX?
Re: RMAN error while cloning hot database. [message #74399 is a reply to message #74396] Thu, 02 December 2004 11:59 Go to previous messageGo to next message
Natraj
Messages: 53
Registered: March 2003
Member
can i just mount the database without using RMAN.i guess probs r with env variables.password files etc. can i just run startup mount? the alertsid.log file of aux db is ok.i only do startup nomount or shu immediate.now i am getting uncomfortable with RMAN.!!
Re: RMAN error while cloning hot database. [message #74400 is a reply to message #74399] Thu, 02 December 2004 12:07 Go to previous messageGo to next message
Natraj
Messages: 53
Registered: March 2003
Member
but u know control file wont be recognised if i mount in this manner without RMAN i guess. listener and tnsnames.ora are ok.
Re: RMAN error while cloning hot database. [message #74401 is a reply to message #74399] Thu, 02 December 2004 14:49 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
as you said before, you can mount/open outside RMAN.
You need to check whether RMAN is happy with your ENV.
~!
so try to do with RMAN.
a duplicate comand would issue the same in backupground.
Re: RMAN error while cloning hot database. [message #74404 is a reply to message #74400] Fri, 03 December 2004 05:39 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>> if i mount in this manner without RMAN i guess
I am asking to check with RMAN.
Inside the rman prompt!.

connect to target
connect to recovery catalog.
try to mount and open the database.
Re: RMAN error while cloning hot database. [message #74406 is a reply to message #74400] Mon, 06 December 2004 07:24 Go to previous messageGo to next message
Natraj
Messages: 53
Registered: March 2003
Member
how do i do that?
Re: RMAN error while cloning hot database. [message #74407 is a reply to message #74404] Mon, 06 December 2004 08:40 Go to previous messageGo to next message
Natraj
Messages: 53
Registered: March 2003
Member
how do i do that?
Re: RMAN error while cloning hot database. [message #74408 is a reply to message #74407] Mon, 06 December 2004 09:30 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
assuming, something like this is your script.
assuming you have scripts that take care of fileName renaming, TIMESTAMP for TSPITR etc etc

wt
#   # and --- are comments
#!define environmentvariables in your shell
export ORACLE_SID=AUX_SID		--- sid of aux database to be clone
export ORACLE_BASE=xx
export ORACLE_HOME=xxx
export PATH:$PATH:$ORACLE_HOME/bin
export NLS_DATE_FORMAT='MON DD YYYY HH24:MI:SS'
rman  msglog '/tmp/duplicate.log' <<EOF
connect target sys/sys@target		--- database_or_primarydatabase
connect catalog rmanuser/pass@rmandb  	--- rman catalog database
connect auxiliary  sys/password 	--- this is you auxillary database
					--- if you using connnectstring , change to sys/pass@aux_connecstring.
run {
allocate channel ch1 type disk;
allocate channel ch2 type disk;
ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
--- OTHER COMMANDS
--- Do your business
duplicate target database to AUX_SID
PFILE = initAUX_SID.ora
--- OTHER COMMANDS
--- Do your business
}
exit
EOF

here you have issues with duplicate command.
The issue is your Environment is NOT identifieing the AUX instance in NOMOUNT stage.
possiblieites?
1. your passswordfile is corrupt.
2. Your environment is not set right.
3. Your initsid.ora is NOT understood/identified.
4. since you use tnsentries, your listener is NOT configured properly.

now try replacing
duplicate target database to AUX_SID
with run commands as shown here ( strip the "run". ).
add only sql "alter database mount";
sql "alter database open";

http://www.orafaq.com/forum/t/27172/0/

[Updated on: Fri, 18 February 2005 23:32]

Report message to a moderator

Re: RMAN error while cloning hot database. [message #74416 is a reply to message #74408] Tue, 07 December 2004 05:35 Go to previous message
Natraj
Messages: 53
Registered: March 2003
Member
Hi mahesh,
the problem wasw ith the listener, i had 2 entries of same sid in listener.ora, and it wa staking the latter entry with version 8.1.7 whereas my current entry of 9.2.0 was much above it.
Thanks for your help
Previous Topic: Help wanted for Oracle 8i RMAN Documentation...
Next Topic: RMAN Report from catalog
Goto Forum:
  


Current Time: Thu Apr 18 13:32:16 CDT 2024