for Linux: Version 10.2.0.1.0 - Production on 19-MAR-2014 01:05:57
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.222)(PORT=1521)))
The command completed successfully
[oracle@linux5 admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-MAR-2014 01:06:08
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.222)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.222)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 19-MAR-2014 01:06:08
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.222)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
tnsnames.ora
orcls_192.168.1.223=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.223)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = orclstd)
)
)
orcl_192.168.1.222=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.222)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = orcl)
)
)
7.创建秘钥文件
[oracle@linux5 dbs]$ ls
alert_orcl.log initdw.ora lkORCL orapw_bak spfileorcl.ora
hc_orcl.dat init.ora lkORCLPRE snapcf_orcl.f
[oracle@linux5 dbs]$ pwd
/u01/app/oracle/10.2.0/db_1/dbs
[oracle@linux5 dbs]$ orapwd file=/u01/app/oracle/10.2.0/db_1/dbs/orapworclpassword=safe entries=30
命名规则:
windows:PWD[sid].ora
Linux:orapw[sid]千万不要加后缀,否则密码文件格式不对,导致Standby数据库无法接受归档文件。
[oracle@linux5 dbs]$ ls
alert_orcl.log initdw.ora lkORCL orapw_bak snapcf_orcl.f
hc_orcl.dat init.ora lkORCLPRE orapworcl spfileorcl.ora
复制该秘钥文件到Standby数据库
[oracle@localhost u01]$ scp oracle@192.168.1.222:/u01/app/oracle/10.2.0/db_1/dbs/orapworcl /u01/app/oracle/10.2.0/db_1/dbs/orapworclstd
oracle@192.168.1.222's password:
orapworcl.ora 100% 5120 5.0KB/s 00:00
Standby数据库配置:
1.
2.创建日志输出文件相关目录:
[oracle@localhost admin]$ pwd
/u01/app/oracle/admin
[oracle@localhost admin]$ ls
orclstd
[oracle@localhost admin]$ cd orclstd/
[oracle@localhost orclstd]$ ls
[oracle@localhost orclstd]$ mkdir -p {a,b,c,u}dump
[oracle@localhost orclstd]$ ls
adump bdump cdump udump
3.配置监听和网络服务名
listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orclstd)
(ORACLE_HOME = /u01/app/oracle/10.2.0/db_1)
#### (PROGRAM = orclstd)
(GLOBAL_DBNAME = orclstd)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.223)(PORT = 1521))
)
tnsnames.ora
ORCL_192.168.1.222 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.222)(PORT = 1521))
)