Skip to content

Instantly share code, notes, and snippets.

@tuksik
Last active January 18, 2016 23:56
Show Gist options
  • Save tuksik/7ea90635895342c8c506 to your computer and use it in GitHub Desktop.
Save tuksik/7ea90635895342c8c506 to your computer and use it in GitHub Desktop.
Backup Oracle with RMAN

Backup with RMAN

  • Connect
cmd>set ORACLE_SID=DBSID
cmd>sqlplus sys/passwd as sysdba;
  • Check for LOG_MODE
SQL>SELECT LOG_MODE FROM SYS.V$DATABASE;
cmd>sqlplus sys/passwd as sysdba;
SQL>shutdown immediate
SQL>startup mount
SQL> startup mount
ORACLE instance started.

Total System Global Area  184549376 bytes
Fixed Size                  1300928 bytes
Variable Size             157820480 bytes
Database Buffers           25165824 bytes
Redo Buffers                 262144 bytes
Database mounted.

SQL> alter database archivelog;
Database altered.

SQL> alter database open;
Database altered.
  • ELSE
cmd>rman target /
RMAN> list copy of archivelog until time 'SYSDATE-3';
RMAN> delete archivelog until time 'SYSDATE-3';//delete archivelog until sequence 999;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment