You are on page 1of 12

ORACLE DBA

HAPPINESS IS REAL WHEN SHARED


Home About Me Useful Queries Useful Scripts Disclaimer In sweet memories of my ever loving brother "kutty thambi " ARUN KUMAR
MONDAY, FEBRUARY 27, 2012

Step by Step document to Create Physical Standby Database from Active Database using RMAN
Step by step document to create a physical standby database using RMAN DUPLICATE FROM ACTIVE DATABASE command without shutting down the primary and using primary active database files (No need to take backup) Database Name :- WHITE Primary db_unique_name :- WHITE standby db_unique_name :- BLACK Primary Database Server Name :- DC1 Standby Database Server Name :- DC2

all documents have been done in my testing environment. If you find any mistakes, please inform me to rectify my mistakes. Thanks for reading my blog post and your appreciation. Rajeshkumar Govindarajan. "knowing is knowledge"

"Do something (anything). If you don't do anything, you won't get anywhere. Make it your hobby, not a chore, but above all have fun!"

GOOGLE BLOG SEARCH

Steps:1.Make the necessary changes to the primary database. a. Enable force logging. b. Creating the password file if one does not exist. c. Create standby redologs. d. Modify the parameter file suitable for Dataguard. e. Change the database to archivelog mode if it is in no archivelog mode. 2. Ensure that the sql*net connectivity is working fine. ----if not add an entry for database in TNSNAMES.ORA and LISTENER.ORA file for primary and standby database. 3. Create the standby database over the network using the active(primary) database files. a.create a password file for standby database The username is required to be SYS and the password needs to be the same on the Primary and Standby. The password file name must match the instance name/SID used at the standby site, not the DB_NAME. b. Create the initialization parameter file for the standby database (auxiliary database) c. Create the necessary mount points or the folders for the database files d. Run the standby creation ON STANDBY by connecting to primary as target database.

Loading...

ARCHIVES

2012 (6) September (1) May (1) February (1) Step by Step document to Create Physical Standby D... January (3) 2011 (7) 2010 (46) 2009 (58)

RMAN> run { allocate channel prmy1 type disk; allocate channel prmy2 type disk; allocate channel prmy3 type disk; allocate channel prmy4 type disk; allocate auxiliary channel stby type disk; duplicate target database for standby from active database spfile parameter_value_convert 'white','black' set db_unique_name='black' set db_file_name_convert='/white/','/black/' set log_file_name_convert='/white/','/black/' set control_files='+DATA/black/controlfile/control01.ctl' set log_archive_max_processes='5' set fal_client='black' set fal_server='white' set standby_file_management='AUTO' set log_archive_config='dg_config=(white,black)' set log_archive_dest_1='service=white ASYNC valid_for= BDUMP, UDUMP, ALERT LOG FILES IN ORACLE 11G Step by Step, document for creating Physical Standby Database, 10g DATA GUARD Oracle 10gR2 RAC Installation in Linux 5, RHEL5 using VMware Server2
POPULAR POSTS

defeat the defeat before defeat defeats you. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.

Generated with www.html-to-pdf.net

Page 1 / 12

(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=white' ; } ORA-00283: ORA-00314: ORA-00312: Error and solution 4. Check the log shipping and apply. -create lost controlfile Demo:Configuration of 10g Data Guard Broker and Observer for Switchover SQL> alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(white,black)'; SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=+DATA/archivelog/white/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=white'; SQL> alter system set LOG_ARCHIVE_DEST_2='SERVICE=black LGWR ASYNC VALID_FOR= (ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=black'; SQL> alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE; SQL> alter system set FAL_SERVER=black; SQL> alter system set FAL_CLIENT=white; SQL> alter system set DB_FILE_NAME_CONVERT='+DATA/black/datafile/','+DATA/white/datafile/','+DATA/black/te mpfile/','+DATA/white/tempfile/' scope=spfile; SQL> alter system set LOG_FILE_NAME_CONVERT='+DATA/black/onlinelog/','+DATA/white/onlinelog/' scope=spfile; SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=+DATA/archivelog/white/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=white'; SQL> alter system set LOG_ARCHIVE_DEST_2='SERVICE=black LGWR ASYNC VALID_FOR= (ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=black'; SQL> alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE; SQL> alter system set FAL_SERVER=black; SQL> alter system set FAL_CLIENT=white; SQL> alter system set DB_FILE_NAME_CONVERT='+DATA/black/datafile/','+DATA/white/datafile/','+DATA/black/te mpfile/','+DATA/white/tempfile/' scope=spfile; SQL> alter system set LOG_FILE_NAME_CONVERT='+DATA/black/onlinelog/','+DATA/white/onlinelog/' scope=spfile; System altered. SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Current log sequence FOR --NO SQL> Alter database force logging; SQL> select force_logging from v$database; FOR --YES SQL> select log_mode from v$database; LOG_MODE -----------NOARCHIVELOG SQL> select name,database_role,db_unique_name from v$database; NAME WHITE NAME -------------------------------------------------------------------------------+DATA/white/datafile/system.324.776321695 +DATA/white/datafile/sysaux.337.776321703 DATABASE_ROLE PRIMARY DB_UNIQUE_NAME white --------- ---------------- -----------------------------SQL> select name from v$datafile; No Archive Mode Disabled /u01/app/oracle/product/11.2.0/db_1/dbs/arch 13 15
LABELS HELP CHILDREN AND ORPHANS FOLLOWERS SUBSCRIBE VIA EMAIL

Recover a Dropped or Deleted Table Using RMAN Backup

ORA-01591: lock held by in-doubt distributed transaction RMAN-03002: failure of Duplicate Db command RMAN-03015: error occurred in stored script Memory Script RMAN-06053: RMAN-06025 SYSAUX datafile or tablespace corrupted or lost no backup available

Subscribe to oracle dba by Email

9I concepts 10g concepts RAC CONCEPTS rman


dataguard CLUSTERWARE
11g
Database

SQL> select force_logging from v$database;

concepts Cloning Installation OCR


creation Upgradation and Migration

Generated with www.html-to-pdf.net

Page 2 / 12

+DATA/white/datafile/undotbs1.336.776321707 +DATA/white/datafile/users.335.776321707 SQL> col member for a65 SQL> select a.member,b.bytes/1024/1024 from v$Logfile a,v$log b where a.group#=b.group#; MEMBER ----------------------------------------------------------------B.BYTES/1024/1024 ----------------+DATA/white/onlinelog/group_3.302.776321951 5 +DATA/white/onlinelog/group_2.322.776321951 5 +DATA/white/onlinelog/group_1.311.776321949 5 SQL> select name from v$tempfile; NAME --------------------------------------------------+DATA/white/tempfile/temp.321.776321963 Adding standby redolog files. SQL> alter database add standby logfile size 5m; Database altered. SQL> alter database add standby logfile size 5m; Database altered. SQL> alter database add standby logfile size 5m; Database altered. SQL> alter database add standby logfile size 5m; Database altered. SQL> col member for a56 SQL> select member,type from v$logfile; MEMBER +DATA/white/onlinelog/group_3.302.776321951 +DATA/white/onlinelog/group_2.322.776321951 +DATA/white/onlinelog/group_1.311.776321949 +DATA/white/onlinelog/group_4.358.776324285 +DATA/white/onlinelog/group_5.456.776324299 +DATA/white/onlinelog/group_6.331.776324299 +DATA/white/onlinelog/group_7.318.776324301 7 rows selected. SQL> follow the below steps, if your database is in no archivelog, or else no need to shutdown the database ======================================================== SQL> shu immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 1456349184 bytes Fixed Size Variable Size Database Buffers Redo Buffers Database mounted. SQL> alter database archivelog; Database altered. SQL> alter database open; Database altered. SQL> create pfile='/tmp/init.ora' from spfile; File created. ======================================================= add the following entry in the listener.ora file on primary database LISTENER = (DESCRIPTION_LIST = 1336568 bytes 855640840 bytes 587202560 bytes 12169216 bytes TYPE ONLINE ONLINE ONLINE STANDBY STANDBY STANDBY STANDBY -------------------------------------------------------- -------

Generated with www.html-to-pdf.net

Page 3 / 12

(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.2.101 )(PORT = 1521)) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = white ) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1) (SID_NAME = white) ) ) ================================================== tnsnames.ora file on both machines ================================================== BLACK = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dc2.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = black) ) ) WHITE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dc1.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = white) ) ) ============================================================= [oracle@dc1 admin]$ tnsping white TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 27-FEB-2012 05:46:29 Copyright (c) 1997, 2009, Oracle. Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dc1.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = white))) OK (50 msec) [oracle@dc1 admin]$ tnsping black TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 27-FEB-2012 05:46:33 Copyright (c) 1997, 2009, Oracle. Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dc2.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = black))) OK (10 msec) [oracle@dc1 admin]$ ========================================================= [oracle@dc1 dbs]$ scp orapwwhite dc2:/u01/app/oracle/product/11.2.0/db_1/dbs/orapwblack orapwwhite 100% 1536 [oracle@dc1 dbs]$ ========================================================== [oracle@dc1 dbs]$ scp /tmp/init.ora dc2:/u01/app/oracle/product/11.2.0/db_1/dbs/initblack.ora init.ora 100% 1333 [oracle@dc1 dbs]$ SQL> show parameter spfile; NAME TYPE VALUE ------------------------------------ ----------- -----------------------------1.3KB/s 00:00 1.5KB/s 00:00 All rights reserved. All rights reserved.

Generated with www.html-to-pdf.net

Page 4 / 12

spfile SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence SQL>

string Archive Mode Enabled

+DATA/white/spfilewhite.ora

+DATA/archivelog/white/ 16 18 18

follow below steps on machine two for creating standby database ================================================= [oracle@dc2 ~]$ cd /u01/app/oracle/product/11.2.0/db_1/dbs/ [oracle@dc2 dbs]$ cat initblack.ora white.__db_cache_size=587202560 white.__java_pool_size=16777216 white.__large_pool_size=16777216 white.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment white.__pga_aggregate_target=587202560 white.__sga_target=872415232 white.__shared_io_pool_size=0 white.__shared_pool_size=234881024 white.__streams_pool_size=0 *.audit_file_dest='/u01/app/oracle/admin/white/adump' *.audit_trail='db' *.compatible='11.2.0.0.0' *.control_files='+DATA/white/controlfile/current.310.776321931' *.db_block_size=8192 *.db_create_file_dest='+DATA' *.db_domain='' *.db_file_name_convert='+DATA/black/datafile/','+DATA/white/datafile/','+DATA/black/ tempfile/','+DATA/white/tempfile/' *.db_name='white' *.diagnostic_dest='/u01/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=whiteXDB)' *.fal_client='WHITE' *.fal_server='BLACK' *.log_archive_config='DG_CONFIG=(white,black)' *.log_archive_dest_1='LOCATION=+DATA/archivelog/white/ VALID_FOR= (ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=white' *.log_archive_dest_2='SERVICE=black LGWR ASYNC VALID_FOR= (ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=black' *.log_archive_dest_state_1='ENABLE' *.log_file_name_convert='+DATA/black/onlinelog/','+DATA/white/onlinelog/' *.memory_target=1449132032 *.open_cursors=300 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.undo_tablespace='UNDOTBS1' [oracle@dc2 dbs]$ =================================== after editing the pfile parameter required for standby database ================================= black.__db_cache_size=587202560 black.__java_pool_size=16777216 black.__large_pool_size=16777216 black.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment black.__pga_aggregate_target=587202560 black.__sga_target=872415232 black.__shared_io_pool_size=0 black.__shared_pool_size=234881024 black.__streams_pool_size=0 *.audit_file_dest='/u01/app/oracle/admin/black/adump' *.audit_trail='db' *.compatible='11.2.0.0.0' *.control_files='+DATA/black/controlfile/current.310.776321931' *.db_block_size=8192

Generated with www.html-to-pdf.net

Page 5 / 12

*.db_create_file_dest='+DATA' *.db_domain='' *.db_file_name_convert='+DATA/white/datafile/','+DATA/black/datafile/','+DATA/white/ tempfile/','+DATA/black/tempfile/' *.db_name='white' *.diagnostic_dest='/u01/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=blackXDB)' *.fal_client='BLACK' *.fal_server='WHITE' *.log_archive_config='DG_CONFIG=(white,black)' *.log_archive_dest_1='LOCATION=+DATA/archivelog/black/ VALID_FOR= (ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=black' *.log_archive_dest_2='SERVICE=white LGWR ASYNC VALID_FOR= (ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=white' *.log_archive_dest_state_1='ENABLE' *.log_file_name_convert='+DATA/white/onlinelog/','+DATA/black/onlinelog/' *.memory_target=1449132032 *.open_cursors=300 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.undo_tablespace='UNDOTBS1' ========================================== add an entry in the /etc/oratab file black:/u01/app/oracle/product/11.2.0/db_1:N add the following lines to the listener.ora file LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.102)(PORT = 1521)) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = black ) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1) (SID_NAME = black) ) ) add the below entries on both nodes tnsnames.ora file # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. BLACK = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dc2.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = black) ) ) WHITE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dc1.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = white) ) ) [oracle@dc2 admin]$ . oraenv ORACLE_SID = [black] ? black The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle [oracle@dc2 admin]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 27 05:59:50 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved.

Generated with www.html-to-pdf.net

Page 6 / 12

Connected to an idle instance. SQL> startup nomount ORA-00304: requested INSTANCE_NUMBER is busy to resolve this issue add db_unique_name='black' in the pfile of standby database. ORA-09925: Unable to create audit trail file Linux Error: 2: No such file or directory Additional information: 9925 to resolve this issue create adump directory [oracle@dc2 dbs]$ mkdir -p /u01/app/oracle/admin/black/adump SQL> startup nomount ORACLE instance started. Total System Global Area 1456349184 bytes Fixed Size Variable Size Database Buffers Redo Buffers SQL> SQL> conn sys/oracle@white as sysdba; Connected. SQL> conn sys/oracle@black as sysdba; ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor -- to resolve this issue SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = black ) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1) (SID_NAME = black) ) ) Warning: You are no longer connected to ORACLE. SQL> conn sys/oracle@black as sysdba; ERROR: ORA-12528: TNS:listener: all appropriate instances are blocking new connections --- to resolve blocking new connections shutdown the database and startup nomount the standby database again will resolve it. SQL> conn sys/oracle@black as sysdba; Connected. SQL> SQL> conn sys/oracle@black as sysdba; Connected. SQL> create standby database from active primary database using RMAN [oracle@dc2 dbs]$ . oraenv ORACLE_SID = [oracle] ? black The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle [oracle@dc2 dbs]$ rman target sys/oracle@white auxiliary sys/oracle@black Recovery Manager: Release 11.2.0.1.0 - Production on Mon Feb 27 06:11:51 2012 Copyright (c) 1982, 2009, Oracle and/or its affiliates. connected to target database: WHITE (DBID=3671326283) connected to auxiliary database: WHITE (not mounted) RMAN> run { allocate channel p1 type disk; allocate channel p2 type disk; allocate channel p3 type disk; allocate channel p4 type disk; allocate auxiliary channel stby type disk; duplicate target database for standby from active database spfile parameter_value_convert 'white','black' set db_unique_name='black' set db_file_name_convert='/white/','/black/' set log_file_name_convert='/white/','/black/' All rights reserved. need to check/add the below entries in listener.ora file. 1336568 bytes 855640840 bytes 587202560 bytes 12169216 bytes

Generated with www.html-to-pdf.net

Page 7 / 12

set control_files='+DATA/black/controlfile/control01.ctl' set log_archive_max_processes='5' set fal_client='black' set fal_server='white' set standby_file_management='AUTO' set log_archive_config='dg_config=(white,black)' ; } 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> using target database control file instead of recovery catalog allocated channel: p1 channel p1: SID=55 device type=DISK allocated channel: p2 channel p2: SID=40 device type=DISK allocated channel: p3 channel p3: SID=1 device type=DISK allocated channel: p4 channel p4: SID=39 device type=DISK allocated channel: stby channel stby: SID=32 device type=DISK Starting Duplicate Db at 27-FEB-12 contents of Memory Script: { backup as copy reuse targetfile format '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwblack' '+DATA/white/spfilewhite.ora' auxiliary format '/u01/app/oracle/product/11.2.0/db_1/dbs/spfileblack.ora' sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileblack.ora''"; } executing Memory Script Starting backup at 27-FEB-12 Finished backup at 27-FEB-12 sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileblack.ora'' contents of Memory Script: { sql clone "alter system set '''' scope=spfile"; sql clone "alter system set '''' scope=spfile"; sql clone "alter system set DB_UNIQUE_NAME=white'' comment= '''' scope=spfile"; sql clone "alter system set ''black'' comment= '''' scope=spfile"; sql clone "alter system set '''' scope=spfile"; sql clone "alter system set '''' scope=spfile"; sql clone "alter system set '''' scope=spfile"; sql clone "alter system set 5 comment= '''' scope=spfile"; sql clone "alter system set ''black'' comment= fal_client = log_archive_max_processes = control_files = ''+DATA/black/controlfile/control01.ctl'' comment= log_file_name_convert = ''/white/'', ''/black/'' comment= db_file_name_convert = ''/white/'', ''/black/'' comment= db_unique_name = log_archive_dest_1 = ''LOCATION=+DATA/archivelog/black/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) dispatchers = ''(PROTOCOL=TCP) (SERVICE=blackXDB)'' comment= audit_file_dest = ''/u01/app/oracle/admin/black/adump'' comment= ; targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwwhite' auxiliary

Generated with www.html-to-pdf.net

Page 8 / 12

'''' scope=spfile"; sql clone "alter system set ''white'' comment= '''' scope=spfile"; sql clone "alter system set ''AUTO'' comment= '''' scope=spfile"; sql clone "alter system set '''' scope=spfile"; shutdown clone immediate; startup clone nomount; } executing Memory Script sql statement: alter system set = sql statement: alter system set sql statement: alter system set = audit_file_dest dispatchers = ''(PROTOCOL=TCP) ''/u01/app/oracle/admin/black/adump'' comment= '''' scope=spfile log_archive_config = ''dg_config=(white,black)'' comment= standby_file_management = fal_server =

(SERVICE=blackXDB)'' comment= '''' scope=spfile log_archive_dest_1 ''LOCATION=+DATA/archivelog/black/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name = ''black'' comment= '''' ''/white/'', ''/black/'' ''/white/'', ''/black/''

DB_UNIQUE_NAME=white'' comment= '''' scope=spfile sql statement: alter system set scope=spfile sql statement: alter system set comment= '''' scope=spfile sql statement: alter system set comment= '''' scope=spfile sql statement: alter system set = sql statement: alter system set scope=spfile sql statement: alter system set sql statement: alter system set sql statement: alter system set scope=spfile sql statement: alter system set comment= '''' scope=spfile Oracle instance shut down connected to auxiliary database (not started) Oracle instance started Total System Global Area Fixed Size Variable Size Database Buffers Redo Buffers allocated channel: stby channel stby: SID=29 device type=DISK contents of Memory Script: { backup as copy current controlfile for standby auxiliary format } executing Memory Script Starting backup at 27-FEB-12 channel p1: starting datafile copy copying standby control file output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_white.f tag=TAG20120227T061458 RECID=1 STAMP=776326500 channel p1: datafile copy complete, elapsed time: 00:00:08 Finished backup at 27-FEB-12 contents of Memory Script: { sql clone 'alter database mount standby database'; } executing Memory Script sql statement: alter database mount standby database '+DATA/black/controlfile/control01.ctl'; 1456349184 bytes 1336568 bytes 855640840 bytes 587202560 bytes 12169216 bytes log_archive_config = ''dg_config=(white,black)'' fal_client = fal_server = ''black'' comment= '''' scope=spfile ''white'' comment= '''' scope=spfile ''AUTO'' comment= '''' control_files log_archive_max_processes = 5 comment= '''' ''+DATA/black/controlfile/control01.ctl'' comment= '''' scope=spfile log_file_name_convert = db_file_name_convert =

standby_file_management =

Generated with www.html-to-pdf.net

Page 9 / 12

RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only. contents of Memory Script: { set newname for tempfile "+data"; switch clone tempfile all; set newname for datafile "+data"; set newname for datafile "+data"; set newname for datafile "+data"; set newname for datafile "+data"; backup as copy reuse datafile "+data" "+data" "+data" "+data" } executing Memory Script executing command: SET NEWNAME renamed tempfile 1 to +data in control file executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting backup at 27-FEB-12 channel p1: starting datafile copy input datafile file number=00001 name=+DATA/white/datafile/system.324.776321695 channel p2: starting datafile copy input datafile file number=00002 name=+DATA/white/datafile/sysaux.337.776321703 channel p3: starting datafile copy input datafile file number=00003 name=+DATA/white/datafile/undotbs1.336.776321707 channel p4: starting datafile copy input datafile file number=00004 name=+DATA/white/datafile/users.335.776321707 output file name=+DATA/black/datafile/undotbs1.266.776326483 tag=TAG20120227T061514 channel p3: datafile copy complete, elapsed time: 00:00:08 output file name=+DATA/black/datafile/users.514.776326483 tag=TAG20120227T061514 channel p4: datafile copy complete, elapsed time: 00:00:09 output file name=+DATA/black/datafile/sysaux.518.776326483 tag=TAG20120227T061514 channel p2: datafile copy complete, elapsed time: 00:01:19 output file name=+DATA/black/datafile/system.517.776326481 tag=TAG20120227T061514 channel p1: datafile copy complete, elapsed time: 00:01:40 Finished backup at 27-FEB-12 sql statement: alter system archive log current contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 1 switched to datafile copy input datafile copy RECID=1 STAMP=776326581 file name=+DATA/black/datafile/system.517.776326481 datafile 2 switched to datafile copy input datafile copy RECID=2 STAMP=776326581 file name=+DATA/black/datafile/sysaux.518.776326483 datafile 3 switched to datafile copy input datafile copy RECID=3 STAMP=776326581 file name=+DATA/black/datafile/undotbs1.266.776326483 1 auxiliary format datafile datafile datafile ; 4 to 3 to 2 to 1 to 1 to

2 auxiliary format 3 auxiliary format 4 auxiliary format sql 'alter system archive log current';

Generated with www.html-to-pdf.net

Page 10 / 12

datafile 4 switched to datafile copy input datafile copy RECID=4 STAMP=776326581 file name=+DATA/black/datafile/users.514.776326483 Finished Duplicate Db at 27-FEB-12 released channel: p1 released channel: p2 released channel: p3 released channel: p4 released channel: stby RMAN> exit Recovery Manager complete. [oracle@dc2 dbs]$ SQL> conn / as sysdba Connected. SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------+DATA/black/datafile/system.517.776326481 +DATA/black/datafile/sysaux.518.776326483 +DATA/black/datafile/undotbs1.266.776326483 +DATA/black/datafile/users.514.776326483 SQL> select name from v$tempfile; NAME -------------------------------------------------------------------------------+DATA SQL> col member for a56 SQL> select member,type from v$logfile; MEMBER +DATA/black/onlinelog/group_3.587.776326583 +DATA/black/onlinelog/group_2.519.776326583 +DATA/black/onlinelog/group_1.516.776326583 +DATA/black/onlinelog/group_4.520.776326583 +DATA/black/onlinelog/group_5.522.776326583 +DATA/black/onlinelog/group_6.535.776326583 +DATA/black/onlinelog/group_7.534.776326583 7 rows selected. SQL> select name,database_role,db_unique_name from v$database; NAME WHITE SQL> SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence Database altered. SQL> archive log list; Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence SQL> SQL> select open_mode from v$database; OPEN_MODE -------------------READ ONLY WITH APPLY Regards, Rajesh Kumar Govindarajan. Archive Mode Enabled ?/dbs/arch 22 0 23 Archive Mode Enabled ?/dbs/arch 0 0 0 DATABASE_ROLE DB_UNIQUE_NAME --------- ---------------- -----------------------------PHYSICAL STANDBY black TYPE ONLINE ONLINE ONLINE STANDBY STANDBY STANDBY STANDBY -------------------------------------------------------- -------

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

Generated with www.html-to-pdf.net

Page 11 / 12

POSTED BY RAJESHKUMAR GOVINDARAJAN A T MONDAY, FEBRUARY 27, 2012 L A B E L S : 1 1 G C O N C E P T S, 1 1 G R 1, 1 1 G R 2, D A T A G U A R D

NO COMMENTS:
Post a Comment Newer Post Subscribe to: Post Comments (Atom) Home Older Post

BRUCE LEE TIPS

The spirit of the individual is determined by his dominating thought habits.

Generated with www.html-to-pdf.net

Page 12 / 12

You might also like