RAC+ASM+DATAGUARD
環境:
[root@ygzhou01 ~]# strings /etc/hosts -------IP配置
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
#pub VIP
10.203.94.101 ygzhou01
10.203.94.102 ygzhou02
#priv IP
10.0.0.1 ygzhou01-priv
10.0.0.2 ygzhou02-priv
#vip
10.203.94.121 ygzhou01-vip
10.203.94.122 ygzhou02-vip
#SCAN IP
10.203.94.151 ygzhou-scan
#10.203.94.152 ygzhou-scan
#10.203.94.153 ygzhou-scan
[root@ygzhou01 ~]# strings /etc/sysconfig/network -------hostname
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=ygzhou01
[root@ygzhou01 ~]# su - grid
[grid@ygzhou01 ~]$ strings .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ygzhou01; export ORACLE_HOSTNAME
ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_BASE=/u01/app/grid/11.2.0/; export ORACLE_BASE
ORACLE_HOME=/u01/app/grid/product/11.2.0/crs_1/; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH; export PATH
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
[grid@ygzhou01 ~]$ su - oracle
Password:
[oracle@ygzhou01 ~]$ strings .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings oracle
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ygzhou01; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=ygzhou1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
[oracle@ygzhou02 dbs]$ strings initygzhou2.ora_2
ygzhou1.__db_cache_size=603979776
ygzhou2.__db_cache_size=637534208
ygzhou1.__java_pool_size=16777216
ygzhou2.__java_pool_size=16777216
ygzhou1.__large_pool_size=16777216
ygzhou2.__large_pool_size=16777216
ygzhou1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
ygzhou2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
ygzhou1.__pga_aggregate_target=721420288
ygzhou2.__pga_aggregate_target=687865856
ygzhou1.__sga_target=973078528
ygzhou2.__sga_target=1006632960
ygzhou1.__shared_io_pool_size=0
ygzhou2.__shared_io_pool_size=0
ygzhou1.__shared_pool_size=318767104
ygzhou2.__shared_pool_size=318767104
ygzhou1.__streams_pool_size=0
ygzhou2.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/ygzhou/adump'
*.audit_trail='db'
*.cluster_database=FALSE
*.compatible='11.2.0.0.0'
*.control_files='+YGZHOUDB01/ygzhou/controlfile/current.256.770486305'
*.db_block_size=8192
*.db_create_file_dest='+YGZHOUDB01'
*.db_domain=''
*.db_file_name_convert='/u01/app/oracle/oradata/ygzhou/','+YGZHOUDB01/ygzhou/datafile/'
*.db_name='ygzhou'
*.diagnostic_dest='/u01/app/oracle'
*.fal_server='YGZHOUDG'
ygzhou1.fal_client='YGZHOU1'
ygzhou2.fal_client='YGZHOU2'
ygzhou1.instance_number=1
ygzhou2.instance_number=2
*.log_archive_dest_1='LOCATION=+DATA1/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ygzhou'
#ygzhou2.log_archive_dest_1='LOCATION=/home/oracle/archivelog2/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ygzhou'
#*.log_archive_dest_1='location=+DATA1/ygzhou/datafile/'
*.log_archive_dest_2='SERVICE=ygzhoudg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ygzhoudg'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='enable'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/ygzhou/','+YGZHOUDB01/ygzhou/onlinelog/'
*.memory_target=1691353088
*.open_cursors=300
*.processes=150
*.remote_listener='ygzhou-scan:1521'
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='auto'
ygzhou2.thread=2
ygzhou1.thread=1
ygzhou1.undo_tablespace='UNDOTBS1'
ygzhou2.undo_tablespace='UNDOTBS2'
[oracle@ygzhou02 dbs]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/ ----TNSNAME.ORA檔案配置
[oracle@ygzhou02 admin]$ strings tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
YGZHOUDG =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.203.94.105)(PORT = 1521)) ----------standbyDB
)
(CONNECT_DATA =
(SERVICE_NAME = ygzhoudg)
)
YGZHOU =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ygzhou-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ygzhou)
)
YGZHOURAC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.203.94.102)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ygzhou)
)
[oracle@ygzhoudg ~]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/dbs/ ---standbyDB pfile引數
[oracle@ygzhoudg dbs]$ strings initygzhou.ora
*.__db_cache_size=637534208
*.__java_pool_size=16777216
*.__large_pool_size=16777216
*.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
*.__pga_aggregate_target=687865856
#ygzhou1.__pga_aggregate_target=687865856
#ygzhou2.__sga_target=1006632960
*.__sga_target=1006632960
#ygzhou2.__shared_io_pool_size=0
*.__shared_io_pool_size=0
#ygzho.__shared_pool_size=318767104
*.__shared_pool_size=318767104
#ygzhou2.__streams_pool_size=0
*.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/ygzhou/adump'
*.audit_trail='db'
#*.cluster_database=TRUE
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/ygzhou/controlfile01.ctl','/u01/app/oracle/oradata/ygzhou/controlfile02.ctl'
*.db_block_size=8192
#*.db_create_file_dest='+YGZHOUDB01'
*.db_domain=''
*.db_file_name_convert='+YGZHOUDB01/ygzhou/datafile/','/u01/app/oracle/oradata/ygzhou/'
*.db_name='ygzhou'
*.db_unique_name='ygzhoudg'
*.diagnostic_dest='/u01/app/oracle'
*.fal_server='ygzhou1','ygzhou2'
*.fal_client='ygzhoudg'
*.log_archive_dest_1='LOCATION=/home/oracle/archivelog/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ygzhoudg'
#ygzhou1.log_archive_dest_2='SERVICE=ygzhou1 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ygzhou'
*.log_archive_dest_2='SERVICE=ygzhou LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ygzhou'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='enable'
*.log_archive_max_processes=30
*.log_file_name_convert='+YGZHOUDB01/ygzhou/onlinelog/','/u01/app/oracle/oradata/ygzhou/'
*.memory_target=1691353088
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='auto'
#ygzhou2.thread=2
#ygzhou1.thread=1
*.undo_tablespace='UNDOTBS1'
#ygzhou2.undo_tablespace='UNDOTBS2'
[oracle@ygzhoudg dbs]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/
[oracle@ygzhoudg admin]$ strings listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.203.94.105)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ygzhoudg)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = ygzhou)
)
)
ADR_BASE_LISTENER = /u01/app/oracle
[oracle@ygzhoudg admin]$ strings tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
YGZHOU =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.203.94.122)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.203.94.121)(PORT = 1521))
(LOAD_BALANCE =yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ygzhou)
)
YGZHOU1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.203.94.121)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ygzhou)
(INSTANCE_NAME = ygzhou1)
)
YGZHOU2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.203.94.122)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ygzhou)
(INSTANCE_NAME = ygzhou2)
)
YGZHOUDG =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.203.94.105)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ygzhoudg)
)
[oracle@ygzhoudg admin]$
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26870952/viewspace-2152090/,如需轉載,請註明出處,否則將追究法律責任。