Oracle10gPhysicalDataGuard搭建详细过程(四)

2014-11-24 16:55:49 · 作者: · 浏览: 10
.1.6)(PORT=1521)))


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.6)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 13-FEB-2014 22:58:13
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/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.6)(PORT=1521)))
Services Summary...
Service "standby" has 1 instance(s).
Instance "standby", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@dgstb admin]$ sqlplus system@dbserver


SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 13 22:58:28 2014


Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Enter password:


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

--创建standby spfile,并且实例启动到nomount
[oracle@dgstb dbs]$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 13 23:02:45 2014


Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to an idle instance.


SQL> create spfile from pfile;


File created.


SQL> startup nomount
ORACLE instance started.


Total System Global Area 612368384 bytes
Fixed Size 2085872 bytes
Variable Size 167775248 bytes
Database Buffers 436207616 bytes
Redo Buffers 6299648 bytes
SQL>

*********************************************
配置primary


--配置静态监听和网络服务名
[oracle@vzwc admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.


SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = dbserver)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = ORCL)
)
)


LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vzwc)(PORT = 1521))
)


[oracle@vzwc admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.


DBSERVER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.7)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dbserver)
)
)


STANDBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.6)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = standby)
)
)


--配置参数
[oracle@vzwc ~]$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 13 23:09:28 2014


Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> alter system set log_archive_dest_1='location=/arch valid_for=(all_logfiles,all_roles) db_unique_name=dbserver';


System altered.


SQL> alter system set log_archive_dest_2='service=standby lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=standby';


System altered.


SQL>