oracle 11gr2 rac to single instance dataguard base fs

rac:

[oracle@test183 ~]$ cat /etc/hosts
# 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
192.168.1.183   test183
192.168.1.184   test184
192.168.1.185   test185


10.120.111.1 test183-priv
10.120.111.2 test184-priv
10.120.111.3 test185-priv


192.168.1.141 test183-vip
192.168.1.142 test184-vip
192.168.1.143 test185-vip

192.168.1.145 scan-dgh
192.168.1.188 test188



[oracle@test183 ~]$ id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmDBA),1202(asmoper)
[oracle@test183 ~]$ id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)



单实例:

[oracle@test188 dbs]$ id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper),1300(dba)
[oracle@test188 dbs]$ id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)







Create single instance standby database for RAC Database
here i created a physical standby database stbydb for RAC database orcc instance names orcc1、orcc2、orcc3 , server names:- test183、test184、test185.

PRIMARY RAC DATABASE INSTANCE orcc1 IN HOST MACHINE test183
PRIMARY RAC DATABASE INSTANCE orcc2 IN HOST MACHINE test184
PRIMARY RAC DATABASE INSTANCE orcc3 IN HOST MACHINE test185



CREATING A STANDBY DATABASE IN SERVER test188 WITH NAME STBYDB

ASSUMPTION:
Primary:

· The RAC Primary Database is in fully operating condition in Archivelog mode using ASM storage (shared location) as archivelog destination.
· The Primary Database is using ASM as Storage and OMFs.
· Listener LISTENER has already been created.

steps in primary database Servers:-
# Database must in Archivelog mode.
# Enable Force Logging.
# Create the Standby Redo logs.
# Create a password file for all instances( Password must same in all nodes).
# Update listener.ora file to include SID information on each node in cluster.
# Verify cluster Service is available.
# Verify TNSNAMES.ORA file.
# Modify init.ora Parameters For DataGuard Configuration.
# Create temporary directory to hold the RMAN backup of this database.
# Backup the Primary Database for Standby.
# copy the Primary Database backup to the standby database server to create standby database.

steps in Standby database server:-
# create required folders and directories.
# Modify the init.ora parameter on standby database.
# create a password file(Password must same as primary database instances)
# Update listener.ora file to include SID information
# Add required TNS entries for standby database on all servers.
# Verify TNSNAMES.ORA file.
# Create standby database.

[oracle@test183 dbs]$ . oraenv
ORACLE_SID = [black] ? orcc1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@test183 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Jan 22 03:41:53 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     16
Next log sequence to archive   17
Current log sequence           17
SQL> alter database force logging;

Database altered.

SQL> select instance_name,status from gv$instance;

INSTANCE_NAME         STATUS
---------------- ------------
orcc3                 OPEN
orcc2                 OPEN
orcc1                 OPEN


SQL> select name,db_unique_name,database_role from gv$database;

NAME          DB_UNIQUE_NAME                 DATABASE_ROLE
--------- ------------------------------ ----------------
ORCC          orcc                                 PRIMARY
ORCC          orcc                                 PRIMARY
ORCC          orcc                                 PRIMARY


IN PRIMARY DATABASE(any one of the node)
=====================================================================================

alter system set log_file_name_convert='+ARCH1/stbydb','+ARCH/orcc','+DATA1/stbydb','+DATA/orcc' scope=spfile sid='*";
alter system set db_file_name_convert='+DATA1/stbydb','+DATA/orcc' scope=spfile sid='*';
alter system set fal_client='orcc1' sid='orcc1';
alter system set fal_client='orcc2' sid='orcc2';
alter system set fal_client='orcc3' sid='orcc3';
alter system set fal_server='stbydb' sid='*';
alter system set log_archive_config='dg_config=(orcc,stbydb)' sid='*';
alter system set log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST  VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcc' sid='*';
alter system set log_archive_dest_state_2='ENABLE' sid='*';
alter system set log_archive_dest_2='SERVICE=stbydb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stbydb' sid='*';
alter system set log_archive_dest_3='LOCATION=+DATA/orcc/STANDBYLOG  VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=orcc' sid='*';
alter system set log_archive_dest_state_1='enable' sid='*';
alter system set log_archive_dest_state_3='enable' sid='*';
alter system set log_archive_max_processes=7 sid='*';
alter system set log_archive_min_succeed_dest=2 sid='*';
alter system set remote_login_passwordfile='EXCLUSIVE' scope=spfile sid='*';
alter system set standby_file_management='auto' sid='*';


[grid@test185 ~]$ srvctl stop database -d orcc
[grid@test185 ~]$ srvctl start database -d orcc
[grid@test185 ~]$ srvctl status database -d orcc
Instance orcc1 is running on node test183
Instance orcc2 is running on node test184
Instance orcc3 is running on node test185

[oracle@test183 trace]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 11 07:07:49 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> connect /as sysdba
Connected.
SQL> create pfile='/tmp/a.ora' from spfile;

File created.

SQL> host cat /tmp/a.ora
orcc1.__db_cache_size=369098752
orcc2.__db_cache_size=402653184
orcc3.__db_cache_size=436207616
orcc1.__java_pool_size=16777216
orcc2.__java_pool_size=16777216
orcc3.__java_pool_size=16777216
orcc1.__large_pool_size=16777216
orcc2.__large_pool_size=16777216
orcc3.__large_pool_size=16777216
orcc1.__pga_aggregate_target=436207616
orcc2.__pga_aggregate_target=436207616
orcc3.__pga_aggregate_target=436207616
orcc1.__sga_target=822083584
orcc2.__sga_target=822083584
orcc3.__sga_target=822083584
orcc1.__shared_io_pool_size=0
orcc2.__shared_io_pool_size=0
orcc3.__shared_io_pool_size=0
orcc1.__shared_pool_size=402653184
orcc2.__shared_pool_size=369098752
orcc3.__shared_pool_size=335544320
orcc1.__streams_pool_size=0
orcc2.__streams_pool_size=0
orcc3.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcc/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA/orcc/controlfile/current.260.835435621','+ARCH/orcc/controlfile/current.256.835435623'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_file_name_convert='+DATA1/stbydb','+DATA/orcc'
*.db_name='orcc'
*.db_recovery_file_dest='+ARCH'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orccXDB)'
orcc1.fal_client='orcc1'
orcc2.fal_client='orcc2'
orcc3.fal_client='orcc3'
*.fal_server='stbydb'
orcc1.instance_number=1
orcc2.instance_number=2
orcc3.instance_number=3
*.log_archive_config='dg_config=(orcc,stbydb)'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST  VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcc'
*.log_archive_dest_2='SERVICE=stbydb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stbydb'
*.log_archive_dest_3='LOCATION=+DATA/orcc/STANDBYLOG  VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=orcc'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_dest_state_3='enable'
*.log_archive_max_processes=7
*.log_archive_min_succeed_dest=2
*.log_file_name_convert='+ARCH1/stydb','+ARCH/orcc','+DATA1/stbydb','+DATA/orcc'
*.memory_target=1244659712
*.open_cursors=300
*.processes=150
*.remote_listener='scan-dgh:1521'
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='auto'
orcc2.thread=2
orcc1.thread=1
orcc3.thread=3
orcc2.undo_tablespace='UNDOTBS2'
orcc1.undo_tablespace='UNDOTBS1'
orcc3.undo_tablespace='UNDOTBS3'





SQL> select force_logging from v$database;

FOR
---
YES




[oracle@test183 dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwprimdb1 password=oracle force=y entries=5 ignorecase=y
[oracle@test183 dbs]$pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@test184 dbs]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@test184 dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwprimdb2 password=oracle entries=5 force=y ignorecase=y


[oracle@test185 dbs]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@test185 dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwprimdb2 password=oracle entries=5 force=y ignorecase=y

SQL> sho parameter password

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      EXCLUSIVE
SQL>

create standby logfile on primary database
=====================================================================================
SQL> col member for a56
SQL> select group#,member,type from v$logfile order by 1;



SQL> select group#,member,type from v$logfile order by 1;

    GROUP# MEMBER                                                    TYPE
---------- -------------------------------------------------------- -------
         1 +DATA/orcc/onlinelog/group_1.261.835435627                    ONLINE
         1 +ARCH/orcc/onlinelog/group_1.257.835435633                    ONLINE
         2 +DATA/orcc/onlinelog/group_2.262.835435635                    ONLINE
         2 +ARCH/orcc/onlinelog/group_2.258.835435639                    ONLINE
         3 +DATA/orcc/onlinelog/group_3.266.835436247                    ONLINE
         3 +ARCH/orcc/onlinelog/group_3.259.835436251                    ONLINE
         4 +DATA/orcc/onlinelog/group_4.267.835436255                    ONLINE
         4 +ARCH/orcc/onlinelog/group_4.260.835436257                    ONLINE
         5 +DATA/orcc/onlinelog/group_5.270.835520955                    ONLINE
         5 +ARCH/orcc/onlinelog/group_5.261.835520961                    ONLINE
         6 +DATA/orcc/onlinelog/group_6.271.835520965                    ONLINE
         6 +ARCH/orcc/onlinelog/group_6.262.835520969                    ONLINE

12 rows selected.




SQL> select group#,bytes from v$Log;

    GROUP#        BYTES
---------- ----------
         1   52428800
         2   52428800
         3   52428800
         4   52428800
         5   52428800
         6   52428800

6 rows selected.

SQL>
alter database add standby logfile thread 1
group 7 size 50M,
group 8 size 50M;

Database altered.

SQL> alter database add standby logfile thread 2
group 9 size 50M,
group 10 size 50M;

Database altered.


SQL> alter database add standby logfile thread 3
group 11 size 50M,
group 12 size 50M;



SQL> L      
  1* select group#,member ,type from v$Logfile order by 1
SQL> /

    GROUP# MEMBER                                                    TYPE
---------- -------------------------------------------------------- -------
         1 +DATA/orcc/onlinelog/group_1.261.835435627                    ONLINE
         1 +ARCH/orcc/onlinelog/group_1.257.835435633                    ONLINE
         2 +DATA/orcc/onlinelog/group_2.262.835435635                    ONLINE
         2 +ARCH/orcc/onlinelog/group_2.258.835435639                    ONLINE
         3 +DATA/orcc/onlinelog/group_3.266.835436247                    ONLINE
         3 +ARCH/orcc/onlinelog/group_3.259.835436251                    ONLINE
         4 +DATA/orcc/onlinelog/group_4.267.835436255                    ONLINE
         4 +ARCH/orcc/onlinelog/group_4.260.835436257                    ONLINE
         5 +DATA/orcc/onlinelog/group_5.270.835520955                    ONLINE
         5 +ARCH/orcc/onlinelog/group_5.261.835520961                    ONLINE
         6 +DATA/orcc/onlinelog/group_6.271.835520965                    ONLINE
         6 +ARCH/orcc/onlinelog/group_6.262.835520969                    ONLINE
         7 +DATA/orcc/onlinelog/group_7.272.898154223                    STANDBY
         7 +ARCH/orcc/onlinelog/group_7.292.898154229                    STANDBY
         8 +DATA/orcc/onlinelog/group_8.273.898154233                    STANDBY
         8 +ARCH/orcc/onlinelog/group_8.293.898154239                    STANDBY
         9 +DATA/orcc/onlinelog/group_9.274.898154269                    STANDBY
         9 +ARCH/orcc/onlinelog/group_9.294.898154275                    STANDBY
        10 +DATA/orcc/onlinelog/group_10.275.898154279                    STANDBY
        10 +ARCH/orcc/onlinelog/group_10.295.898154285                    STANDBY
        11 +DATA/orcc/onlinelog/group_11.276.898154301                    STANDBY
        11 +ARCH/orcc/onlinelog/group_11.296.898154309                    STANDBY
        12 +DATA/orcc/onlinelog/group_12.277.898154313                    STANDBY
        12 +ARCH/orcc/onlinelog/group_12.297.898154319                    STANDBY

24 rows selected.



create pfile for standby database
=====================================================================================
SQL> create pfile='$ORACLE_HOME/dbs/initstbydb.ora' from spfile;

File created.

SQL>

edit the required parameters

remove the red coloured lines for the standby database initstbydb.ora file
edit/change the blue coloured lines as per standby database required.

[oracle@test183 dbs]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@test183 dbs]$ cat initstbydb.ora
orcc1.__db_cache_size=369098752
orcc2.__db_cache_size=402653184
orcc3.__db_cache_size=436207616
orcc1.__java_pool_size=16777216
orcc2.__java_pool_size=16777216
orcc3.__java_pool_size=16777216
orcc1.__large_pool_size=16777216
orcc2.__large_pool_size=16777216
orcc3.__large_pool_size=16777216
orcc1.__pga_aggregate_target=436207616
orcc2.__pga_aggregate_target=436207616
orcc3.__pga_aggregate_target=436207616
orcc1.__sga_target=822083584
orcc2.__sga_target=822083584
orcc3.__sga_target=822083584
orcc1.__shared_io_pool_size=0
orcc2.__shared_io_pool_size=0
orcc3.__shared_io_pool_size=0
orcc1.__shared_pool_size=402653184
orcc2.__shared_pool_size=369098752
orcc3.__shared_pool_size=335544320
orcc1.__streams_pool_size=0
orcc2.__streams_pool_size=0
orcc3.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcc/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA/orcc/controlfile/current.260.835435621','+ARCH/orcc/controlfile/current.256.835435623'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_file_name_convert='+DATA1/stbydb','+DATA/orcc'
*.db_name='orcc'
*.db_recovery_file_dest='+ARCH'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orccXDB)'
orcc1.fal_client='orcc1'
orcc2.fal_client='orcc2'
orcc3.fal_client='orcc3'
*.fal_server='stbydb'
orcc1.instance_number=1
orcc2.instance_number=2
orcc3.instance_number=3
*.log_archive_config='dg_config=(orcc,stbydb)'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST  VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcc'
*.log_archive_dest_2='SERVICE=stbydb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stbydb'
*.log_archive_dest_3='LOCATION=+DATA/orcc/STANDBYLOG  VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=orcc'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_dest_state_3='enable'
*.log_archive_max_processes=7
*.log_archive_min_succeed_dest=2
*.log_file_name_convert='+ARCH1/stydb','+ARCH/orcc','+DATA1/stbydb','+DATA/orcc'
*.memory_target=1244659712
*.open_cursors=300
*.processes=150
*.remote_listener='scan-dgh:1521'
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='auto'
orcc2.thread=2
orcc1.thread=1
orcc3.thread=3
orcc2.undo_tablespace='UNDOTBS2'
orcc1.undo_tablespace='UNDOTBS1'
orcc3.undo_tablespace='UNDOTBS3'










*************************************************************************************
after editing the initstbydb.ora file
*************************************************************************************

[oracle@test183 dbs]$ cat initstbydb.ora
db_cache_size=369098752
java_pool_size=16777216
large_pool_size=16777216
pga_aggregate_target=436207616
sga_target=822083584
shared_pool_size=402653184
streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcc/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='+DATA1/stbydb/controlfile/control01.ctl'
*.db_block_size=8192
*.db_create_file_dest='+DATA1'
*.db_domain=''
*.db_file_name_convert='+DATA/orcc','+DATA1/stbydb'
*.db_name='orcc'
*.db_unique_name='stbydb'
*.db_recovery_file_dest='+ARCH1'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=stbydbXDB)'
*.fal_server='orcc'
*.log_archive_config='dg_config=(orcc,stbydb)'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST  VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=stbydb'
*.log_archive_dest_2='SERVICE=orcc LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcc'
*.log_archive_dest_3='LOCATION=+DATA1/stbydb/STANDBYLOG  VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=stbydb'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='defer'
*.log_archive_dest_state_3='enable'
*.log_archive_max_processes=7
*.log_archive_min_succeed_dest=2
*.log_file_name_convert='+ARCH/orcc','+ARCH1/stbydb','+DATA/orcc','+DATA1/stbydb'
*.memory_target=1244659712
*.open_cursors=300
*.processes=150
*.remote_listener='test188:1521'
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='auto'
undo_tablespace='UNDOTBS1'
SEC_CASE_SENSITIVE_LOGON=FALSE
================================================================================

create required folder for stbydb database and also add an entry in the /etc/oratab for stbydb database ,
create a password file for stbydb database.(must have similar password like primary RAC database )
add required tns entries in the tnsnames.ora and listener entry in the listener.ora file
take a RMAN backup of target database and target database controlfile from any one of the rac node
and scp the backup to the standby database host machine to create standby database.

*************************************************************************************

[oracle@test183 backup]$ pwd
/u01/app/oracle/backup
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle
[oracle@test183 oracle]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Fri Dec 11 07:38:40 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCC (DBID=904043557)

RMAN> configure channel device type disk format '/u01/app/oracle/backup/%U';

using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/u01/app/oracle/backup/%U';
new RMAN configuration parameters are successfully stored

RMAN> backup as compressed backupset database plus archivelog;


RMAN> backup current controlfile for standby;

RMAN> backup archivelog all;


creating directories
=====================================================

[oracle@test188 dbs]$ mkdir -p /u01/app/oracle/admin/orcc/adump
[oracle@test188 dbs]$ mkdir -p /u01/app/oracle/backup

[root@test188 ~]# su - grid
[grid@test188 ~]$ asmcmd
ASMCMD> ls
ARCH1/
DATA1/
ASMCMD> cd data1
ASMCMD> mkdir STBYDB
ASMCMD> cd STBYDB
ASMCMD> mkdir ARCHIVELOG CONTROLFILE DATAFILE ONLINELOG PARAMETERFILE STANDBYLOG TEMPFILE
ASMCMD> ls
ARCHIVELOG/
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
STANDBYLOG/
TEMPFILE/
ASMCMD>
ASMCMD> pwd
+
ASMCMD> cd arch1
ASMCMD> ls
ASMCMD> mkdir STBYDB
ASMCMD> cd STBYDB
ASMCMD> mkdir ARCHIVELOG CONTROLFILE  ONLINELOG
ASMCMD>


create password file for standby database.
[oracle@test188 ~]$ cd $ORACLE_HOME/dbs
[oracle@test188 dbs]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@test188 dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwstbydb password=oracle entries=5 ignorecase=y


copy the backup to standby server.
[oracle@test183 backup]$ ls -ltr
total 290584
-rw-r----- 1 oracle oinstall   4157952 Jan 22 04:38 01n1cg5n_1_1
-rw-r----- 1 oracle oinstall 259842048 Jan 22 04:40 02n1cg5t_1_1
-rw-r----- 1 oracle oinstall   1114112 Jan 22 04:40 03n1cg9g_1_1
-rw-r----- 1 oracle oinstall    157184 Jan 22 04:40 04n1cg9u_1_1
-rw-r----- 1 oracle oinstall  18546688 Jan 22 04:46 05n1cglv_1_1
-rw-r----- 1 oracle oinstall  13416448 Jan 22 04:47 06n1cgn8_1_1
[oracle@test183 backup]$ scp * oracle@test188:/u01/app/oracle/backup/
01n1cg5n_1_1                                                100% 4061KB   4.0MB/s   00:00  
02n1cg5t_1_1                                                100%  248MB   4.3MB/s   00:58  
03n1cg9g_1_1                                                100% 1088KB   1.1MB/s   00:00  
04n1cg9u_1_1                                                100%  154KB 153.5KB/s   00:00  
05n1cglv_1_1                                                100%   18MB   2.0MB/s   00:09  
06n1cgn8_1_1                                                100%   13MB   2.6MB/s   00:05  
[oracle@test183 backup]$ pwd
/u01/app/oracle/backup
[oracle@test183 backup]$


add an entry in the /etc/oratab file
vi /etc/oratab
stbydb:/u01/app/oracle/product/11.2.0/db_1:N


add tns entry in all nodes

example:

[oracle@test183 backup]$ cd /u01/app/oracle/product/11.2.0/db_1/network/admin/
[oracle@test183 admin]$ vi tnsnames.ora
ORCC =
(DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = scan-dgh)(PORT = 1521))
  (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcc)
  )
)

STBYDB =
(DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = test188)(PORT = 1521))
  (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = stbydb)
  )
)

主库监听:

[grid@test183 admin]$ more listener.ora
# listener.ora Network Configuration File: /u01/app/11.2.0/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON

SID_LIST_LISTENER_SCAN1 =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = orcc)
      (ORACLE_HOME = /u01/app/11.2.0/grid)
      (SID_NAME = orcc)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER))
  )

ADR_BASE_LISTENER = /u01/app/grid

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON

LISTENER_SCAN1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1))
  )

ADR_BASE_LISTENER_SCAN1 = /u01/app/grid

grid:lsnrctl reload
grid:lsnrctl status

[oracle@test183 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 11-DEC-2015 08:41:52

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                11-DEC-2015 06:41:00
Uptime                    0 days 2 hr. 0 min. 53 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/test183/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.183)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.141)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "orcc" has 1 instance(s).
  Instance "orcc1", status READY, has 1 handler(s) for this service...
Service "orccXDB" has 1 instance(s).
  Instance "orcc1", status READY, has 1 handler(s) for this service...
The command completed successfully




备库监听:

[grid@test188 admin]$ pwd
/u01/app/11.2.0/grid/network/admin
[grid@test188 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/11.2.0/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = stbydb)
      (ORACLE_HOME = /u01/app/11.2.0/grid)
      (SID_NAME = stbydb)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = test188)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/grid

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON


[grid@test188 admin]$ lsnrctl reload
[grid@test188 admin]$ lsnrctl status
[grid@test188 admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 11-DEC-2015 08:25:50

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test188)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                11-DEC-2015 08:22:32
Uptime                    0 days 0 hr. 3 min. 19 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/test188/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test188)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "stbydb" has 1 instance(s).
  Instance "stbydb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

[oracle@test183 ~]$ tnsping orcc

TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 11-DEC-2015 08:42:26

Copyright (c) 1997, 2011, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = scan-dgh)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcc)))
OK (0 msec)
[oracle@test183 ~]$ tnsping stbydb

TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 11-DEC-2015 08:42:30

Copyright (c) 1997, 2011, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test188)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = stbydb)))
OK (0 msec)




[oracle@test188 ~]$ tnsping orcc

TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 11-DEC-2015 08:43:46

Copyright (c) 1997, 2011, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = scan-dgh)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcc)))
OK (0 msec)
[oracle@test188 ~]$ tnsping stbydb

TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 11-DEC-2015 08:43:54

Copyright (c) 1997, 2011, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test188)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = stbydb)))
OK (0 msec)



+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

start the standby database in nomount mode

[oracle@test188 ~]$ vi .bash_profile
[oracle@test188 ~]$ source .bash_profile
[oracle@test188 ~]$ echo $ORACLE_SID
stbydb

[oracle@test183 dbs]$ ls
hc_orcc1.dat  init.ora  initorcc1.ora  initstbydb.ora  orapworcc1  snapcf_orcc1.f
[oracle@test183 dbs]$ scp initstbydb.ora test188:`pwd`
oracle@test188's password:
initstbydb.ora
[oracle@test188 ~]$ cd $ORACLE_HOME/dbs
[oracle@test188 dbs]$ ls
hc_orcc.dat  init.ora  initorcc.ora  initorcc.ora.bak  initstbydb.ora  lkORCC  orapwstbydb


[oracle@test188 dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 11 09:14:10 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 1252663296 bytes
Fixed Size                    2227944 bytes
Variable Size                  872415512 bytes
Database Buffers          369098752 bytes
Redo Buffers                    8921088 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle
[oracle@test188 dbs]$ rman target sys/oracle@ORCC auxiliary /

Recovery Manager: Release 11.2.0.3.0 - Production on Fri Dec 11 09:16:22 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCC (DBID=904043557)
connected to auxiliary database: ORCC (not mounted)

RMAN>

RMAN> duplicate target database for standby nofilenamecheck;


[oracle@test188 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 11 10:47:37 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> connect /as sysdba
Connected.
SQL> show parameter log_archive_dest_2_stat2
SQL> show parameter log_archive_dest_2

NAME                                     TYPE         VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                     string         SERVICE=orcc LGWR ASYNC VALID_
                                                 FOR=(ONLINE_LOGFILES,PRIMARY_R
                                                 OLE) DB_UNIQUE_NAME=orcc
log_archive_dest_20                     string
log_archive_dest_21                     string
log_archive_dest_22                     string
log_archive_dest_23                     string
log_archive_dest_24                     string
log_archive_dest_25                     string
log_archive_dest_26                     string
log_archive_dest_27                     string

NAME                                     TYPE         VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_28                     string
log_archive_dest_29                     string
SQL> show parameter log_archive_dest_state


NAME                                     TYPE         VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2             string         defer

SQL>  alter system set log_archive_dest_state_2=enable;

System altered.


SQL> alter system set log_archive_dest_state_2=enable;

System altered.

SQL>

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

Database altered.
*************************************************************************************

alert log file inforamtion

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Using STANDBY_ARCHIVE_DEST parameter default value as +DATA/stbydb/standbylog
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=MEMORY;
Sun Jan 22 05:52:53 2012
alter database recover managed standby database disconnect from session
Attempt to start background Managed Standby Recovery process (stbydb)
Sun Jan 22 05:52:53 2012
MRP0 started with pid=29, OS id=5844
MRP0: Background Managed Standby Recovery process started (stbydb)
Serial Media Recovery started
Managed Standby Recovery not using Real Time Apply
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Waiting for thread 1 sequence 29
Completed: alter database recover managed standby database disconnect from session

Sun Jan 22 05:54:16 2012
alter database recover managed standby database cancel
Sun Jan 22 05:54:17 2012
MRP0: Background Media Recovery cancelled with status 16037
Errors in file /u01/app/oracle/diag/rdbms/stbydb/stbydb/trace/stbydb_mrp0_5844.trc:
ORA-16037: user requested cancel of managed recovery operation
Recovery interrupted!
Waiting for MRP0 pid 5844 to terminate
Errors in file /u01/app/oracle/diag/rdbms/stbydb/stbydb/trace/stbydb_mrp0_5844.trc:
ORA-16037: user requested cancel of managed recovery operation
MRP0: Background Media Recovery process shutdown (stbydb)
Managed Standby Recovery Canceled (stbydb)
Completed: alter database recover managed standby database cancel


ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION
Attempt to start background Managed Standby Recovery process (stbydb)
Sun Jan 22 05:56:07 2012
MRP0 started with pid=29, OS id=6135
MRP0: Background Managed Standby Recovery process started (stbydb)
Serial Media Recovery started
Managed Standby Recovery starting Real Time Apply
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Waiting for thread 1 sequence 29
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION



Completed: ALTER DATABASE   MOUNT
Errors in file /u01/app/oracle/diag/rdbms/stbydb/stbydb/trace/stbydb_arc1_6584.trc:
ORA-01017: invalid username/password; logon denied
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
    returning error ORA-16191
------------------------------------------------------------
FAL[client, ARC1]: Error 16191 connecting to primdb for fetching gap sequence
Errors in file /u01/app/oracle/diag/rdbms/stbydb/stbydb/trace/stbydb_arc1_6584.trc:
ORA-16191: Primary log shipping client not logged on standby
Errors in file /u01/app/oracle/diag/rdbms/stbydb/stbydb/trace/stbydb_arc1_6584.trc:
ORA-16191: Primary log shipping client not logged on standby
ARC6: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE

work around:-
======================================

create password file again on both rac node database and also on standby database

[oracle@test183 dbs]$ orapwd file=$ORACLE_HOME/dbs/orapworcc1 password=oracle ignorecase=y force=y entries=5
[oracle@test184 dbs]$ orapwd file=$ORACLE_HOME/dbs/orapworcc2 password=oracle ignorecase=y force=y entries=5
[oracle@test184 dbs]$ orapwd file=$ORACLE_HOME/dbs/orapworcc2 password=oracle ignorecase=y force=y entries=5

[oracle@test188 dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwstbydb password=oracle ignorecase=y force=y entries=5

add the parameter on all databases
SEC_CASE_SENSITIVE_LOGON=FALSE      
SQL> show parameter SEC_CASE_SENSITIVE_LOGON

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon             boolean     FALSE


SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     0
Next log sequence to archive   0
Current log sequence           0

SQL> shu immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@test188 dbs]$ vi initstbydb.ora
[oracle@test188 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Jan 22 05:59:26 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area  870457344 bytes
Fixed Size                  1339964 bytes
Variable Size             335547844 bytes
Database Buffers          528482304 bytes
Redo Buffers                5087232 bytes
Database mounted.
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     0
Next log sequence to archive   0
Current log sequence           0
SQL> show parameter SEC_CASE_SENSITIVE_LOGON=FALSE      
SQL> show parameter SEC_CASE_SENSITIVE_LOGON

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon             boolean     FALSE
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     0
Next log sequence to archive   0
Current log sequence           0
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

Database altered.

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     0
Next log sequence to archive   0
Current log sequence           0
SQL> shu immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area  870457344 bytes
Fixed Size                  1339964 bytes
Variable Size             335547844 bytes
Database Buffers          528482304 bytes
Redo Buffers                5087232 bytes
Database mounted.
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     37
Next log sequence to archive   0
Current log sequence           38
SQL>


verification
=============================================

(on primary database)

SQL> create tablespace new datafile size 2m;



SQL> select name from v$tablespace;

NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
USERS
TEMP
UNDOTBS2
NEW

7 rows selected.


(on standby database)

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     39
Next log sequence to archive   0
Current log sequence           40
SQL> select name from v$tablespace;

NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
USERS
TEMP
UNDOTBS2

6 rows selected.

SQL> alter database recover managed standby database disconnect from session;

Database altered.


(on both RAC primary instances)

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.


SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     39
Next log sequence to archive   0
Current log sequence           40
SQL> alter database recover managed standby database cancel;

Database altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     39
Next log sequence to archive   0
Current log sequence           40
SQL> select name from v$tablespace;

NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
USERS
TEMP
UNDOTBS2
NEW

7 rows selected.

SQL> select name,db_unique_name,database_role from v$database;

NAME      DB_UNIQUE_NAME                 DATABASE_ROLE
--------- ------------------------------ ----------------
PRIMDB    stbydb                         PHYSICAL STANDBY

Thanks and Regards,
Rajesh Kumar Govindarajan.
references:-
http://www.oracledba.org/10g/dr/10gR2_dataguard_RAC_to_RAC.html
http://jhdba.wordpress.com/2008/ ... aguard-and-streams/
http://www.dba-oracle.com/t_ora_ ... on_standby_tips.htm
POSTED BY RAJESHKUMAR GOVINDARAJAN AT SUNDAY, JANUARY 22, 2012  
LABELS: DATAGUARD, RAC CONCEPTS
3 COMMENTS:

Swathi said...
Hi,
Can you please explain the background processes (GCS, GES, LMON, LMD, LCK0 etc) in brief and in a simple language.

FEBRUARY 15, 2012 AT 1:41 AM
Rajeshkumar Govindarajan said...
hi swathi,

please refer the below links:-
http://dbaregistry.blogspot.in/2 ... view-questions.html
http://www.datadisk.co.uk/html_docs/rac/architecture.htm

still you have doubts, please email me. grk.oracle@gmail.com

Thanks and Regards,
Rajesh Kumar Govindarajan

FEBRUARY 27, 2012 AT 4:52 AM
easyoradba.com said...
Hi ,

This is an excellent post. If interested I have my own blog on easyoradba.com

NOVEMBER 20, 2012 AT 11:30 PM
Post a Comment







问题及处理:


RMAN> duplicate target database for standby nofilenamecheck;

Starting Duplicate Db at 11-DEC-2015 10:22:40
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=24 device type=DISK

contents of Memory Script:
{
   restore clone standby controlfile;
}
executing Memory Script

Starting restore at 11-DEC-2015 10:22:41
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/backup/0gqohq18_1_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/11/2015 10:23:47
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-10038: database session for channel ORA_AUX_DISK_1 terminated unexpectedly

asm 日志报错如下:

NOTE: Loaded library: System
ORA-15025: could not open disk "/dev/asm-diskb"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
Fri Dec 11 10:22:42 2015
SUCCESS: diskgroup DATA1 was mounted
Errors in file /u01/app/oracle/diag/rdbms/stbydb/stbydb/trace/stbydb_ora_30147.trc  (incident=3803):
ORA-00600: internal error code, arguments: [kfioTranslateIO03], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/rdbms/stbydb/stbydb/incident/incdir_3803/stbydb_ora_30147_i3803.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Fri Dec 11 10:22:43 2015
Dumping diagnostic data in directory=[cdmp_20151211102243], requested by (instance=1, osid=30147), summary=[incident=3803].
Errors in file /u01/app/oracle/diag/rdbms/stbydb/stbydb/trace/stbydb_ora_30147.trc  (incident=3804):
ORA-00600: internal error code, arguments: [17090], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/rdbms/stbydb/stbydb/incident/incdir_3804/stbydb_ora_30147_i3804.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
ERROR: unrecoverable error ORA-600 raised in ASM I/O path; terminating process 30147
Dumping diagnostic data in directory=[cdmp_20151211102244], requested by (instance=1, osid=30147), summary=[incident=3804].
Fri Dec 11 10:22:45 2015
Sweep [inc][3804]: completed
Sweep [inc][3803]: completed
Sweep [inc2][3804]: completed
Sweep [inc2][3803]: completed
Fri Dec 11 10:23:48 2015
SUCCESS: diskgroup DATA1 was dismounted

查看共享盘权限:

[grid@test188 ~]$ cd /dev
[grid@test188 dev]$ ls -l asm*
brw-rw---- 1 grid asmadmin 8, 17 Dec 11 10:30 asm-diskb
brw-rw---- 1 grid asmadmin 8, 33 Dec 11 10:30 asm-diskc


[root@test188 backup]# ls -l /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
-rwsr-s--x 1 oracle oinstall 232399473 Oct  8 10:13 /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
[root@test188 backup]# su - grid
[grid@test188 ~]$ /u01/app/11.2.0/grid/bin/setasmgidwrap o=/u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
[grid@test188 ~]$ ls -l /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
-rwsr-s--x 1 oracle asmadmin 232399473 Oct  8 10:13 /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle

再次尝试,正常,问题解决。

参考文章:
[原]ORA-15025, ORA-27041
2013-8-28阅读468 评论0

升级11.2.0.3.0的单实例grid到11.2.0.3.7的时候由于没有成功在打开db的时候报错如下:

[15:27:54]SQL> startup
[15:27:57]ORACLE instance started.
[15:28:06]
[15:28:06]Total System Global Area 2137886720 bytes
[15:28:06]Fixed Size                  2230072 bytes
[15:28:06]Variable Size            1124075720 bytes
[15:28:06]Database Buffers         1006632960 bytes
[15:28:06]Redo Buffers                4947968 bytes
[15:28:12]ORA-03113: end-of-file on communication channel
[15:28:12]Process ID: 13046
[15:28:12]Session ID: 125 Serial number: 3

在看alert日志报错如下:

ALTER DATABASE   MOUNT
NOTE: Loaded library: System
ORA-15025: could not open disk "/dev/asm-diskb"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-diskc"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-diskd"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-15025: could not open disk "/dev/asm-diske"
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
SUCCESS: diskgroup DATA was mounted
NOTE: dependency between database zxy and diskgroup resource ora.DATA.dg is established
Errors in file /u01/app/oracle/diag/rdbms/zxy/zxy/trace/zxy_ckpt_29080.trc  (incident=54097):
ORA-00600: internal error code, arguments: [kfioTranslateIO03], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/rdbms/zxy/zxy/incident/incdir_54097/zxy_ckpt_29080_i54097.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Wed Aug 28 17:13:30 2013
Sweep [inc][52898]: completed
Sweep [inc][52897]: completed
Sweep [inc2][52898]: completed
Sweep [inc2][52897]: completed
Errors in file /u01/app/oracle/diag/rdbms/zxy/zxy/trace/zxy_ckpt_29080.trc  (incident=54098):
ORA-00600: internal error code, arguments: [17090], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/rdbms/zxy/zxy/incident/incdir_54098/zxy_ckpt_29080_i54098.trc
Dumping diagnostic data in directory=[cdmp_20130828171332], requested by (instance=1, osid=29080 (CKPT)), summary=[incident=54097].
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
ERROR: unrecoverable error ORA-600 raised in ASM I/O path; terminating process 29080
Dumping diagnostic data in directory=[cdmp_20130828171333], requested by (instance=1, osid=29080 (CKPT)), summary=[incident=54098].
PMON (ospid: 29058): terminating the instance due to error 469

首先是磁盘没有权限打不开,而且下面也有600的错误还是先解决权限的问题吧:

[grid@11gasm dev]$ ls -l asm*
brw-rw---- 1 grid asmadmin 8, 16 Aug 28 18:15 asm-diskb
brw-rw---- 1 grid asmadmin 8, 32 Aug 28 18:15 asm-diskc
brw-rw---- 1 grid asmadmin 8, 48 Aug 28 18:15 asm-diskd
brw-rw---- 1 grid asmadmin 8, 64 Aug 28 18:15 asm-diske
brw-rw---- 1 grid asmadmin 8, 80 Aug 28 18:15 asm-diskf

查看/bin/oracle的用户和组:

[grid@11gasm ~]$ ls -l /u01/app/oracle/product/11.2.0/db_1/bin/oracle
-rwxr-s--x 1 oracle oinstall 232617576 Aug 28 14:14 /u01/app/oracle/product/11.2.0/db_1/bin/oracle

可以看到其用户组是oinstall与设备的组权限不一样,接着执行下面的命令:

[grid@11gasm ~]$ /u01/app/11.2.0/grid/bin/setasmgidwrap o=/u01/app/oracle/product/11.2.0/db_1/bin/oracle

可以看到已经改变成asmadmin了:

[grid@11gasm ~]$ ls -l /u01/app/oracle/product/11.2.0/db_1/bin/oracle
-rwxr-s--x 1 oracle asmadmin 232617576 Aug 28 14:14 /u01/app/oracle/product/11.2.0/db_1/bin/oracle

尝试打开db也能正常的打开了,可怕的600错误也消失了。


Time Drift Detected tips

Oracle Tips by Burleson Consulting

November 3, 2012

Question:  I have just migrated database to 11.2 but I'm getting following message in alert log file:

"Time drift detected. Please check VKTM trace file for more details."

How to I get rid of this "Time Drift Detected" message?

Answer:  The "Time drift" error is a "noise" message which can be ignored, and it is fixed in 11.2.0.2.  

- Time Drift Detected. Please Check Vktm Trace File For More Details. [ID 1347586.1]

- Bug 11837095 - "time drift detected" appears intermittently in alert log [ID 11837095.8]

To fix the "time drift detected" message, please download and apply patch 11837095 if available for your release/platform or upgrade to 11.2.0..2.



参数文件:


rac:

SQL> host cat /tmp/a.ora
orcc3.__db_cache_size=436207616
orcc2.__db_cache_size=402653184
orcc1.__db_cache_size=369098752
orcc3.__java_pool_size=16777216
orcc2.__java_pool_size=16777216
orcc1.__java_pool_size=16777216
orcc3.__large_pool_size=16777216
orcc2.__large_pool_size=16777216
orcc1.__large_pool_size=16777216
orcc3.__pga_aggregate_target=436207616
orcc2.__pga_aggregate_target=436207616
orcc1.__pga_aggregate_target=436207616
orcc3.__sga_target=822083584
orcc2.__sga_target=822083584
orcc1.__sga_target=822083584
orcc3.__shared_io_pool_size=0
orcc2.__shared_io_pool_size=0
orcc1.__shared_io_pool_size=0
orcc3.__shared_pool_size=335544320
orcc2.__shared_pool_size=369098752
orcc1.__shared_pool_size=402653184
orcc3.__streams_pool_size=0
orcc2.__streams_pool_size=0
orcc1.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcc/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.0.0'
*.control_files='+DATA/orcc/controlfile/current.260.835435621','+ARCH/orcc/controlfile/current.256.835435623'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_file_name_convert='+DATA1/stbydb','+DATA/orcc'
*.db_name='orcc'
*.db_recovery_file_dest='+ARCH'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orccXDB)'
orcc1.fal_client='orcc1'
orcc2.fal_client='orcc2'
orcc3.fal_client='orcc3'
*.fal_server='stbydb'
orcc1.instance_number=1
orcc2.instance_number=2
orcc3.instance_number=3
*.log_archive_config='dg_config=(orcc,stbydb)'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST  VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcc'
*.log_archive_dest_2='SERVICE=stbydb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stbydb'
*.log_archive_dest_3='LOCATION=+DATA/orcc/STANDBYLOG  VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=orcc'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_dest_state_3='enable'
*.log_archive_max_processes=7
*.log_archive_min_succeed_dest=2
*.log_file_name_convert='+ARCH1/stbydb','+ARCH/orcc'
*.memory_target=1244659712
*.open_cursors=300
*.processes=150
*.remote_listener='scan-dgh:1521'
*.remote_login_passwordfile='EXCLUSIVE'
*.sec_case_sensitive_logon=FALSE
*.standby_file_management='auto'
orcc2.thread=2
orcc1.thread=1
orcc3.thread=3
orcc2.undo_tablespace='UNDOTBS2'
orcc1.undo_tablespace='UNDOTBS1'
orcc3.undo_tablespace='UNDOTBS3'

单实例:


SQL> host cat initstbydb.ora            
db_cache_size=369098752
java_pool_size=16777216
large_pool_size=16777216
pga_aggregate_target=436207616
sga_target=822083584
shared_pool_size=402653184
streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcc/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='+DATA1/stbydb/controlfile/control01.ctl'
*.db_block_size=8192
*.db_create_file_dest='+DATA1'
*.db_domain=''
*.db_file_name_convert='+DATA/orcc','+DATA1/stbydb'
*.db_name='orcc'
*.db_unique_name='stbydb'
*.db_recovery_file_dest='+ARCH1'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=stbydbXDB)'
*.fal_server='orcc'
*.log_archive_config='dg_config=(orcc,stbydb)'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST  VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=stbydb'
*.log_archive_dest_2='SERVICE=orcc LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcc'
*.log_archive_dest_3='LOCATION=+DATA1/stbydb/STANDBYLOG  VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=stbydb'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='defer'
*.log_archive_dest_state_3='enable'
*.log_archive_max_processes=7
*.log_archive_min_succeed_dest=2
*.log_file_name_convert='+ARCH/orcc','+ARCH1/stbydb'
*.memory_target=1244659712
*.open_cursors=300
*.processes=150
*.remote_listener='test188:1521'
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='auto'
undo_tablespace='UNDOTBS1'
SEC_CASE_SENSITIVE_LOGON=FALSE
标签: 暂无标签
dongxujian

写了 86 篇文章,拥有财富 384,被 13 人关注

转播转播 分享分享 分享淘帖
回复

使用道具

成为第一个吐槽的人

您需要登录后才可以回帖 登录 | 加入社区

本版积分规则

意见
反馈