创建物理standby过程(rman1)
原创
©著作权归作者所有:来自51CTO博客作者帅小伙的原创作品,请联系作者获取转载授权,否则将追究法律责任
Standby database的建立
一、配置Listener及tnasname.ora
1. 配置standby server 的listener.
[ora9i@STANDBY admin]$ vi listener.ora
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.18.18)(PORT = 1521))
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = dba9i.oracle.com)
(ORACLE_HOME = /u01/products/9.2.0/db)
(SID_NAME = dba9i)
)
)
[ora9i@STANDBY admin]$ lsnrctl
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 05-MAY-2004 20:26:15
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> start
Starting /u01/products/9.2.0/db/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /u01/products/9.2.0/db/network/admin/listener.ora
Log messages written to /u01/products/9.2.0/db/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.18.18)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.18.18)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date 05-MAY-2004 20:26:17
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /u01/products/9.2.0/db/network/admin/listener.ora
Listener Log File /u01/products/9.2.0/db/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.18.18)(PORT=1521)))
Services Summary...
Service "dba9i.oracle.com" has 1 instance(s).
Instance "dba9i", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[ora9i@ORA10G ora9i]$ vi $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.18.180)(PORT = 1521))
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = dba9i.oracle.com)
(ORACLE_HOME = /u01/products/9.2.0/db)
(SID_NAME = dba9i)
)
)
[ora9i@ORA10G ora9i]$ lsnrctl start
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 07-MAY-2004 13:02:56
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Starting /u01/products/9.2.0/db/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /u01/products/9.2.0/db/network/admin/listener.ora
Log messages written to /u01/products/9.2.0/db/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.18.180)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.18.180)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date 07-MAY-2004 13:02:57
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /u01/products/9.2.0/db/network/admin/listener.ora
Listener Log File /u01/products/9.2.0/db/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.18.180)(PORT=1521)))
Services Summary...
Service "dba9i.oracle.com" has 1 instance(s).
Instance "dba9i", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[ora9i@ORA10G admin]$ vi tnsnames.ora
standby =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.18.18)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dba9i.oracle.com)
)
)
[ora9i@ORA10G ora9i]$ tnsping standby
TNS Ping Utility for Linux: Version 9.2.0.4.0 - Production on 07-MAY-2004 13:01:57
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.18.18)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dba9i.oracle.com)))
OK (150 msec)
4. 在standby server 建立net service name: primary连接到primary server
[ora9i@STANDBY ora9i]$ vi $ORACLE_HOME/network/admin/tnsnames.ora
PRIMARY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.18.180)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dba9i.oracle.com)
)
)
~
[ora9i@STANDBY ora9i]$ tnsping primary
TNS Ping Utility for Linux: Version 9.2.0.4.0 - Production on 06-MAY-2004 22:06:54
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.18.180)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dba9i.oracle.com)))
OK (100 msec)
二、修改primary database的参数文件:
SQL> create pfile from spfile;
[ora9i@ORA10G ora9i]$ cat $ORACLE_HOME/dbs/initdba9i.ora
*.background_dump_dest='/u02/9i/ADMIN/BDUMP'
*.compatible='9.2.0'
*.control_files='/u02/9i/oradata/ctrl_01.ctl'
*.core_dump_dest='/u02/9i/ADMIN/CDUMP'
*.db_block_size=4096
*.db_cache_size=8m
*.db_domain='oracle.com'
*.db_name='dba9i'
*.global_names=TRUE
*.instance_name='dba9i'
*.log_archive_dest_1='location=/u02/9i/arc'
*.log_archive_dest_2='service=standby mandatory reopen=300' -- new parameters
*.log_archive_start=TRUE
*.max_dump_file_size='10240'
*.remote_login_passwordfile='exclusive'
*.service_names='dba9i'
*.shared_pool_size=8M
*.undo_management='AUTO'
*.undo_tablespace='UNDO'
*.user_dump_dest='/u02/9i/ADMIN/UDUMP'
*.lock_name_space='dba9i' --new parameters
*.standby_archive_dest='location=/u02/9i/arc/' --new parameters
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> create spfile from pfile;
File created.
SQL> startup
ORACLE instance started.
Total System Global Area 55645264 bytes
Fixed Size 451664 bytes
Variable Size 46137344 bytes
Database Buffers 8388608 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> alter system set log_archive_dest_state_2=defer
三、将参数文件COPY到standby server 的相同目录下:
*.background_dump_dest='/u02/9i/ADMIN/BDUMP'
*.compatible='9.2.0'
*.control_files='/u02/9i/oradata/ctrl_01.ctl'
*.core_dump_dest='/u02/9i/ADMIN/CDUMP'
*.db_block_size=4096
*.db_cache_size=8m
*.db_domain='oracle.com'
*.db_name='dba9i'
*.global_names=TRUE
*.instance_name='dba9i'
*.log_archive_dest_1='location=/u02/9i/arc'
*.log_archive_dest_2='service=primary mandatory reopen=300' -- update parameters
*.log_archive_dest_state_2=defer --new parameters
*.log_archive_start=TRUE
*.max_dump_file_size='10240'
*.remote_login_passwordfile='exclusive'
*.service_names='dba9i'
*.shared_pool_size=8M
*.undo_management='AUTO'
*.undo_tablespace='UNDO'
*.user_dump_dest='/u02/9i/ADMIN/UDUMP'
*.lock_name_space='dba9i'
*.standby_archive_dest='location=/u02/9i/arc/'
[ora9i@STANDBY dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwdba9i password=sys entries=5
[ora9i@STANDBY dbs]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Thu May 6 22:36:55 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba;
Connected to an idle instance.
SQL> create spfile from pfile;
File created.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 55645264 bytes
Fixed Size 451664 bytes
Variable Size 46137344 bytes
Database Buffers 8388608 bytes
Redo Buffers 667648 bytes
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
创建物理DATA GUARD
序号 库 IP Db_name
DATA GUARD -
duplicate在线创建物理备库
duplicate创建备库
oracle dataguard -
dataguard之创建物理备库
创建前的设置1使用下面的语句将
dataguard 物理dg hive oracle 初始化 -
【翻译自mos文章】重新创建物理standby database 的 控制文件的方法
【翻译自mos文章】重新创建物理standby database 的 控制文件的方法
recreate Physical Standby Con sql oracle 控制文件