[20190718]12c rman新特性 表恢復.txt

lfree發表於2019-07-18

[20190718]12c rman新特性 表恢復.txt

--//12c rman 支援一個新特性,恢復表在某個時間或者scn號.
--//實際上11g以前支援到表空間級別,12c更加近一步,透過簡單的命令,把以前需要dba操作的許多命令封裝在一起,
--//一氣呵成完成這個工作,簡化操作,也減少出現錯誤的可能.
--//但是在去年10月我在windows環境下測試一直是失敗,最後總是出現ORA-28056: Writing audit records to Windows Event Log failed
--//最近才知道如何解決這個問題,做一個記錄。

1.環境:
SCOTT@test01p> @ ver1
PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.2.0.1.0     Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production              0

SCOTT@test01p> create table t as select * from all_objects;
Table created.

SCOTT@test01p> select count(*) from t;
  COUNT(*)
----------
     18612

SCOTT@test01p> select count(*) from t where owner='SYS';
  COUNT(*)
----------
     11166

SYS@test> show pdbs
CON_ID CON_NAME OPEN MODE  RESTRICTED
------ -------- ---------- ----------
     2 PDB$SEED READ ONLY  NO
     3 TEST01P  READ WRITE NO    

2.測試前準備:
--//備份全庫:
RMAN> backup database format '/tmp/backup/full20190718_%U';
Starting backup at 2019-07-18 21:40:57
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=00003 name=D:\APP\ORACLE\ORADATA\TEST\SYSAUX01.DBF
input datafile file number=00001 name=D:\APP\ORACLE\ORADATA\TEST\SYSTEM01.DBF
input datafile file number=00005 name=D:\APP\ORACLE\ORADATA\TEST\UNDOTBS01.DBF
input datafile file number=00007 name=D:\APP\ORACLE\ORADATA\TEST\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 2019-07-18 21:40:58

channel ORA_DISK_1: finished piece 1 at 2019-07-18 21:43:24
piece handle=D:\TMP\BACKUP\FULL20190718_1UU708RA_1_1 tag=TAG20190718T214058 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:26
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00011 name=D:\APP\ORACLE\ORADATA\TEST\TEST01P\USERS01.DBF
input datafile file number=00010 name=D:\APP\ORACLE\ORADATA\TEST\TEST01P\UNDOTBS01.DBF
input datafile file number=00008 name=D:\APP\ORACLE\ORADATA\TEST\TEST01P\SYSTEM01.DBF
input datafile file number=00009 name=D:\APP\ORACLE\ORADATA\TEST\TEST01P\SYSAUX01.DBF
input datafile file number=00036 name=D:\APP\ORACLE\ORADATA\TEST\TEST01P\LFREE05X.DBF
channel ORA_DISK_1: starting piece 1 at 2019-07-18 21:43:25
channel ORA_DISK_1: finished piece 1 at 2019-07-18 21:44:20
piece handle=D:\TMP\BACKUP\FULL20190718_1VU708VS_1_1 tag=TAG20190718T214058 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=D:\APP\ORACLE\ORADATA\TEST\PDBSEED\SYSTEM01.DBF
input datafile file number=00006 name=D:\APP\ORACLE\ORADATA\TEST\PDBSEED\UNDOTBS01.DBF
input datafile file number=00004 name=D:\APP\ORACLE\ORADATA\TEST\PDBSEED\SYSAUX01.DBF
channel ORA_DISK_1: starting piece 1 at 2019-07-18 21:44:20
channel ORA_DISK_1: finished piece 1 at 2019-07-18 21:45:05
piece handle=D:\TMP\BACKUP\FULL20190718_20U7091K_1_1 tag=TAG20190718T214058 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 2019-07-18 21:45:05

Starting Control File and SPFILE Autobackup at 2019-07-18 21:45:06
piece handle=D:\APP\ORACLE\FAST_RECOVERY_AREA\TEST\TEST\AUTOBACKUP\2019_07_18\O1_MF_S_1013982306_GM0XZ3QX_.BKP comment=NONE
Finished Control File and SPFILE Autobackup at 2019-07-18 21:45:09

3.測試:
--//開始模擬誤操作.
SCOTT@test01p> select current_scn,sysdate from v$database;
CURRENT_SCN SYSDATE
----------- -------------------
    9271668 2019-07-18 21:46:17

SCOTT@test01p> update t set owner='SYS' ;
18569 rows updated.

SCOTT@test01p> commit;
Commit complete.

SCOTT@test01p> select current_scn,sysdate from v$database;
CURRENT_SCN SYSDATE
----------- -------------------
    9271915 2019-07-18 21:48:08

SCOTT@test01p> drop table t purge;
Table dropped.

SCOTT@test01p> select current_scn,sysdate from v$database;
CURRENT_SCN SYSDATE
----------- -------------------
    9271949 2019-07-18 21:48:18
    
3.恢復測試:
RMAN> recover table scott.t OF PLUGGABLE DATABASE test01p until scn 9271668 auxiliary destination 'D:\app\oracle\expdp' datapump destination 'D:\app\oracle\expdp' ;
Starting recover at 2019-07-18 21:52:17
using channel ORA_DISK_1
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 TEST01P:SYSTEM
Tablespace UNDOTBS1
Tablespace TEST01P:UNDOTBS1

Creating automatic instance, with SID='hfrF'

initialization parameters used for automatic instance:
db_name=TEST
db_unique_name=hfrF_pitr_test01p_TEST
compatible=12.2.0
db_block_size=8192
db_files=200
diagnostic_dest=D:\APP\ORACLE
_system_trig_enabled=FALSE
sga_target=768M
processes=200
db_create_file_dest=D:\app\oracle\expdp
log_archive_dest_1='location=D:\app\oracle\expdp'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used


starting up automatic instance TEST

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/18/2019 21:52:49
RMAN-04006: error from auxiliary database: ORA-28056: Writing audit records to Windows Event Log failed
ORA-28056: Writing audit records to Windows Event Log failed

--//我以前的測試錯誤出現在這裡。ORA-28056: Writing audit records to Windows Event Log failed。
--//我開始以為windows日誌滿了,清除無效。
--//實際上Oracle服務由Oracle OS使用者執行。這個使用者沒有管理許可權,應該透過本地帳戶執行Oracle服務。
--//重啟資料庫以及監聽重複測試:

RMAN> recover table scott.t OF PLUGGABLE DATABASE test01p until scn 9271668 auxiliary destination 'D:\app\oracle\expdp' datapump destination 'D:\app\oracle\expdp' ;

Starting recover at 2019-07-18 22:02:38
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=182 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 TEST01P:SYSTEM
Tablespace UNDOTBS1
Tablespace TEST01P:UNDOTBS1

Creating automatic instance, with SID='mkyp'

initialization parameters used for automatic instance:
db_name=TEST
db_unique_name=mkyp_pitr_test01p_TEST
compatible=12.2.0
db_block_size=8192
db_files=200
diagnostic_dest=D:\APP\ORACLE
_system_trig_enabled=FALSE
sga_target=768M
processes=200
db_create_file_dest=D:\app\oracle\expdp
log_archive_dest_1='location=D:\app\oracle\expdp'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used

starting up automatic instance TEST

Oracle instance started

Total System Global Area     805306368 bytes

Fixed Size                     8924064 bytes
Variable Size                234882144 bytes
Database Buffers             553648128 bytes
Redo Buffers                   7852032 bytes
Automatic instance created

contents of Memory Script:
{
# set requested point in time
set until  scn 9271668;
# 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 2019-07-18 22:03:57
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=9 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 D:\APP\ORACLE\FAST_RECOVERY_AREA\TEST\TEST\AUTOBACKUP\2019_07_18\O1_MF_S_1013982306_GM0XZ3QX_.BKP
channel ORA_AUX_DISK_1: piece handle=D:\APP\ORACLE\FAST_RECOVERY_AREA\TEST\TEST\AUTOBACKUP\2019_07_18\O1_MF_S_1013982306_GM0XZ3QX_.BKP tag=TAG20190718T214506
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:08
output file name=D:\APP\ORACLE\EXPDP\TEST\CONTROLFILE\O1_MF_GM0Z2NF3_.CTL
Finished restore at 2019-07-18 22:04:10

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 9271668;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile  1 to new;
set newname for clone datafile  8 to new;
set newname for clone datafile  5 to new;
set newname for clone datafile  10 to new;
set newname for clone datafile  3 to new;
set newname for clone datafile  9 to new;
set newname for clone tempfile  1 to new;
set newname for clone tempfile  3 to new;
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile  1, 8, 5, 10, 3, 9;

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
executing command: SET NEWNAME

renamed tempfile 1 to D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_TEMP_%U_.TMP in control file
renamed tempfile 3 to D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_TEMP_%U_.TMP in control file

Starting restore at 2019-07-18 22:04:34
using channel ORA_AUX_DISK_1

Starting restore at 2019-07-18 22:04:34
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 D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_SYSTEM_%U_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00005 to D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_UNDOTBS1_%U_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00003 to D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_SYSAUX_%U_.DBF
channel ORA_AUX_DISK_1: reading from backup piece D:\TMP\BACKUP\FULL20190718_1UU708RA_1_1
channel ORA_AUX_DISK_1: piece handle=D:\TMP\BACKUP\FULL20190718_1UU708RA_1_1 tag=TAG20190718T214058
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:16
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 00008 to D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_SYSTEM_%U_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00010 to D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_UNDOTBS1_%U_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00009 to D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_SYSAUX_%U_.DBF
channel ORA_AUX_DISK_1: reading from backup piece D:\TMP\BACKUP\FULL20190718_1VU708VS_1_1
channel ORA_AUX_DISK_1: piece handle=D:\TMP\BACKUP\FULL20190718_1VU708VS_1_1 tag=TAG20190718T214058
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 2019-07-18 22:07:59

datafile 1 switched to datafile copy
input datafile copy RECID=7 STAMP=1013983682 file name=D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_SYSTEM_GM0Z4OJW_.DBF
datafile 8 switched to datafile copy
input datafile copy RECID=8 STAMP=1013983683 file name=D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_SYSTEM_GM0Z8X3F_.DBF
datafile 5 switched to datafile copy
input datafile copy RECID=9 STAMP=1013983683 file name=D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_UNDOTBS1_GM0Z4OVO_.DBF
datafile 10 switched to datafile copy
input datafile copy RECID=10 STAMP=1013983684 file name=D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_UNDOTBS1_GM0Z8X1F_.DBF
datafile 3 switched to datafile copy
input datafile copy RECID=11 STAMP=1013983684 file name=D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_SYSAUX_GM0Z4OCN_.DBF
datafile 9 switched to datafile copy
input datafile copy RECID=12 STAMP=1013983685 file name=D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_SYSAUX_GM0Z8X9Q_.DBF

contents of Memory Script:
{
# set requested point in time
set until  scn 9271668;
# online the datafiles restored or switched
sql clone "alter database datafile  1 online";
sql clone 'TEST01P' "alter database datafile
 8 online";
sql clone "alter database datafile  5 online";
sql clone 'TEST01P' "alter database datafile
 10 online";
sql clone "alter database datafile  3 online";
sql clone 'TEST01P' "alter database datafile
 9 online";
# recover and open database read only
recover clone database tablespace  "SYSTEM", "TEST01P":"SYSTEM", "UNDOTBS1", "TEST01P":"UNDOTBS1", "SYSAUX", "TEST01P":"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  8 online
sql statement: alter database datafile  5 online
sql statement: alter database datafile  10 online
sql statement: alter database datafile  3 online
sql statement: alter database datafile  9 online

Starting recover at 2019-07-18 22:08:13
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 125 is already on disk as file D:\APP\ORACLE\FAST_RECOVERY_AREA\TEST\TEST\ARCHIVELOG\2019_07_18\O1_MF_1_125_GM0YCYTK_.ARC
archived log file name=D:\APP\ORACLE\FAST_RECOVERY_AREA\TEST\TEST\ARCHIVELOG\2019_07_18\O1_MF_1_125_GM0YCYTK_.ARC thread=1 sequence=125
media recovery complete, elapsed time: 00:00:07
Finished recover at 2019-07-18 22:09:34

sql statement: alter database open read only

}
executing Memory Script

sql statement: alter pluggable database  TEST01P open read only
}
executing Memory Script

sql statement: alter pluggable database  TEST01P 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 =
  ''D:\APP\ORACLE\EXPDP\TEST\CONTROLFILE\O1_MF_GM0Z2NF3_.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     805306368 bytes

Fixed Size                     8924064 bytes
Variable Size                234882144 bytes
Database Buffers             553648128 bytes
Redo Buffers                   7852032 bytes

sql statement: alter system set  control_files =   ''D:\APP\ORACLE\EXPDP\TEST\CONTROLFILE\O1_MF_GM0Z2NF3_.CTL'' comment= ''RMAN set'' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area     805306368 bytes

Fixed Size                     8924064 bytes
Variable Size                234882144 bytes
Database Buffers             553648128 bytes
Redo Buffers                   7852032 bytes

sql statement: alter database mount clone database

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

switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 2019-07-18 22:12:45
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=9 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 00011 to D:\APP\ORACLE\EXPDP\MKYP_PITR_TEST01P_TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_USERS_%U_.DBF
channel ORA_AUX_DISK_1: reading from backup piece D:\TMP\BACKUP\FULL20190718_1VU708VS_1_1
channel ORA_AUX_DISK_1: piece handle=D:\TMP\BACKUP\FULL20190718_1VU708VS_1_1 tag=TAG20190718T214058
starting media recovery restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:16
archived log for thread 1 with sequence 125 is already on disk as file D:\APP\ORACLE\FAST_RECOVERY_AREA\TEST\TEST\ARCHIVELOG\2019_07_18\O1_MF_1_125_GM0YCYTK_.ARC
archived log file name=D:\APP\ORACLE\FAST_RECOVERY_AREA\TEST\TEST\ARCHIVELOG\2019_07_18\O1_MF_1_125_GM0YCYTK_.ARC thread=1 sequence=125
media recovery complete, elapsed time: 00:00:00
Finished recover at 2019-07-18 22:13:24983984 file name=D:\APP\ORACLE\EXPDP\MKYP_PITR_TEST01P_TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_USERS_GM0ZM11M_.DBF

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

executing command: SET until clause

sql statement: alter database datafile  11 online

Starting recover at 2019-07-18 22:13:05
using channel ORA_AUX_DISK_1

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

executing command: SET until clause

sql statement: alter database datafile  11 online

Starting recover at 2019-07-18 22:13:05
using channel ORA_AUX_DISK_1

contents of Memory Script:
{
# create directory for datapump import
sql 'TEST01P' "create or replace directory
TSPITR_DIROBJ_DPDIR as ''
D:\app\oracle\expdp''";
# create directory for datapump export
sql clone 'TEST01P' "create or replace directory
TSPITR_DIROBJ_DPDIR as ''
D:\app\oracle\expdp''";
}
executing Memory Script

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''D:\app\oracle\expdp''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''D:\app\oracle\expdp''

Performing export of tables...
   EXPDP> Starting "SYS"."TSPITR_EXP_mkyp_ruhs":
   EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
   EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
   EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
   EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
   EXPDP> . . exported "SCOTT"."T"                                 2.253 MB   18612 rows
   EXPDP> Master table "SYS"."TSPITR_EXP_mkyp_ruhs" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TSPITR_EXP_mkyp_ruhs is:
   EXPDP>   D:\APP\ORACLE\EXPDP\TSPITR_MKYP_44886.DMP
   EXPDP> Job "SYS"."TSPITR_EXP_mkyp_ruhs" successfully completed at Thu Jul 18 22:19:16 2019 elapsed 0 00:02:25
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_mkyp_kDCe" successfully loaded/unloaded
   IMPDP> Starting "SYS"."TSPITR_IMP_mkyp_kDCe":
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
   IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
   IMPDP> . . imported "SCOTT"."T"                                 2.253 MB   18612 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_mkyp_kDCe" successfully completed at Thu Jul 18 22:22:22 2019 elapsed 0 00:01:55
Import completed

Removing automatic instance
Automatic instance removed
auxiliary instance file D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_TEMP_GM0ZG7FQ_.TMP deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_TEMP_GM0ZF89Y_.TMP deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\MKYP_PITR_TEST01P_TEST\ONLINELOG\O1_MF_3_GM0ZN5ST_.LOG deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\MKYP_PITR_TEST01P_TEST\ONLINELOG\O1_MF_2_GM0ZN5PG_.LOG deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\MKYP_PITR_TEST01P_TEST\ONLINELOG\O1_MF_1_GM0ZN5P0_.LOG deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\MKYP_PITR_TEST01P_TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_USERS_GM0ZM11M_.DBF deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_SYSAUX_GM0Z8X9Q_.DBF deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_SYSAUX_GM0Z4OCN_.DBF deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_UNDOTBS1_GM0Z8X1F_.DBF deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_UNDOTBS1_GM0Z4OVO_.DBF deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\TEST\C287357CE3D5470AA01668B945336F73\DATAFILE\O1_MF_SYSTEM_GM0Z8X3F_.DBF deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\TEST\DATAFILE\O1_MF_SYSTEM_GM0Z4OJW_.DBF deleted
auxiliary instance file D:\APP\ORACLE\EXPDP\TEST\CONTROLFILE\O1_MF_GM0Z2NF3_.CTL deleted
auxiliary instance file tspitr_mkyp_44886.dmp deleted
Finished recover at 2019-07-18 22:22:28
--//家裡機器硬體不行,好慢!20分鐘才完成。
--//實際oracle就是透過簡單的命令,封包了許多命令來完成這樣的操作。

4.驗證:
SCOTT@test01p> select count(*) from t;
  COUNT(*)
----------
     18612

--//總之這個問題很簡單,主要oracle改變了一些安裝方式,我記憶裡好像選擇administrator使用者是無法安裝的。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2651064/,如需轉載,請註明出處,否則將追究法律責任。

相關文章