Home » RDBMS Server » Server Administration » Online Cloning
Online Cloning [message #238974] Mon, 21 May 2007 01:36 Go to next message
ram_ocp
Messages: 49
Registered: December 2005
Location: Karnataka
Member

Hi,

Can somebody help in Cloning.Recently i was asked in an interview how to clone a database online ie WITHOUT SHUT DOWN OF THE DATABSE.
I have done cloning by shutting down the db,but dont know how to do online cloning.

Awaiting your response,
Thanks
RAm

Re: Online Cloning [message #238983 is a reply to message #238974] Mon, 21 May 2007 02:02 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Backup and Recovery Advanced User's Guide, Chapter 13 Creating and Updating Duplicate Databases with RMAN

Regards
Michel
Re: Online Cloning [message #238995 is a reply to message #238974] Mon, 21 May 2007 03:00 Go to previous messageGo to next message
ayeah
Messages: 8
Registered: April 2007
Location: Philippines
Junior Member
Hi ram_ocp and Michel Cadot,

I also have the same task, I was asked to copy the contents of a live database what makes it worst is that, it is access by 2 server(clustered). The database is located in an external storage device. My objective is to setup a seperate server and copy the contents of the database or connect to the live database.

Hoping for your help.

thanks,
Ayeah
Re: Online Cloning [message #238999 is a reply to message #238995] Mon, 21 May 2007 03:09 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So read the link I posted.

Regards
Michel
Re: Online Cloning [message #239001 is a reply to message #238995] Mon, 21 May 2007 03:17 Go to previous messageGo to next message
ayeah
Messages: 8
Registered: April 2007
Location: Philippines
Junior Member
Hello again,

Is it also possible to use import and export procedure?

thanks,
Ayeah
Re: Online Cloning [message #239002 is a reply to message #239001] Mon, 21 May 2007 03:26 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Is it also possible to use import and export procedure?

Yes.

But if the question is ONLY procedures, the answer is no.

But if the question is using data pump, the answer is yes (at least for import).

Regards
Michel
Re: Online Cloning [message #239004 is a reply to message #238974] Mon, 21 May 2007 03:40 Go to previous messageGo to next message
ayeah
Messages: 8
Registered: April 2007
Location: Philippines
Junior Member
Hello,

Thanks for your reply, it is very much appreciated.

Our live 10g server is clustered.
We are planning to migrate the cluster server to APO fron NT to AD domain.
But before that, we want to setup a new oracle server as a fallback just in case our migration fails.
That is why we want to copy our live database.

What other things we should consider doing this activity?
Also, have you experience migrating your oracle from NT to AD?

thanks,
Ayeah
Re: Online Cloning [message #239014 is a reply to message #239004] Mon, 21 May 2007 04:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
have you experience migrating your oracle from NT to AD?


No.

Regards
Michel
Re: Online Cloning [message #240009 is a reply to message #239014] Wed, 23 May 2007 19:38 Go to previous messageGo to next message
ayeah
Messages: 8
Registered: April 2007
Location: Philippines
Junior Member
Good Morning,

Yes we have tried but it failed due to the oracle service is running when we move group from Server A(NT) to B(AD).
The database went down and it to a scare since it wont startup again. Hopefully we find a way to brought it up again.

Our plan is to shutdown the oracle before migrating
Please see our planned procedure, hope you could give your comments.

**********************************
PMS Migration

Full Backup Database
Add Active Directory Account to Local Admin group of PMS A & B
o APO\QDCluster
o APO\QDPMSadmin

Migration Process:

A. PMS A (Migrate while PMS B is Off)
1. Shutdown Oracle System *
2. Offline Resources
3. Change Startup type to “manual” on the following *
3.1. Cluster Service
3.2. Oracle MSCS Services
4. Join to APO the PMS (Follow the Procedure)
4.1. Add DNS IP & Join back to Workgroup
4.2. Restart system
4.3. Check Oracle services; stop if some are started
4.4. Offline Resources
4.5. Join to AD (APO) and change service logon account.(Include Netbackup)
4.6. Add user rights assignment
4.7. Restart system
4.8. Logon using local administrator account
4.9. Online resources *
4.10. Check services; should be started automatically
4.11. Check database using SQL Plus*
5. Finish.

B. Migrate PMS B (Follow procedure A) except with*
C. Test Cluster
1. Move group to PMS B; Check user connection
2. Move group to PMS A; Check user connection
D. Documentation
************end of procedure*************************
thanks,
Ayeah

Re: Online Cloning [message #240829 is a reply to message #238974] Sat, 26 May 2007 04:29 Go to previous messageGo to next message
kandhireddy
Messages: 4
Registered: May 2007
Junior Member
Hi Ram,

This is posible if your dabase is in archive log mode and other option is export and import.

If the database in archive log mode

1) backup the source database after setting all the tablespace in begin backup mode.

2) Generate the trace file for controlfile creation script
alter database backup controlfile to trace;

3) Copy all the datafiles and log files to the destination

4) copy all archives logs generated during the backup

5) create the control file with archive log and reset logs

6) recover the datbase using backup controlfile

7) apply all archives then cancel at last

Cool open the databse

Cheers...
Karunakar
Re: Online Cloning [message #241126 is a reply to message #240829] Mon, 28 May 2007 07:23 Go to previous messageGo to next message
ram_ocp
Messages: 49
Registered: December 2005
Location: Karnataka
Member
Hi Karunakar,

Thanks so much for the answer i was looking for it.
Could you explain the 5 line like how to create the control file with archivelog

5) create the control file with archive log and reset logs

Could you provide me the first line of the create control file statement


Thanks so much
Ram Razz

Re: Online Cloning [message #241136 is a reply to message #241126] Mon, 28 May 2007 07:59 Go to previous messageGo to next message
rsreddy28
Messages: 295
Registered: May 2007
Senior Member
Hi,

here goes the link for creating a controlfile.

http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5003.htm#i2061000.


Hope this helps you out.

bYe,

Raja
Re: Online Cloning [message #242172 is a reply to message #238974] Thu, 31 May 2007 19:41 Go to previous messageGo to next message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
Hi All,

Karunakar quoted in his reply like
backup the source database after setting all the tablespace in begin backup mode.

please explain how can the SYSTEM tablespace be placed in Backup mode.

and without system tablespace how can we clone the database online.

anticipating your response

Thanks!
Re: Online Cloning [message #242192 is a reply to message #242172] Fri, 01 June 2007 00:13 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
please explain how can the SYSTEM tablespace be placed in Backup mode.

Like any other tablespace.
Quote:
and without system tablespace how can we clone the database online.

Putting a tablespace in backup mode is not taking it offline.

Regards
Michel
Re: Online Cloning [message #242227 is a reply to message #238974] Fri, 01 June 2007 02:41 Go to previous messageGo to next message
ram_ocp
Messages: 49
Registered: December 2005
Location: Karnataka
Member
Hi ,

I tried the steps given by Karunakar but getting the following error.Could somebody suggest

SQL> recover database using backup controlfile;
ORA-00279: change 731216 generated at 06/01/2007 12:46:07 needed for thread 1
ORA-00289: suggestion :
E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCLCLN\ARCHIVELOG\2007_06_01\O1_MF
_1_24_%U_.ARC
ORA-00280: change 731216 for thread 1 is in sequence #24


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SQL> alter database open resetlogs ;
alter database open resetlogs
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCLCLN\SYSTEM01.DBF'

Regards
Ram
Re: Online Cloning [message #242528 is a reply to message #242227] Sun, 03 June 2007 11:44 Go to previous messageGo to next message
kandhireddy
Messages: 4
Registered: May 2007
Junior Member
Hi Ram,

Apply some more, archives then cancel the recovery and then try to open the database with resetlogs.

If you dont have any archives to apply the online redo if u take the backup as part of the hot backup.

Thanks
Karunakar
Re: Online Cloning [message #242547 is a reply to message #238974] Mon, 04 June 2007 00:21 Go to previous messageGo to next message
ram_ocp
Messages: 49
Registered: December 2005
Location: Karnataka
Member
Hi,

Sorry for the trouble
But as much as i try this online cloning, i gett the following error
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCLCLN\SYSTEM01.DBF'

I applied all archivelog and cancelled the last one.But still the above error
Has anobody tried the steps,pls let me know

Regards
Ram
Re: Online Cloning [message #242923 is a reply to message #238974] Tue, 05 June 2007 09:17 Go to previous messageGo to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
After given 'END BACKUP' in source,Just issue 'ALTER SYSTEM SWITCH LOGFILE;' to get some more archives generated.

Transfer those archives to Destination and apply them too .

hav a try
Re: Online Cloning [message #243148 is a reply to message #242923] Wed, 06 June 2007 04:27 Go to previous message
ram_ocp
Messages: 49
Registered: December 2005
Location: Karnataka
Member

I have already tried the steps mentioned below but same error.Please somebody let me know if anbody has tried cloning by copying the files when database is open.


After given 'END BACKUP' in source,Just issue 'ALTER SYSTEM SWITCH LOGFILE;' to get some more archives generated.

Transfer those archives to Destination and apply them too .

hav a try

Regards
Ram
Previous Topic: GATHER_TABLE_STATS - temp tablespace getting full
Next Topic: one of the intrview questions could any one give answers plz
Goto Forum:
  


Current Time: Sat Dec 10 01:10:47 CST 2016

Total time taken to generate the page: 0.07174 seconds