Tuesday, 19 December 2017

https://docs.oracle.com/cd/B13789_01/server.101/b10734/rcmbackp.htm - FOr BACKUP topics user official site.

RMAN catalog and RMAN stored script.

Reference : http://www.oracle.com/technetwork/issue-archive/2009/09-sep/o59recovery-085185.html.

https://docs.oracle.com/cd/B14117_01/server.101/b10734/rcmcnctg.htm#1008104.


RMAN> list script names;

List of Stored Scripts in Recovery Catalog


    Global Scripts


       Script Name
       Description
       -----------------------------------------------------------------------
       archive_bck_del

       archive_bck_no_del

       full_archive_delete

       global_medfull_level0

       global_smallfull_level0


RMAN> print Global Script archive_bck_del
2> ;

printing stored global script: archive_bck_del
{
backup Archivelog ALL
skip inaccessible
format='Arch_Delete_%d_%s_%p.dbf'
filesperset=20
delete input;
}

RMAN> print Global Script archive_bck_no_del
2> ;

printing stored global script: archive_bck_no_del
{
backup Archivelog ALL
skip inaccessible
format='Arch_NoDelete_%d_%s_%p.dbf'
filesperset=20;
}

RMAN> print Global Script full_archive_delete;

printing stored global script: full_archive_delete
{
backup Archivelog ALL
format='Arch_Delete_%d_%s_%p.dbf'
skip inaccessible
filesperset=20
delete input
not backed up 2 times;
}

RMAN> print Global Script global_medfull_level0;

printing stored global script: global_medfull_level0
{
   execute global script global_smallfull_level0;
}

RMAN> print global script global_smallfull_level0
2> ;

printing stored global script: global_smallfull_level0
{
     backup incremental level 0
     format='Small_Full_BCK_%d_%s_%p.dbf'
     database
     filesperset = 10;
}


RMAN> show all
2> ;

RMAN configuration parameters for database with db_unique_name PDMLI are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 45 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO 'control_file_%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u07/app/oracle/arch/PDMLI/RMAN/%d-%T_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so';
CONFIGURE CHANNEL DEVICE TYPE DISK MAXOPENFILES 4;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE';
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/reorg/PDMLI/backups/snapcf_PDMLI.f';


================================================================

OMNI Backup tool:


/opt/omni/bin/omnirpt -report dl_info -tab | grep <dbname>

ex : g2u2554g:rdbms/log $ /opt/omni/bin/omnirpt -report dl_info -tab | grep PIDSI
Oracle8 Backup  B1_g2u2554g_PIDSI_F             oracle.dba@g2u2554g.austin.hpicorp.net  -       -
Oracle8 Backup  B1_g2u2554g_PIDSI_log_del               oracle.dba@g2u2554g.austin.hpicorp.net  -       -

g2u2554g:rdbms/log $ /opt/omni/bin/omnirpt -rep dl_sched -tab|grep -i PIDSI
Oracle8 Backup  B1_g2u2554g_PIDSI_F             12/15/17 15:45:00       1513352700 2017-12-15 15:45:00  full
Oracle8 Backup  B1_g2u2554g_PIDSI_log_del               12/10/17 21:45:00       1512942300 2017-12-10 21:45:00  full


g2u2554g:rdbms/log $ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Sun Dec 10 06:29:28 2017

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

connected to target database: PIDSI (DBID=1923135860)

RMAN> exit


Recovery Manager complete.
g2u2554g:rdbms/log $ /opt/omni/lbin/util_cmd -getmethod Oracle8 1923135860
DB_NAME='PIDSI';
CLIENT=('g2u2554g.austin.hpicorp.net%PIDSI');
TGT_NLS_LANG='AMERICAN_AMERICA.AL32UTF8';
CATALOG={
        CATALOG_DB_VERSION='11.2.0.3.0';
        RCPasswd='FHBBEHBBEHBBQGBBDIBBOHBBCHBBPHBB';
        RC_NLS_LANG='AMERICAN_AMERICA.AL32UTF8';
        RCService='AUSRCII';
        RCUser='RMAN_PIDSI';
        HOST_NAME='';
};


rman target omnibackup/omni_PIDSI@PIDSI catalog RMAN_PIDSI/dcc_rman@AUSRCII

/opt/omni/bin/omnidb -ses -data "B1_g2u2554g_PIDSI_log_del" -last 15

nohup /opt/omni/bin/omnib -oracle8_list B1_g2u2554g_PIDSI_log_del -protect > /tmp/B1_g2u2554g_PIDSI_log_del &(This one was not working)


nohup /opt/omni/bin/omnib -oracle8_list B1_g2u2554g_PIDSI_log_del  -protect days 15 > /tmp/B1_g2u2554g_PIDSI_log_del &


Backup issue:
============

/opt/omni/bin/omnirpt -rep dl_sched -tab|grep -i YESNO2I

/opt/omni/bin/omnirpt -report dl_info -tab | grep YESNO2I


execute sys.dbms_backup_restore.resetcfilesection(9);

/opt/omni/lbin/util_cmd -getmethod Oracle8  331502902 ---- what is the use of this command  --- 1923135860

/opt/omni/lbin/util_cmd -getmethod Oracle8 1143709814

rman target omnibackup/omni_PDMLI@PDMLI catalog RMAN_PDMLI/dcc_rman@AUSRCII

rman target omnibackup/omni_MA9@MA9 catalog rman_MA9/dcc_rman@AUSRCIP

rman target omnibackup/omni_D7C@D7C catalog RMAN_D7C/dcc_rman@AUSRC3P




/opt/omni/bin/omnidb -ses -data "S2S_B1_synchpdb_SYNCHP_F" -last 15

nohup /opt/omni/bin/omnib -oracle8_list S2S_V1_wcsdelpdb_WCSDELP_F > /tmp/S2S_V1_wcsdelpdb_WCSDELP_F &

==========================================================================

To check backup SPEC related to particular DB
-------------------------------------------------------
/opt/omni/bin/omnirpt -report dl_info -tab | grep TRSTGP

 find . -name "HOUCM1Sarch_*.dbf" -mtime +10 -exec ll {} \;


To check last 15 days backup status
-------------------------------------------
/opt/omni/bin/omnidb -ses -data "Oracle8 S2S_V1_wcsautpdb_WCSAUTP_log_del" -last 15

/opt/omni/bin/omnidb -ses -data "Oracle8 B1_gvu10887_RDSP_F" -last 15

S2S_B1_trstgpdb_TRSTGP_log_del

To check backup Log
-------------------------
/opt/omni/bin/omnidb –ses 2017/07/11-792 -report

/opt/omni/bin/omnidb –details 2017/07/06-683 -re

To run backup manually
-----------------------------
nohup /opt/omni/bin/omnib -oracle8_list B1_dbcift6-inc_FT6_I -protect > /tmp/B1_dbcift6-inc_FT6_I & ( this one was not working )

nohup /opt/omni/bin/omnib -oracle8_list B1_g2u2554g_PIDSI_log_del -protect > /tmp/B1_g2u2554g_PIDSI_log_del &

nohup /opt/omni/bin/omnib -oracle8_list B1_gvu10584_AUIARC1I_log_del -protect days 15 > /tmp/B1_gvu10584_AUIARC1I_log_del &

B1_gvu4902_TRLIV1P_log_del

To delete applied archive logs at Standby DB
------------------------------------------------------
ksh /u01/app/oracle/admin/scripts/Applied_log_on_standby_delete.ksh

ksh /home/oracle/Applied_log_on_standby_delete.ksh
-------------------------------------------------------------------

backup
====


col STATUS format a9
col hrs format 999.99
select SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;


SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE='OMNIBACKUP';

GRANT DBA TO OMNIBACKUP;

No comments:

Post a Comment