Saturday, 6 May 2017

Table recover using RMAN

table recover using RMAN (in CDB database)
[oracle@localhost trace]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 8 06:21:16 2016
Copyright (c) 1982, 2014, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> conn ramesh/ramesh@testpdb
Connected.
SQL> @/u01/app/oracle/sample_data.txt
Table created.
SQL> commit;
Commit complete.
set lines 200
col TABLE_NAME for a20
select TABLE_NAME,TABLESPACE_NAME from dba_tables where TABLE_NAME='ABC';

TABLE_NAME           TABLESPACE_NAME
-------------------- ------------------------------
ABC                  USERS
SQL> exit
[oracle@localhost trace]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Fri Jul 8 06:24:42 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1444228497)
RMAN> backup database plus archivelog;
Starting backup at 08-JUL-16
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=254 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=40 RECID=31 STAMP=916639295
input archived log thread=1 sequence=41 RECID=32 STAMP=916640035
input archived log thread=1 sequence=42 RECID=33 STAMP=916640326
input archived log thread=1 sequence=43 RECID=34 STAMP=916640699
channel ORA_DISK_1: starting piece 1 at 08-JUL-16
channel ORA_DISK_1: finished piece 1 at 08-JUL-16
piece handle=/u01/app/oracle/recovery_area/ORCL/backupset/2016_07_08/o1_mf_annnn_TAG20160708T062500_cqyzvwmx_.bkp tag=TAG20160708T062500 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-JUL-16

Starting backup at 08-JUL-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 08-JUL-16
channel ORA_DISK_1: finished piece 1 at 08-JUL-16
piece handle=/u01/app/oracle/recovery_area/ORCL/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzvy3b_.bkp tag=TAG20160708T062501 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00015 name=/u01/app/oracle/oradata/orcl/testpdb/sysaux01.dbf
input datafile file number=00014 name=/u01/app/oracle/oradata/orcl/testpdb/system01.dbf
input datafile file number=00016 name=/u01/app/oracle/oradata/orcl/testpdb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 08-JUL-16
channel ORA_DISK_1: finished piece 1 at 08-JUL-16
piece handle=/u01/app/oracle/recovery_area/ORCL/3717BF6BA56F1C6AE055000000000001/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzx1fy_.bkp tag=TAG20160708T062501 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/orcl/pdborcl/sysaux01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/orcl/pdborcl/system01.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/orcl/pdborcl/pdborcl_users01.dbf
channel ORA_DISK_1: starting piece 1 at 08-JUL-16
channel ORA_DISK_1: finished piece 1 at 08-JUL-16
piece handle=/u01/app/oracle/recovery_area/ORCL/36F16AFE599FC018E055000000000001/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzxtl8_.bkp tag=TAG20160708T062501 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/u01/app/oracle/oradata/orcl/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/pdbseed/system01.dbf
channel ORA_DISK_1: starting piece 1 at 08-JUL-16
channel ORA_DISK_1: finished piece 1 at 08-JUL-16
piece handle=/u01/app/oracle/recovery_area/ORCL/36F14F04DD26BC50E055000000000001/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzyn14_.bkp tag=TAG20160708T062501 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 08-JUL-16

Starting backup at 08-JUL-16
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=44 RECID=35 STAMP=916640813
channel ORA_DISK_1: starting piece 1 at 08-JUL-16
channel ORA_DISK_1: finished piece 1 at 08-JUL-16
piece handle=/u01/app/oracle/recovery_area/ORCL/backupset/2016_07_08/o1_mf_annnn_TAG20160708T062653_cqyzzfgq_.bkp tag=TAG20160708T062653 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-JUL-16

Starting Control File Autobackup at 08-JUL-16
piece handle=/u01/app/oracle/recovery_area/ORCL/autobackup/2016_07_08/o1_mf_n_916640815_cqyzzho5_.bkp comment=NONE
Finished Control File Autobackup at 08-JUL-16

RMAN> exit
Recovery Manager complete.
============================================================================
--Drop the table
[oracle@localhost trace]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 8 06:27:47 2016
Copyright (c) 1982, 2014, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> alter session set container=testpdb;
Session altered.
SQL> select count(*) from ramesh.abc;
  COUNT(*)
----------
       200
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
    1825573
SQL> drop table ramesh.abc;
Table dropped.
SQL> exit
===============================================================================
Recover the table
[oracle@localhost trace]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Fri Jul 8 06:30:31 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1444228497)
RMAN> recover table ramesh.abc OF PLUGGABLE DATABASE TESTPDB until scn 1825573 AUXILIARY DESTINATION  '/u01/app/oracle/oradata' DATAPUMP DESTINATION '/u01/app/oracle/oradata' DUMP FILE 'ramesh_abc.dmp';
Starting recover at 08-JUL-16
using target database control file instead of recovery catalog
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=136 device type=DISK
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time

List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1

Creating automatic instance, with SID='vDxA'

initialization parameters used for automatic instance:
db_name=ORCL
db_unique_name=vDxA_pitr_TESTPDB_ORCL
compatible=12.1.0.2.0
db_block_size=8192
db_files=200
diagnostic_dest=/u01/app/oracle
_system_trig_enabled=FALSE
sga_target=1504M
processes=200
db_create_file_dest=/u01/app/oracle/oradata
log_archive_dest_1='location=/u01/app/oracle/oradata'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used
starting up automatic instance ORCL
Oracle instance started
Total System Global Area    1577058304 bytes
Fixed Size                     2924832 bytes
Variable Size                402656992 bytes
Database Buffers            1157627904 bytes
Redo Buffers                  13848576 bytes
Automatic instance created

contents of Memory Script:
{
# set requested point in time
set until  scn 1825573;
# restore the controlfile
restore clone controlfile;

# mount the controlfile
sql clone 'alter database mount clone database';

# archive current online log
sql 'alter system archive log current';
}
executing Memory Script

executing command: SET until clause

Starting restore at 08-JUL-16
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=6 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/recovery_area/ORCL/autobackup/2016_07_08/o1_mf_n_916640815_cqyzzho5_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/recovery_area/ORCL/autobackup/2016_07_08/o1_mf_n_916640815_cqyzzho5_.bkp tag=TAG20160708T062654
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/ORCL/controlfile/o1_mf_cqz07jmm_.ctl
Finished restore at 08-JUL-16

sql statement: alter database mount clone database

sql statement: alter system archive log current

contents of Memory Script:
{
# set requested point in time
set until  scn 1825573;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile  1 to new;
set newname for clone datafile  4 to new;
set newname for clone datafile  3 to new;
set newname for clone datafile  14 to new;
set newname for clone datafile  15 to new;
set newname for clone tempfile  1 to new;
set newname for clone tempfile  4 to new;
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile  1, 4, 3, 14, 15;

switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_%u_.tmp in control file
renamed tempfile 4 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 08-JUL-16
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/recovery_area/ORCL/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzvy3b_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/recovery_area/ORCL/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzvy3b_.bkp tag=TAG20160708T062501
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00014 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00015 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/recovery_area/ORCL/3717BF6BA56F1C6AE055000000000001/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzx1fy_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/recovery_area/ORCL/3717BF6BA56F1C6AE055000000000001/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzx1fy_.bkp tag=TAG20160708T062501
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 08-JUL-16

datafile 1 switched to datafile copy
input datafile copy RECID=8 STAMP=916641140 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_cqz07r67_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=9 STAMP=916641140 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_cqz07r89_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=10 STAMP=916641140 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_cqz07r7g_.dbf
datafile 14 switched to datafile copy
input datafile copy RECID=11 STAMP=916641140 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_cqz08vcw_.dbf
datafile 15 switched to datafile copy
input datafile copy RECID=12 STAMP=916641140 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_cqz08vbs_.dbf

contents of Memory Script:
{
# set requested point in time
set until  scn 1825573;
# online the datafiles restored or switched
sql clone "alter database datafile  1 online";
sql clone "alter database datafile  4 online";
sql clone "alter database datafile  3 online";
sql clone 'TESTPDB' "alter database datafile
 14 online";
sql clone 'TESTPDB' "alter database datafile
 15 online";
# recover and open database read only
recover clone database tablespace  "SYSTEM", "UNDOTBS1", "SYSAUX", "TESTPDB":"SYSTEM", "TESTPDB":"SYSAUX";
sql clone 'alter database open read only';
}
executing Memory Script

executing command: SET until clause

sql statement: alter database datafile  1 online

sql statement: alter database datafile  4 online

sql statement: alter database datafile  3 online

sql statement: alter database datafile  14 online

sql statement: alter database datafile  15 online

Starting recover at 08-JUL-16
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 44 is already on disk as file /u01/app/oracle/recovery_area/ORCL/archivelog/2016_07_08/o1_mf_1_44_cqyzzf5b_.arc
archived log for thread 1 with sequence 45 is already on disk as file /u01/app/oracle/recovery_area/ORCL/archivelog/2016_07_08/o1_mf_1_45_cqz06y3s_.arc
archived log file name=/u01/app/oracle/recovery_area/ORCL/archivelog/2016_07_08/o1_mf_1_44_cqyzzf5b_.arc thread=1 sequence=44
archived log file name=/u01/app/oracle/recovery_area/ORCL/archivelog/2016_07_08/o1_mf_1_45_cqz06y3s_.arc thread=1 sequence=45
media recovery complete, elapsed time: 00:00:00
Finished recover at 08-JUL-16

sql statement: alter database open read only

contents of Memory Script:
{
sql clone 'alter pluggable database  TESTPDB open read only';
}
executing Memory Script

sql statement: alter pluggable database  TESTPDB open read only

contents of Memory Script:
{
   sql clone "create spfile from memory";
   shutdown clone immediate;
   startup clone nomount;
   sql clone "alter system set  control_files =
  ''/u01/app/oracle/oradata/ORCL/controlfile/o1_mf_cqz07jmm_.ctl'' comment=
 ''RMAN set'' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
# mount database
sql clone 'alter database mount clone database';
}
executing Memory Script

sql statement: create spfile from memory

database closed
database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1577058304 bytes

Fixed Size                     2924832 bytes
Variable Size                419434208 bytes
Database Buffers            1140850688 bytes
Redo Buffers                  13848576 bytes

sql statement: alter system set  control_files =   ''/u01/app/oracle/oradata/ORCL/controlfile/o1_mf_cqz07jmm_.ctl'' comment= ''RMAN set'' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1577058304 bytes

Fixed Size                     2924832 bytes
Variable Size                419434208 bytes
Database Buffers            1140850688 bytes
Redo Buffers                  13848576 bytes

sql statement: alter database mount clone database

contents of Memory Script:
{
# set requested point in time
set until  scn 1825573;
# set destinations for recovery set and auxiliary set datafiles
set newname for datafile  16 to new;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile  16;

switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 08-JUL-16
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=6 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00016 to /u01/app/oracle/oradata/VDXA_PITR_TESTPDB_ORCL/datafile/o1_mf_users_%u_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/recovery_area/ORCL/3717BF6BA56F1C6AE055000000000001/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzx1fy_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/recovery_area/ORCL/3717BF6BA56F1C6AE055000000000001/backupset/2016_07_08/o1_mf_nnndf_TAG20160708T062501_cqyzx1fy_.bkp tag=TAG20160708T062501
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 08-JUL-16

datafile 16 switched to datafile copy
input datafile copy RECID=14 STAMP=916641211 file name=/u01/app/oracle/oradata/VDXA_PITR_TESTPDB_ORCL/datafile/o1_mf_users_cqz0crrc_.dbf

contents of Memory Script:
{
# set requested point in time
set until  scn 1825573;
# online the datafiles restored or switched
sql clone 'TESTPDB' "alter database datafile
 16 online";
# recover and open resetlogs
recover clone database tablespace  "TESTPDB":"USERS", "SYSTEM", "UNDOTBS1", "SYSAUX", "TESTPDB":"SYSTEM", "TESTPDB":"SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script

executing command: SET until clause

sql statement: alter database datafile  16 online

Starting recover at 08-JUL-16
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 44 is already on disk as file /u01/app/oracle/recovery_area/ORCL/archivelog/2016_07_08/o1_mf_1_44_cqyzzf5b_.arc
archived log for thread 1 with sequence 45 is already on disk as file /u01/app/oracle/recovery_area/ORCL/archivelog/2016_07_08/o1_mf_1_45_cqz06y3s_.arc
archived log file name=/u01/app/oracle/recovery_area/ORCL/archivelog/2016_07_08/o1_mf_1_44_cqyzzf5b_.arc thread=1 sequence=44
archived log file name=/u01/app/oracle/recovery_area/ORCL/archivelog/2016_07_08/o1_mf_1_45_cqz06y3s_.arc thread=1 sequence=45
media recovery complete, elapsed time: 00:00:00
Finished recover at 08-JUL-16

database opened

contents of Memory Script:
{
sql clone 'alter pluggable database  TESTPDB open';
}
executing Memory Script

sql statement: alter pluggable database  TESTPDB open

contents of Memory Script:
{
# create directory for datapump import
sql 'TESTPDB' "create or replace directory
TSPITR_DIROBJ_DPDIR as ''
/u01/app/oracle/oradata''";
# create directory for datapump export
sql clone 'TESTPDB' "create or replace directory
TSPITR_DIROBJ_DPDIR as ''
/u01/app/oracle/oradata''";
}
executing Memory Script

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''

Performing export of tables...
   EXPDP> Starting "SYS"."TSPITR_EXP_vDxA_xsDk":
   EXPDP> Estimate in progress using BLOCKS method...
   EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
   EXPDP> Total estimation using BLOCKS method: 64 KB
   EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
   EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
   EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
   EXPDP> . . exported "RAMESH"."ABC"                               8.375 KB     200 rows
   EXPDP> Master table "SYS"."TSPITR_EXP_vDxA_xsDk" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TSPITR_EXP_vDxA_xsDk is:
   EXPDP>   /u01/app/oracle/oradata/ramesh_abc.dmp
   EXPDP> Job "SYS"."TSPITR_EXP_vDxA_xsDk" successfully completed at Fri Jul 8 06:35:20 2016 elapsed 0 00:00:29
Export completed


contents of Memory Script:
{
# shutdown clone before import
shutdown clone abort
}
executing Memory Script

Oracle instance shut down

Performing import of tables...
   IMPDP> Master table "SYS"."TSPITR_IMP_vDxA_rBCx" successfully loaded/unloaded
   IMPDP> Starting "SYS"."TSPITR_IMP_vDxA_rBCx":
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
   IMPDP> . . imported "RAMESH"."ABC"                               8.375 KB     200 rows
   IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
   IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
   IMPDP> Job "SYS"."TSPITR_IMP_vDxA_rBCx" successfully completed at Fri Jul 8 06:35:43 2016 elapsed 0 00:00:06
Import completed


Removing automatic instance
Automatic instance removed
auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_cqz0b22v_.tmp deleted
auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_cqz09std_.tmp deleted
auxiliary instance file /u01/app/oracle/oradata/VDXA_PITR_TESTPDB_ORCL/onlinelog/o1_mf_3_cqz0d0lr_.log deleted
auxiliary instance file /u01/app/oracle/oradata/VDXA_PITR_TESTPDB_ORCL/onlinelog/o1_mf_2_cqz0czks_.log deleted
auxiliary instance file /u01/app/oracle/oradata/VDXA_PITR_TESTPDB_ORCL/onlinelog/o1_mf_1_cqz0cywt_.log deleted
auxiliary instance file /u01/app/oracle/oradata/VDXA_PITR_TESTPDB_ORCL/datafile/o1_mf_users_cqz0crrc_.dbf deleted
auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_cqz08vbs_.dbf deleted
auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_cqz08vcw_.dbf deleted
auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_cqz07r7g_.dbf deleted
auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_cqz07r89_.dbf deleted
auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_cqz07r67_.dbf deleted
auxiliary instance file /u01/app/oracle/oradata/ORCL/controlfile/o1_mf_cqz07jmm_.ctl deleted
auxiliary instance file ramesh_abc.dmp deleted
Finished recover at 08-JUL-16

RMAN> exit
Recovery Manager complete.
=====================================================================================
Check the table status after restore
[oracle@localhost trace]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 8 06:36:17 2016
Copyright (c) 1982, 2014, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> alter session set container=testpdb;
Session altered.
SQL> select count(*) from ramesh.abc;
  COUNT(*)
----------
       200
SQL> show con_name
CON_NAME
------------------------------
TESTPDB


No comments:

Post a Comment