Skip to main content

DROP RESTORE POINT AND DELETING ALL THE ARCHIVE LOGS USING RMAN IN ORACLE


DROP RESTORE POINT AND DELETING ALL THE ARCHIVE LOGS USING RMAN IN ORACLE AND TURN OFF FLASHBACK AND ARCHIVE LOG MODE

SQL> select name from v$database;

NAME
---------
PMITCKU

SQL> column NAME format a40;
SQL> SELECT NAME, SCN, TIME, DATABASE_INCARNATION#,
              GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE
              FROM V$RESTORE_POINT
              WHERE GUARANTEE_FLASHBACK_DATABASE='YES'
  ORDER BY TIME;  2    3    4    5

NAME                                            SCN
---------------------------------------- ----------
TIME
---------------------------------------------------------------------------
DATABASE_INCARNATION# GUA STORAGE_SIZE
--------------------- --- ------------
FEB09_2011                               2.2071E+10
09-FEB-11 02.08.02.000000000 PM
                    1 YES    382599168


SQL> SELECT NAME FROM V$RESTORE_POINT WHERE GUARANTEE_FLASHBACK_DATABASE='YES'  ORDER BY TIME;

NAME
----------------------------------------
FEB09_2011

SQL> DROP RESTORE POINT FEB09_2011;

Restore point dropped.

irutdbapvn1.back.tickets.com@/home/oracle: $ORACLE_HOME/bin/rman

RMAN> connect target /

connected to target database: PMITCKU (DBID=2999848811)

RMAN> delete noprompt archivelog all;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=132 devtype=DISK

List of Archived Log Copies
Key     Thrd Seq     S Low Time  Name
------- ---- ------- - --------- ----
1       1    722     A 09-FEB-11 +FLASHBACK/pmitcku/archivelog/2011_02_09/thread_1_seq_722.12683.742659745
2       1    723     A 09-FEB-11 +FLASHBACK/pmitcku/archivelog/2011_02_09/thread
3       1    724     A 09-FEB-11 +FLASHBACK/pmitcku/archivelog/2011_02_09/thread
4       1    725     A 09-FEB-11 +FLASHBACK/pmitcku/archivelog/2011_02_09/thread
5       1    726     A 09-FEB-11 +FLASHBACK/pmitcku/archivelog/2011_02_10/thread
6       1    727     A 10-FEB-11 +FLASHBACK/pmitcku/archivelog/2011_02_10/thread
7       1    728     A 10-FEB-11 +FLASHBACK/pmitcku/archivelog/2011_02_10/thread
deleted archive log
archive log filename=+FLASHBACK/pmitcku/archivelog/2011_02_09/thread_1_seq_722.1
deleted archive log
archive log filename=+FLASHBACK/pmitcku/archivelog/2011_02_09/thread_1_seq_723.1
deleted archive log
archive log filename=+FLASHBACK/pmitcku/archivelog/2011_02_09/thread_1_seq_724.5
deleted archive log
archive log filename=+FLASHBACK/pmitcku/archivelog/2011_02_09/thread_1_seq_725.4
deleted archive log
archive log filename=+FLASHBACK/pmitcku/archivelog/2011_02_10/thread_1_seq_726.6
deleted archive log
archive log filename=+FLASHBACK/pmitcku/archivelog/2011_02_10/thread_1_seq_727.2
deleted archive log
archive log filename=+FLASHBACK/pmitcku/archivelog/2011_02_10/thread_1_seq_728.9
Deleted 7 objects


RMAN> exit


Recovery Manager complete.

SQL> select name from v$database;

NAME
---------
PMITCKU

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT
ORACLE instance started.

Total System Global Area 1577058304 bytes
Fixed Size                  1273900 bytes
Variable Size             251662292 bytes
Database Buffers         1308622848 bytes
Redo Buffers               15499264 bytes
Database mounted.
SQL> alter database flashback off;

Database altered.

SQL> alter database noarchivelog;

Database altered.

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> select name from v$database;

NAME
---------
PMITCKU

SQL>

Comments

Popular posts from this blog

Issues and Solutions for Oracle 19c Grid Infrastructure Installation

     Common Issues and Solutions for Oracle 19c Grid Infrastructure Installation •       Check Log Files for Details Oracle installation issues often provide valuable clues in the log files. If the installer seems stuck or fails, check the following logs: ▪ Install log : /u01/app/oraInventory/logs/installActions<date>.log •       ▪ Grid Infrastructure log : $ORACLE_BASE/cfgtoollogs/ •         •       These logs can provide error messages and help identify the exact issue. •         •        Check Permissions and Ownership Verify that the Oracle Grid Infrastructure installation directories have the correct ownership and permissions. •        For example: •        Make sure the grid user has permission to write to the directories where the i...

CHANGING DBID FOR ORACLE DATABASE 11G

C:\Users\computer>sqlplus SQL*Plus: Release 11.1.0.7.0 - Production on Thu Sep 10 21:03:33 2013 Copyright (c) 1982, 2008, Oracle.  All rights reserved. Enter user-name: sys as sysdba Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select dbid from v$database;       DBID ---------- 2188161033 SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options C:\Users\computer>nid DBNEWID: Release 11.1.0.7.0 - Production on Thu Sep 10 21:04:44 2013 Copyright (c) 1982, 2007, Oracle.  All rights reserved. Keyword     Description                    (Default) ---------------------------------------------------- TARGET ...

How to Improve Oracle Data Pump Performance - IMPDP

  How to Improve Oracle Data Pump Performance:- Use Parallelism : Set the PARALLEL parameter to at least 2 * number of CPUs . This allows multiple worker processes to perform tasks simultaneously, speeding up both export and import processes. Example: PARALLEL=4 for a system with 2 CPUs. Perform Import Using NETWORK_LINK : Use the NETWORK_LINK parameter to import data directly from the source database. This method is particularly helpful when space is constrained, as it streams the data without needing to generate dump files on the source. It can also reduce time compared to exporting and then importing, as data is streamed directly from the source to the target database. Disable Archivelog Mode (Standalone Databases) : For standalone databases, temporarily disable archive logging during the import process. Import operations can generate a lot of redo logs, slowing down the import. Disabling...