Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0- Production
Start Date 06-NOV-2014 14:50:25
Uptime 0 days 0 hr. 0 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/grid/11g/network/admin/listener.ora
Listener Log File /u01/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "jadl11g" has 1instance(s).
Instance "jadl11g", status UNKNOWN, has 1 handler(s) for thisservice...
Service "jadl11g_DGMGRL" has 1instance(s).
Instance "jadl11g", status UNKNOWN, has 1 handler(s) for thisservice...
Service "sjadl11g" has 1instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for thisservice...
The command completed successfully
[oracle@localhost dbs]$ vi init
initjadl11g.ora init.ora
[oracle@localhost dbs]$ vi initjadl11g.ora
修改db_unique_name为sjadl11g,其他不需要修改
备库建立相关文件夹:
[oracle@localhost dbs]$ grep "/u01" initjadl11g.ora---查看需要创建的文件,一定要创建相关文件,负责rman执行会出错的。
jadl11g.__oracle_base="/u01/oracle'#ORACLE_BASEset from environment
*.audit_file_dest='/u01/oracle/admin/jadl11g/adump'
*.control_files='/u01/oracle/oradata/jadl11g/control01.ctl','/u01/oracle/fast_recovery_area/jadl11g/control02.ctl'
*.db_recovery_file_dest='/u01/oracle/fast_recovery_area'
*.diagnostic_dest='/u01/oracle'
[oracle@localhost dbs]$ ls/u01/oracle/admin/jadl11g/adump
ls: cannot access/u01/oracle/admin/jadl11g/adump: No such file or directory
[oracle@localhost dbs]$ mkdir/u01/oracle/admin/jadl11g/adump -p
[oracle@localhost dbs]$ ls/u01/oracle/oradata/jadl11g/
ls: cannot access/u01/oracle/oradata/jadl11g/: No such file or directory
[oracle@localhost dbs]$ ls/u01/oracle/oradata/
备库执行如下操作:
[oracle@localhost dbs]$ db11g
[oracle@localhost dbs]$ exportORACLE_SID=jadl11g
[oracle@localhost dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production onThu Nov 6 14:57:37 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2230952 bytes
Variable Size 268436824 bytes
Database Buffers 352321536 bytes
Redo Buffers 3338240 bytes
SQL> create spfile from pfile;
File created.
SQL> startup force nomount;
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2230952 bytes
Variable Size 268436824 bytes
Database Buffers 352321536 bytes
Redo Buffers 3338240 bytes
SQL> exit
Disconnected from Oracle Database 11gEnterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Oracle LabelSecurity, OLAP, Data Mining,
Oracle Database Vault and Real ApplicationTesting options
主备库都需要配置本地命名:
[oracle@localhost dbs]$ vi /u01/oracle/11g/network/admin/tnsnames.ora
[oracle@localhost dbs]$ cat/u01/oracle/11g/network/admin/tnsnames.ora
JADL11G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.188