Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clone a standby db (without rman) 1

Status
Not open for further replies.

LKBrwnDBA

MIS
Jun 16, 2003
1,866
US


Hi guys!

I need to clone a standby database without using rman (have no disk space).

Here is the setup:
Server S has standby db
Server C has mounted /oradata disk from standby

What I intend to do (if it's possible) is kinda similar to "cloning" a database from an OS hot backup:

1) QUIESCE the standby (can it be done?)
2) Copy db files from /oradata/standby to /oradata/clone
3) UNQUIESCE the standby
4) Re-create clone control file + open reset logs
[noevil]

Q1: Can I stop managed recovery and quiesce the standby? .. And then unquiesce and restart managed recovery?

Q2: Will copying the files be enough to clone db or do I need something else like redo/archive logs?
It's been a very looooooong time since I cloned a db from hot/cold backup.

[3eyes]





----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 

And the solution is:

1) Stop managed recovery on the standby:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

2) Copy the files from standby mp to clone mp.

3) Re-start managed recovery on the standby:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
DISCONNECT FROM SESSION;

4) Re-create the controlfile on the clone:
STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "CLONEDB" RESETLOGS FORCE LOGGING NOARCHIVELOG
-- Etc --

5) Open clone database with resetlogs

And ALL is OK!
[3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
LKBrwnDBA,

We always reward excellent, helpful replies with a
star.gif
. Since you didn't reward LKBrwnDBA with a well-deserved
star.gif
, I'll do it for you. <Big grin>

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”
 

Thanks Dave, you rewarded the OP (me)!
Cheers,
[thumbsup2]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
LK said:
Thanks Dave, you rewarded the OP (me)!
That's why my "<Big grin>".

Cheers,

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”
 
I'd like to take this a step further.

I also want to clone a standby database but leave it as a standby database until many hours later when the archive logs from the primary are copied over and it is rolled forward.

Up until here works fine and opening it read only works fine. At that point I want to open it read-write as a separate new database.

I do the create controlfile as newdb .......
that works

but when I alter database open resetlogs it fails saying datafile needs to be from earlier backup.

It was suggested I did a recover database using backup controlfile until cancel at that point which I tried but when I now try to open it resetlogs it says file 1 system.dbf needs media recovery.

Has anyone any ideas?
 

Did you remember to change the init${sid}.ora file before creating the controlfile?
[3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Yes I did.

I have two init.ora files. For the standby roll forward I mount the database using one init.ora which has the dbname as the primary db and when I create the controlfile and try to open as newdb resetlogs I use a different init.ora with the dbname as newdb.

If this was wrong it would have failed at the create controlfile as.... but that works, it just won't open.
 

Well, step #4 of my 13-Oct post worked like a charm...

Did you remove the dg_broker_start, fal_client, fal_server and log_archive_dest_2 parameters from the init.ora?
Did you remove the spfile{sid}.ora?
Did you use the EXACT create controlfile options as in step #4?
[ponder]





----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top