2、创建复制数据库的相关目录,包括adump、bdump、cdump、udump、oradata/catdb
[Oracle@ORA10G dbs]$ cd /oracle/admin
[oracle@ORA10G dbs]$ mkdir catdb catdb/adump catdb/bdump catdb/cdump catdb/udump
[oracle@ORA10G dbs]$ ll /oracle/admin/
total 8
drwxr-xr-x 7 oracle oinstall 4096 Feb 17 19:29 catdb
drwxr-x--- 8 oracle oinstall 4096 Feb 11 19:19 hongye
[oracle@ORA10G dbs]$ mkdir /oracle/oradata/catdb/
[oracle@ORA10G dbs]$ ll /oracle/oradata/catdb/
total 0
3、将ORACLE_SID设置为复制数据库的sid,那么就不需要额外的配置复制数据库的网络文件了,前提是已经配置了目标数据库的网络配置文件,二者必须至少要配其一。
[oracle@ORA10G dbs]$ echo $ORACLE_SID
hongye
[oracle@ORA10G dbs]$ export ORACLE_SID=catdb
[oracle@ORA10G dbs]$ echo $ORACLE_SID
catdb
4、创建复制数据库的密码文件。
[oracle@ORA10G dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwcatdb
Enter password for SYS:
5、登录复制数据库,以nomount方式打开数据库。
[oracle@ORA10G dbs]$ sql
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Feb 17 19:50:57 2011
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
IDLE > conn /as sysdba
Connected to an idle instance.
IDLE > startup nomount pfile=$ORACLE_HOME/dbs/initcatdb.ora
ORACLE instance started.
Total System Global Area 83886080 bytes
Fixed Size 1272096 bytes
Variable Size 58722016 bytes
Database Buffers 16777216 bytes
Redo Buffers 7114752 bytes
IDLE > exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
