Duplicate replication database in Oracle 10g

Source: Internet
Author: User

This experiment uses the duplicate command to create a copy database in the local environment. The target database is hongye, And the copied database is catdb.

Environment alias settings:
Alias SQL = 'maid sqlplus/nolog'
Alias rman = 'rlwrap rman'
Alias dbs = 'CD $ Oracle_HOME/dbs'
Alias rdb = 'CD $ ORACLE_HOME/rdbms/admin'
Alias udu = 'CD $ ORACLE_BASE/admin/$ ORACLE_SID/udump'
Alias bdu = 'CD $ ORACLE_BASE/admin/$ ORACLE_SID/bdump'
Alias rmalert = 'rm-f $ ORACLE_BASE/admin/$ ORACLE_SID/bdump/*; rm-f $ ORACLE_BASE/admin/$ ORACLE_SID/udump /*'


The detailed steps are as follows:

1. Construct the catdb initialization parameter file. The parameter file used in this experiment was created from the hongye database and made some modifications.
Note that the parameters db_file_name_convert and log_file_name_convert control the renaming of data files and log files. You can also use the set newname command to rename data files, the log file rename can be specified in the duplicate command clause, but it is not easy to convert the init parameter.
The db_file_name_convert and log_file_name_convert parameters are all renamed using string replacement. By replacing the specified string of the target file name with the specified string, a new file name is generated.
In this experiment, the data file of the hongye database is stored in the path:/oracle/oradata/hongye/, and the data file path of the catdb is/oracle/oradata/catdb /, therefore, you only need to replace hongye in all file names with catdb.

[Oracle @ ORA10G ~] $ Dbs
[Oracle @ ORA10G dbs] $ echo $ ORACLE_SID
Hongye
[Oracle @ ORA10G dbs] $ ll
Total 6960
-Rw ---- 1 oracle oinstall 1544 Feb 11 hc_hongye.dat
-Rw-r ----- 1 oracle oinstall 848 Feb 17 initcatdb. ora
-Rw-r -- 1 oracle oinstall 12920 May 3 2001 initdw. ora
-Rw-r ----- 1 oracle oinstall 1079 Feb 17 inithongye. ora
-Rw-r ----- 1 oracle oinstall 2469 Feb 11 init. ora
-Rw-r ----- 1 oracle oinstall 24 Feb 11 19: 20 lkHONGYE
-Rw-r ----- 1 oracle oinstall 1536 Feb 17 orapwcatdb
-Rw-r ----- 1 oracle oinstall 1536 Feb 15 orapwhongye
-Rw-r ----- 1 oracle oinstall 7061504 Feb 17 snapcf_hongye.f
-Rw-r ----- 1 oracle oinstall 3584 Feb 17 spfilehongye. ora
-Rw-r ----- 1 oracle oinstall 694 Feb 17 sqlnet. log
[Oracle @ ORA10G dbs] $ vi initcatdb. ora
*. Audit_file_dest = '/oracle/admin/catdb/adump'
*. Background_dump_dest = '/oracle/admin/catdb/bdump'
*. Compatible = '10. 2.0.5.0'
*. Control_files = '/oracle/oradata/catdb/control01.ctl'
*. Core_dump_dest = '/oracle/admin/catdb/cdump'
*. Db_block_size = 8192
*. Db_domain = 'oracle. com'
*. Db_file_multiblock_read_count = 16
*. Db_name = 'catdb'
*. Db_recovery_file_dest = '/oracle/flash_recovery_area'
*. Db_recovery_file_dest_size = 2147483648
*. Dispatchers = '(PROTOCOL = TCP) (SERVICE = catdbXDB )'
*. Job_queue_processes = 10
*. Nls_date_format = 'yyyy-mm-dd hh24: mi: ss'
*. Open_cursors = 30
*. Pga_aggregate_target = 16777216
*. Processes = 50
*. Remote_login_passwordfile = 'clusive'
*. Sessions = 70
*. Sga_target = 80 M
*. Undo_management = 'auto'
*. Undo_tablespace = 'undotbs1'
*. User_dump_dest = '/oracle/admin/catdb/udump'
-- File name conversion parameters:
Db_file_name_convert = ('hongye', 'catdb ')
Log_file_name_convert = ('hongye', 'catdb ')
~
~
~
~
~
"Initcata. ora" 25L, 848C written

  • 1
  • 2
  • 3
  • 4
  • Next Page

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.