Posts

Showing posts from October, 2014

RMAN duplicate in oracle 11g

Ref: http://oracleinaction.com/duplicate-db-no-db-conn/ duplicate a database from its backups without any connection to the source database. This method can be used if source database is not available . ********************************   source database  orcl   Duplicate database  orclt ******************************** Overview: on the source  host - BACKUP DATABASE PLUS ARCHIVELOG AND CONTROLFILE -  Copy these backup files to the server where you want to create the duplicate copy. - CREATE PFILE FROM SOURCE DATABASE on the target host - Add a line in the file /etc/oratab to reflect the database instance you are going to copy - create folders - Copy the backup files from the source database - Copy the initialization parameter file from the source database add edit it. - Copy the password file - Startup the target database in nomount mode using modified parameter file - Using RMAN  connect to the  duplicate database (orclt) a...

Dataguard status sync -

Ref:  http://select-star-from.blogspot.com.au/search/label/DATAGUARD Method :1 ========= PRIMARY ======== sqlplus "/ as sysdba" set pages 50000 lines 32767col OPEN_MODE for a10 col HOST_NAME for a10 col DATABASE_ROLE for a7 select NAME,DB_UNIQUE_NAME,INSTANCE_NAME,HOST_NAME,OPEN_MODE,LOG_MODE,DATABASE_STATUS,DATABASE_ROLE,SWITCHOVER_STATUS,PROTECTION_MODE,PROTECTION_LEVEL,CONTROLFILE_TYPE,STATUS,LOGINS,to_char(STARTUP_TIME,'DD-MON-YYYY HH24:MI:SS') "DB UP TIME" from v$database,gv$instance; SELECT NAME,OPEN_MODE,DATABASE_ROLE,PROTECTION_LEVEL,SWITCHOVER_STATUS,STATUS,LOGINS FROM V$DATABASE,GV$INSTANCE; select THREAD#,SEQUENCE#,STATUS,ARCHIVED from v$log; select dest_id,database_mode,recovery_mode,protection_mode,archived_seq#,applied_seq# from v$archive_dest_Status where dest_id in (1,2); set pages 50000 lines 32767Set scan off Set feed off BREAK ON ROW SKIP 1 COL "THREAD" for a10 COL "PR-ARCHIVED" for a15 COL "STBY-ARCHIVED"...

RMAN

On the RMAN tool, delete archivelog older than a week. # rman target / ; RMAN> delete archivelog until time 'sysdate-7'; or RMAN> delete force archivelog all; or RMAN> delete backup completed before 'sysdate-3'; Restore status restore status set pages 9999 lines 500 set numformat 99999.99 set trim on  set trims on alter session set nls_date_format = 'DD-MM-YYYY HH24:MI:SS'; select SID, START_TIME,TOTALWORK, sofar, (sofar/totalwork) * 100 done,    sysdate + TIME_REMAINING/3600/24 end_at     from v$session_longops     where totalwork > sofar     AND opname NOT LIKE '%aggregate%'    AND opname like 'RMAN%' RMAN backup job details for 'n' number of days:- ========================================= Monitoring RMAN backup status using v$rman_backup_job_details and v$rman_status. Note : - Enter the number of days required for status report, for 1 day backup status report provide i...