Teaches you how to clone Oracle 10 Gb database, cold backup (graphic version)

Source: Internet
Author: User

Recently, Oracle was used in a project. Due to the large database, each backup and recovery time was relatively long. In the past few days, I have successfully cloned the database by referring to a large amount of data, i'm delighted to share this process with you through illustrations.
Steps for cloning an Oracle 10 Gb database:
1. Prepare the storage path and configuration information of the target database.
2. Configure the target Database Control File Script
3. Prepare data files of the target database (via Cold backup)
4. Run the Control File Script
5. Open the cloned Database

1. Prepare the storage path and configuration information of the target database.
A) create a storage path for the target database:
Create the database files (D: \ oracle \ product \ 10.1.0 \ oradata \ clne) and run information (D: \ oracle \ product \ 10.1.0 \ admin \ clne) respectively, the running information folder includes five folders: bdump, cdump, create, pfile, and udump.

B) initialize the parameter file:
You can copy and modify data from other databases. Copy the initialization configuration file of the source database practice to the D: \ oracle \ product \ 10.1.0 \ db_1 \ databas \ directory, and name the file initclne. ora, open the file and replace "practice" with "clne"

After modification, see:

C) Database Password File
Create a file by using the command line and place it in D: \ oracle \ product \ 10.1.0 \ db_1 \ database \. The file name is pwdclne. ora.
Command: orapwd file = D: \ oracle \ product \ 10.1.0 \ db_1 \ database \ pwdclne. ora Password = clne entries = 4

D) Create an oracle instance service
Create a service with the service name oracleserviceclne
Command: oradim-New-Sid clne-intpwd clne;
 

 

2. Configure the target Database Control File Script
Log on to practice as a DBA in SQL plus and run the following command to generate the practice control file:
Alter Database Backup controlfile to trace resetlogs;

 

You can find the file at the time of creating the control file in the D: \ oracle \ product \ 10.1.0 \ admin \ practice \ udump folder and copy the file to D: \ oracle \ product \ 10.1.0 \ admin \ clne \ create, and renamed it create_control. SQL; open this file
Delete the comment row in the script
Change "reuse" in "create controlfile reuse Database" clne "to" set"
Change "practice" in create controlfile to "clne"
Change the path of each data file and log file from the original/oradata/practice directory to/oradata/clne
The best result after modification:

3. Prepare data files of the target database (via Cold backup)
Stop the practice service in the service or use shutdown immediate or other methods to close the source database, and then put the source database file (D: \ oracle \ product \ 10.1.0 \ oradata \ Practice) copy to the target database folder (D: \ oracle \ product \ 10.1.0 \ oradata \ clne)
 

4. Run the Control File Script
A) configure the TNS service: Open D: \ oracle \ product \ 10.1.0 \ db_1 \ Network \ admin \ tnsnames. ora and add the target database service.

B) configure the lisenter service: Open D: \ oracle \ product \ 10.1.0 \ db_1 \ Network \ admin \ listener. ora and add the target database service.
(Missing image to be supplemented)
C) Execution control file: Log On As nolog in the command line
Command: sqlplus/nolog
Connect sys/clne as sysdba
D: \ oracle \ product \ 10.1.0 \ admin \ clne \ create \ create_control. SQL
(Missing image to be supplemented)

5. Open the cloned Database
Enable the database by resetting logs
Command: Alter database open resetlogs;
(Missing image to be supplemented)

So far, the whole process of cloning and disabling the database is over!

ArticleTo learn IT network: http://www.xueit.com/html/2009-04/25_1168_00.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.