Automatic TSPITR in 10G RMAN 19C DBV expdp “TEST” RAC中 thread

TSPITR  注意事项:

19C DBV expdp 不用exp imp

 “TEST”   一定要“” 起来,否则说找不到test tablespace.

RAC中 thread 要指定对,否则过度恢复。

SEQUENCE# 是drop 时的,不是创建时的。

tablespace 默认是offline的,要online, 10G不知道是不是自动的!!

-----------------Automatic TSPITR in 10G RMAN -A walk Through (Doc ID 335851.1)

For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:

Database Name:  PROD
Tablespace Name:  TEST
Table Name:  TEST001
Directory Location:  D:\BACKUP\
 

SCOPE

RMAN automatic Tablespace Point-In-Time Recovery (TSPITR) enables you to quickly recover one or more tablespaces in an Oracle database to an earlier time, without affecting the state of the rest of the tablespaces and other objects in the database.

DETAILS

When performing fully automated TSPITR, letting RMAN manage the entire process. There are only two requirements which we need to specify manually.

1. Auxiliary destination for RMAN to use for the auxiliary set datafiles and other files for the auxiliary instance.

2. Configure any channels required for the TSPITR on the target instance.

    Note: The auxiliary instance will use the same channel configuration as the target instance when performing the TSPITR.

3. Use TS_PITR_CHECK view for identifying and resolving dependencies within the recovery set tablespaces.
    Refer to:
    RMAN Tablespace Point-in-Time Recovery (TSPITR)
 

Case Studies

The following case studies give the audience detailed steps in building a test environment and in practicing the procedure.

Setting up the environment:

1. Created a tablespace test and a table in that tablespace
 

SQL> CREATE TABLESPACE TEST DATAFILE 'D:\BACKUP\TEST.DBF' size 2 M;

SQL> CREATE TABLE TEST001 (id number) TABLESPACE TEST;

SQL> INSERT INTO TEST001 VALUES(100);
1 row created.

SQL> COMMIT;

SQL> SELECT * FROM TEST001;
ID
----------
100

2. Checked the CURRENT LOG Sequence

SQL> SELECT SEQUENCE# FROM V$LOG WHERE STATUS='CURRENT';
SEQUENCE#
----------
135
 

Sequence# 135 is my current log sequence 3. Take a backup of the database and current controlfile using RMAN.

4. Do a few log switches and drop the table.

SQL> DROP TABLE TEST001;
SQL> SELECT SEQUENCE# FROM V$LOG
WHERE STATUS='CURRENT';
SEQUENCE
----------
139

Table was dropped in log sequence 139.  So TSPITR until log sequence 138 will give the table back.

Note: UNTIL TIME TSPITR syntax is :

RMAN> recover tablespace "TEST" until time "23-SEP-2005 10:00:00','DD-MON-YYYY HH24:MI:SS" auxiliary destination 'D:\Backup\temp';

True test starts

1. Connect to RMAN

C:> rman target / catalog <catalog schema>/<password>

2. Now run  TSPITR until log sequence 138. Auxiliary destination is D:\Backup\temp.

RMAN> RECOVER TABLESPACE "TEST" UNTIL LOGSEQ 138 THREAD 1 AUXILIARY DESTINATION 'D:\Backup\temp';

Starting recover at 20-SEP-05
starting full resync of recovery catalog
full resync complete
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=26 devtype=DISK

Creating automatic instance, with SID='ljsA'

initialization parameters used for automatic instance:
db_name=prod
compatible=10.2.0.1.0
db_block_size=8192
db_files=200
db_unique_name=tspitr_prod_ljsA
large_pool_size=1M
shared_pool_size=110M
#No auxiliary parameter file used
db_create_file_dest=D:\Backup\temp
control_files=D:\Backup\temp\cntrl_tspitr_prod_ljsA.f

starting up automatic instance prod

Oracle instance started

Total System Global Area 201326592 bytes

Fixed Size 1247044 bytes
Variable Size 146802876 bytes
Database Buffers 50331648 bytes
Redo Buffers 2945024 bytes
Automatic instance created

contents of Memory Script:
{
# set the until clause
set until logseq 138 thread 1;
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log for tspitr to a resent until time
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
# resync catalog after controlfile restore
resync catalog;
}
executing Memory Script

executing command: SET until clause

Starting restore at 20-SEP-05
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=36 devtype=DISK
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece
+DATA/prod/backupset/2005_09_20/ncnnf0_tag20050920t105610_0.291.569501773
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=+DATA/prod/backupset/2005_09_20/ncnnf0_tag20050920t105610_0.291.569501773
tag=TAG20050920T105610
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
output filename=D:\BACKUP\TEMP\CNTRL_TSPITR_PROD_LJSA.F
Finished restore at 20-SEP-05

sql statement: alter database mount clone database

sql statement: alter system archive log current

sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;

starting full resync of recovery catalog
full resync complete
released channel: ORA_DISK_1
released channel: ORA_AUX_DISK_1

contents of Memory Script:
{
# generated tablespace point-in-time recovery script
# set the until clause
set until logseq 138 thread 1;
plsql <declare
sqlstatement varchar2(512);
offline_not_needed exception;
pragma exception_init(offline_not_needed, -01539);
begin
sqlstatement := 'alter tablespace '|| 'TEST' ||' offline for recover';
krmicd.writeMsg(6162, sqlstatement);
krmicd.execSql(sqlstatement);
exception
when offline_not_needed then
null;
end; >>>;
# set an omf destination filename for restore
set newname for clone datafile 1 to new;
# set an omf destination filename for restore
set newname for clone datafile 2 to new;
# set an omf destination tempfile
set newname for clone tempfile 1 to new;
# set a destination filename for restore
set newname for datafile 6 to
"D:\BACKUP\TEST.DBF";
# rename all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set plus the auxilliary tablespaces
restore clone datafile 1, 2, 6;
switch clone datafile all;
#online the datafiles restored or flipped
sql clone "alter database datafile 1 online";
#online the datafiles restored or flipped
sql clone "alter database datafile 2 online";
#online the datafiles restored or flipped
sql clone "alter database datafile 6 online";

# make the controlfile point at the restored datafiles, then recover them recover clone database tablespace "TEST", "SYSTEM", "UNDOTBS1" delete archivelog;

alter clone database open resetlogs;

# PLUG HERE the creation of a temporary tablespace if export fails due to lack # of temporary space.
## For example in Unix these two lines would do that:
#sql clone "create tablespace aux_tspitr_tmp
# datafile ''/tmp/aux_tspitr_tmp.dbf'' size 500K"; }
executing Memory Script executing command:
SET until clause sql statement: alter tablespace TEST offline for recover executing command:
SET NEWNAME executing command:
SET NEWNAME executing command:
SET NEWNAME executing command:
SET NEWNAME renamed temporary file 1 to D:\BACKUP\TEMP\TSPITR_A\DATAFILE\O1_MF_TEMP_%U_.TMP in control file
Starting restore at 20-SEP-05 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: sid=39 devtype=DISK channel ORA_AUX_DISK_1:
starting datafile backupset restore channel ORA_AUX_DISK_1:
specifying datafile(s) to restore from backup set restoring datafile 00001 to D:\BACKUP\TEMP\TSPITR_A\DATAFILE\O1_MF_SYSTEM_%U_.DBF
restoring datafile 00002 to D:\BACKUP\TEMP\TSPITR_A\DATAFILE\O1_MF_UNDOTBS1_%U_.DBF
restoring datafile 00006 to D:\BACKUP\TEST.DBF channel ORA_AUX_DISK_1:
reading from backup piece +DATA/PROD/backupset/2005_09_20/nnndf0_tag20050920t105434_0.295.569501677 channel ORA_AUX_DISK_1:
restored backup piece 1 piece handle=+DATA/prod/backupset/2005_09_20/nnndf0_tag20050920t105434_0.295.569501677 tag=TAG20050920T105434 channel ORA_AUX_DISK_1:
restore complete, elapsed time: 00:01:06
Finished restore at 20-SEP-05
datafile 1 switched to datafile copy input datafile copy recid=4 stamp=569503256 filename=D:\BACKUP\TEMP\TSPITR_A\DATAFILE\O1_MF_SYSTEM_1LZ8QZF1_.DBF
datafile 2 switched to datafile copy input datafile copy recid=5 stamp=569503256 filename=D:\BACKUP\TEMP\TSPITR_A\DATAFILE\O1_MF_UNDOTBS1_1LZ8QZN7_.DBF
sql statement:
alter database datafile 1 online sql statement:
alter database datafile 2 online sql statement:
alter database datafile 6 online
Starting recover at 20-SEP-05 using channel ORA_AUX_DISK_1
starting media recovery
archive log thread 1 sequence 134 is already on disk as file +DATA/PROD/archivelog/2005_09_20/thread_1_seq_134.292.569501807
archive log thread 1 sequence 135 is already on disk as file +DATA/PROD/archivelog/2005_09_20/thread_1_seq_135.280.569501919
archive log thread 1 sequence 136 is already on disk as file +DATA/PROD/archivelog/2005_09_20/thread_1_seq_136.283.569501925
archive log thread 1 sequence 137 is already on disk as file +DATA/PROD/archivelog/2005_09_20/thread_1_seq_137.297.569501931 archive log filename=+DATA/prod/archivelog/2005_09_20/thread_1_seq_134.292.569501807 thread=1 sequence=134
archive log filename=+DATA/PROD/archivelog/2005_09_20/thread_1_seq_135.280.569501919 thread=1 sequence=135
archive log filename=+DATA/PROD/archivelog/2005_09_20/thread_1_seq_136.283.569501925 thread=1 sequence=136
archive log filename=+DATA/PROD/archivelog/2005_09_20/thread_1_seq_137.297.569501931 thread=1 sequence=137
media recovery complete, elapsed time: 00:00:06
Finished recover at 20-SEP-05
database opened contents of Memory Script:
{
# export the tablespaces in the recovery set host 'exp userid =\"/@(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=oracle)(ARGV0=oracleljsA)(ARGS=^'(DESCRIPTION=(LO AL=YES)(ADDRESS=(PROTOCOL=beq)))^')(ENVS=^'ORACLE_SID=ljsA^'))(CONNECT_DATA=(SID=ljsA))) as sysdba\" point_in_time_recover=y tablespaces= TEST file= tspitr_a.dmp';
# shutdown clone before import shutdown clone immediate
# import the tablespaces in the recovery set host 'imp userid =\"/@ as sysdba\" point_in_time_recover=y file= tspitr_a.dmp';
# online/offline the tablespace imported sql "alter tablespace TEST online"; sql "alter tablespace TEST offline";
# enable autobackups in case user does open resetlogs from RMAN after TSPITR sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
# resync catalog after tspitr finished resync catalog;
}
executing Memory Script Export: Release 10.2.0.1.0 - Production on Tue Sep 20 11:21:40 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc tion With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character
set server uses AL32UTF8 character set (possible charset conversion)
Note: table data (rows) will not be exported
About to export Tablespace Point-in-time Recovery objects...
For tablespace TEST ... .
exporting cluster definitions .
exporting table definitions . .
exporting table TEST001 .
exporting referential integrity constraints .
exporting triggers .
end point-in-time recovery
Export terminated successfully without warnings.

host command complete
database closed
database dismounted
Oracle instance shut down

Import: Release 10.2.0.1.0 - Production on Tue Sep 20 11:22:17 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
About to import Tablespace Point-in-time Recovery objects...
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character
set import server uses AL32UTF8 character set (possible charset conversion) .
importing SYS's objects into SYS . .
importing table "TEST001"
Import terminated successfully without warnings.

host command complete
sql statement: alter tablespace TEST online
sql statement: alter tablespace TEST offline
sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;
starting full resync of recovery catalog full resync complete
Removing automatic instance
Automatic instance removed
auxiliary instance file D:\BACKUP\TEMP\CNTRL_TSPITR_PROD_LJSA.F deleted
auxiliary instance file D:\BACKUP\TEMP\TSPITR_A\DATAFILE\O1_MF_SYSTEM_1LZ8QZF1_.DBF deleted
auxiliary instance file D:\BACKUP\TEMP\TSPITR_A\DATAFILE\O1_MF_UNDOTBS1_1LZ8QZN7_.DBF deleted
auxiliary instance file D:\BACKUP\TEMP\TSPITR_A\DATAFILE\O1_MF_TEMP_1LZ8TSLB_.TMP deleted
auxiliary instance file D:\BACKUP\TEMP\TSPITR_A\ONLINELOG\O1_MF_1_1LZ8TM4X_.LOG deleted
auxiliary instance file D:\BACKUP\TEMP\TSPITR_A\ONLINELOG\O1_MF_2_1LZ8TMSL_.LOG deleted
auxiliary instance file D:\BACKUP\TEMP\TSPITR_A\ONLINELOG\O1_MF_3_1LZ8TNCV_.LOG deleted
Finished recover at 20-SEP-05
TSPITR recovery completed sucessfully.

 

3. Connect to target database using SQLPLUS, put  tablespace test online and check contents:

SQL>ALTER TABLESPACE TEST ONLINE;

SQL> SELECT * FROM TEST001;
ID
----------
100

 

 Recovered the lost table using TSPITR.

---------------------------测试19 C--------------

 SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                            READ WRITE YES
SQL>  CREATE TABLESPACE TEST;

Tablespace created.

SQL>  CREATE TABLE TEST001 (id number) TABLESPACE TEST;

Table created.

SQL>  INSERT INTO TEST001 VALUES(100);

1 row created.

SQL> SELECT * FROM TEST001;

        ID
----------
       100

SQL> SELECT SEQUENCE# FROM V$LOG WHERE STATUS='CURRENT';

 SEQUENCE#
----------
         1
         
SQL> SELECT inst_id, group#,SEQUENCE# ,thread# FROM gV$LOG WHERE STATUS='CURRENT';

   INST_ID     GROUP#  SEQUENCE#    THREAD#
---------- ---------- ---------- ----------
         3          5         11          3
         

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac3 ~]$ rman target / --------------------not SQLPLUS!!!!!!!!

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jul 7 04:19:32 2024
Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454)

RMAN> backup database;

Starting backup at 07-JUL-24
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=28 instance=cdb3 device type=DISK
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=+DATA/CDB/DATAFILE/system.347.1173663209
input datafile file number=00003 name=+DATA/CDB/DATAFILE/sysaux.269.1173663209
input datafile file number=00004 name=+DATA/CDB/DATAFILE/undotbs1.267.1173663209
input datafile file number=00009 name=+DATA/CDB/DATAFILE/undotbs2.270.1173663209
input datafile file number=00017 name=+DATA/CDB/DATAFILE/test.363.1173673135
input datafile file number=00010 name=+DATA/CDB/DATAFILE/undotbs3.265.1173663209
input datafile file number=00007 name=+DATA/CDB/DATAFILE/users.268.1173663209
channel ORA_DISK_1: starting piece 1 at 07-JUL-24
channel ORA_DISK_1: finished piece 1 at 07-JUL-24
piece handle=+DATA1/CDB/BACKUPSET/2024_07_07/nnndf0_tag20240707t041936_0.300.1173673177 tag=TAG20240707T041936 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
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=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.287.1173663255
input datafile file number=00012 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.261.1173663255
input datafile file number=00013 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.274.1173663255
input datafile file number=00014 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.360.1173663255
input datafile file number=00015 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.275.1173663255
input datafile file number=00016 name=+DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.282.1173663255
channel ORA_DISK_1: starting piece 1 at 07-JUL-24
channel ORA_DISK_1: finished piece 1 at 07-JUL-24
piece handle=+DATA1/CDB/06344F62B8C65A17E0636401A8C0F073/BACKUPSET/2024_07_07/nnndf0_tag20240707t041936_0.355.1173673179 tag=TAG20240707T041936 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1173663279
input datafile file number=00006 name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.258.1173663279
input datafile file number=00008 name=+DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.284.1173663279
channel ORA_DISK_1: starting piece 1 at 07-JUL-24
channel ORA_DISK_1: finished piece 1 at 07-JUL-24
piece handle=+DATA1/CDB/0633F844101D69CBE0636401A8C09D55/BACKUPSET/2024_07_07/nnndf0_tag20240707t041936_0.317.1173673183 tag=TAG20240707T041936 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 07-JUL-24

Starting Control File and SPFILE Autobackup at 07-JUL-24
piece handle=+DATA1/CDB/AUTOBACKUP/2024_07_07/s_1173673185.360.1173673185 comment=NONE
Finished Control File and SPFILE Autobackup at 07-JUL-24

RMAN> exit


Recovery Manager complete.
[oracle@rac3 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jul 7 04:19:48 2024
Version 19.20.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL> alter system switch logfile;----!!!!!!!!
/ / / /
System altered.
System altered.

System altered.

SQL>create table TEST002 (id number) TABLESPACE TEST;-----test test002 disappear

Table created.

SQL> SELECT inst_id, group#,SEQUENCE# ,thread# FROM gV$LOG WHERE STATUS='CURRENT';

   INST_ID     GROUP#  SEQUENCE#    THREAD#
---------- ---------- ---------- ----------
         3          6         16          3

SQL> DROP TABLE TEST001;

Table dropped.

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac3 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jul 7 04:21:04 2024
Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454)

RMAN> RECOVER TABLESPACE "TEST" UNTIL LOGSEQ 16 THREAD 3 AUXILIARY DESTINATION '+data1'; -----!!!!!!!16 not 11 ,thread 3 not 1 ,"TEST" not TEST
RMAN> RECOVER TABLESPACE "TEST" UNTIL LOGSEQ 16 THREAD 3 AUXILIARY DESTINATION '+data1'; 

Starting recover at 07-JUL-24
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=51 instance=cdb3 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
Tablespace UNDOTBS2
Tablespace UNDOTBS3

Creating automatic instance, with SID='Cyyx'

initialization parameters used for automatic instance:
db_name=CDB
db_unique_name=Cyyx_pitr_CDB
compatible=19.0.0
db_block_size=8192
db_files=200
diagnostic_dest=/u01/app/oracle
_pdb_name_case_sensitive=false
_system_trig_enabled=FALSE
sga_target=2272M
processes=200
db_create_file_dest=+data1
log_archive_dest_1='location=+data1'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used


starting up automatic instance CDB

Oracle instance started

Total System Global Area    2382363816 bytes

Fixed Size                     9165992 bytes
Variable Size                520093696 bytes
Database Buffers            1845493760 bytes
Redo Buffers                   7610368 bytes
Automatic instance created
Running TRANSPORT_SET_CHECK on recovery set tablespaces
TRANSPORT_SET_CHECK completed successfully

contents of Memory Script:
{
# set requested point in time
set until  logseq 16 thread 3;
# 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';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
}
executing Memory Script

executing command: SET until clause

Starting restore at 07-JUL-24
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=23 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 +DATA1/CDB/AUTOBACKUP/2024_07_07/s_1173674427.300.1173674427
channel ORA_AUX_DISK_1: piece handle=+DATA1/CDB/AUTOBACKUP/2024_07_07/s_1173674427.300.1173674427 tag=TAG20240707T044027
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04
output file name=+DATA1/CDB/CONTROLFILE/current.408.1173674641
Finished restore at 07-JUL-24

sql statement: alter database mount clone database

sql statement: alter system archive log current

sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;

contents of Memory Script:
{
# set requested point in time
set until  logseq 16 thread 3;
plsql <<<--
declare
  sqlstatement       varchar2(512);
  pdbname            varchar2(128);
  offline_not_needed exception;
  pragma exception_init(offline_not_needed, -01539);
begin
   pdbname := null; -- pdbname
  sqlstatement := 'alter tablespace '||  '"TEST"' ||' offline immediate';
  krmicd.writeMsg(6162, sqlstatement);
  krmicd.execSql(sqlstatement, 0, pdbname);
exception
  when offline_not_needed then
    null;
end; >>>;
# 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  9 to new;
set newname for clone datafile  10 to new;
set newname for clone datafile  3 to new;
set newname for clone tempfile  1 to new;
set newname for datafile  19 to 
 "+DATA/CDB/DATAFILE/test.363.1173674275";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile  1, 4, 9, 10, 3, 19;
 
switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

sql statement: alter tablespace "TEST" offline immediate

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 +data1 in control file

Starting restore at 07-JUL-24
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 +data1
channel ORA_AUX_DISK_1: restoring datafile 00004 to +data1
channel ORA_AUX_DISK_1: restoring datafile 00009 to +data1
channel ORA_AUX_DISK_1: restoring datafile 00010 to +data1
channel ORA_AUX_DISK_1: restoring datafile 00003 to +data1
channel ORA_AUX_DISK_1: restoring datafile 00019 to +DATA/CDB/DATAFILE/test.363.1173674275
channel ORA_AUX_DISK_1: reading from backup piece +DATA1/CDB/BACKUPSET/2024_07_07/nnndf0_tag20240707t044017_0.360.1173674417
channel ORA_AUX_DISK_1: piece handle=+DATA1/CDB/BACKUPSET/2024_07_07/nnndf0_tag20240707t044017_0.360.1173674417 tag=TAG20240707T044017
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 07-JUL-24

datafile 1 switched to datafile copy
input datafile copy RECID=30 STAMP=1173674654 file name=+DATA1/CDB/DATAFILE/system.384.1173674647
datafile 4 switched to datafile copy
input datafile copy RECID=31 STAMP=1173674654 file name=+DATA1/CDB/DATAFILE/undotbs1.350.1173674647
datafile 9 switched to datafile copy
input datafile copy RECID=32 STAMP=1173674654 file name=+DATA1/CDB/DATAFILE/undotbs2.357.1173674647
datafile 10 switched to datafile copy
input datafile copy RECID=33 STAMP=1173674654 file name=+DATA1/CDB/DATAFILE/undotbs3.338.1173674647
datafile 3 switched to datafile copy
input datafile copy RECID=34 STAMP=1173674654 file name=+DATA1/CDB/DATAFILE/sysaux.418.1173674647

contents of Memory Script:
{
# set requested point in time
set until  logseq 16 thread 3;
# 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  9 online";
sql clone "alter database datafile  10 online";
sql clone "alter database datafile  3 online";
sql clone "alter database datafile  19 online";
# recover and open resetlogs
recover clone database tablespace  "TEST", "SYSTEM", "UNDOTBS1", "UNDOTBS2", "UNDOTBS3", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
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  9 online

sql statement: alter database datafile  10 online

sql statement: alter database datafile  3 online

sql statement: alter database datafile  19 online

Starting recover at 07-JUL-24
using channel ORA_AUX_DISK_1

Executing: alter database datafile 7 offline
Executing: alter database datafile 5, 6, 8 offline
Executing: alter database datafile 11, 12, 13, 14, 15, 16 offline
starting media recovery

archived log for thread 3 with sequence 11 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_11.353.1173674485
archived log for thread 3 with sequence 12 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_12.417.1173674487
archived log for thread 3 with sequence 13 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_13.359.1173674491
archived log for thread 3 with sequence 14 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_14.404.1173674491
archived log for thread 3 with sequence 15 is already on disk as file +DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_15.343.1173674493
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_11.353.1173674485 thread=3 sequence=11
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_12.417.1173674487 thread=3 sequence=12
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_13.359.1173674491 thread=3 sequence=13
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_14.404.1173674491 thread=3 sequence=14
archived log file name=+DATA1/CDB/ARCHIVELOG/2024_07_07/thread_3_seq_15.343.1173674493 thread=3 sequence=15
media recovery complete, elapsed time: 00:00:02
Finished recover at 07-JUL-24

database opened

contents of Memory Script:
{
# make read only the tablespace that will be exported
sql clone 'alter tablespace  "TEST" read only';
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
+data1''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
+data1''";
}
executing Memory Script

sql statement: alter tablespace  "TEST" read only

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''+data1''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''+data1''

Performing export of metadata...
   EXPDP> 
Warning: Oracle Data Pump operations are not typically needed when connected to the root or seed of a container database.

   EXPDP> Starting "SYS"."TSPITR_EXP_Cyyx_jqEk":  
   EXPDP> ORA-39327: Oracle Database Vault data is being stored unencrypted in dump file set.
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/TABLE_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   EXPDP> Master table "SYS"."TSPITR_EXP_Cyyx_jqEk" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TSPITR_EXP_Cyyx_jqEk is:
   EXPDP>   +DATA1/tspitr_cyyx_14541.dmp
   EXPDP> ******************************************************************************
   EXPDP> Datafiles required for transportable tablespace TEST:
   EXPDP>   +DATA/CDB/DATAFILE/test.363.1173674275
   EXPDP> Job "SYS"."TSPITR_EXP_Cyyx_jqEk" completed with 1 error(s) at Sun Jul 7 04:44:45 2024 elapsed 0 00:00:19
Export completed


contents of Memory Script:
{
# shutdown clone before import
shutdown clone abort
# drop target tablespaces before importing them back
sql 'drop tablespace  "TEST" including contents keep datafiles cascade constraints';
}
executing Memory Script

Oracle instance shut down

sql statement: drop tablespace  "TEST" including contents keep datafiles cascade constraints

Performing import of metadata...--------------!!!
   IMPDP> 
Warning: Oracle Data Pump operations are not typically needed when connected to the root or seed of a container database.

   IMPDP> Master table "SYS"."TSPITR_IMP_Cyyx_cxin" successfully loaded/unloaded
   IMPDP> Starting "SYS"."TSPITR_IMP_Cyyx_cxin":  
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/TABLE_STATISTICS
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   IMPDP> Job "SYS"."TSPITR_IMP_Cyyx_cxin" successfully completed at Sun Jul 7 04:45:05 2024 elapsed 0 00:00:14
Import completed


contents of Memory Script:
{
# make read write and offline the imported tablespaces
sql 'alter tablespace  "TEST" read write';
sql 'alter tablespace  "TEST" offline';
# enable autobackups after TSPITR is finished
sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
}
executing Memory Script

sql statement: alter tablespace  "TEST" read write

sql statement: alter tablespace  "TEST" offline

sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;

Removing automatic instance
Automatic instance removed
auxiliary instance file +DATA1/CDB/TEMPFILE/temp.351.1173674661 deleted
auxiliary instance file +DATA1/CDB/ONLINELOG/group_6.283.1173674659 deleted
auxiliary instance file +DATA1/CDB/ONLINELOG/group_5.284.1173674659 deleted
auxiliary instance file +DATA1/CDB/ONLINELOG/group_4.295.1173674659 deleted
auxiliary instance file +DATA1/CDB/ONLINELOG/group_3.294.1173674659 deleted
auxiliary instance file +DATA1/CDB/ONLINELOG/group_2.307.1173674659 deleted
auxiliary instance file +DATA1/CDB/ONLINELOG/group_1.335.1173674659 deleted
auxiliary instance file +DATA1/CDB/DATAFILE/sysaux.418.1173674647 deleted
auxiliary instance file +DATA1/CDB/DATAFILE/undotbs3.338.1173674647 deleted
auxiliary instance file +DATA1/CDB/DATAFILE/undotbs2.357.1173674647 deleted
auxiliary instance file +DATA1/CDB/DATAFILE/undotbs1.350.1173674647 deleted
auxiliary instance file +DATA1/CDB/DATAFILE/system.384.1173674647 deleted
auxiliary instance file +DATA1/CDB/CONTROLFILE/current.408.1173674641 deleted
auxiliary instance file tspitr_Cyyx_14541.dmp deleted
Finished recover at 07-JUL-24

RMAN> report schema;

Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    1170     SYSTEM               YES     +DATA/CDB/DATAFILE/system.347.1173663209
3    920      SYSAUX               NO      +DATA/CDB/DATAFILE/sysaux.269.1173663209
4    615      UNDOTBS1             YES     +DATA/CDB/DATAFILE/undotbs1.267.1173663209
5    510      PDB$SEED:SYSTEM      NO      +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1173663279
6    480      PDB$SEED:SYSAUX      NO      +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.258.1173663279
7    5        USERS                NO      +DATA/CDB/DATAFILE/users.268.1173663209
8    215      PDB$SEED:UNDOTBS1    NO      +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.284.1173663279
9    250      UNDOTBS2             YES     +DATA/CDB/DATAFILE/undotbs2.270.1173663209
10   75       UNDOTBS3             YES     +DATA/CDB/DATAFILE/undotbs3.265.1173663209
11   510      PDB:SYSTEM           NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.287.1173663255
12   490      PDB:SYSAUX           NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.261.1173663255
13   215      PDB:UNDOTBS1         NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.274.1173663255
14   215      PDB:UNDO_3           NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.360.1173663255
15   215      PDB:UNDO_4           NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.275.1173663255
16   5        PDB:USERS            NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.282.1173663255
20   0        TEST                 NO      +DATA/CDB/DATAFILE/test.363.1173674275------------------------!!!!!!!!!!!!size 0 

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    22       TEMP                 32767       +DATA/CDB/TEMPFILE/temp.263.1173663343
2    36       PDB$SEED:TEMP        32767       +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.264.1173663347

RMAN> 


------------------ not like restore , recover will change datafile id
 
SQL> SELECT * FROM TEST001;
SELECT * FROM TEST001
              *
ERROR at line 1:
ORA-00376: file 18 cannot be read at this time
ORA-01110: data file 18: '+DATA/CDB/DATAFILE/test.363.1173673135'


SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 1 - file is in use or recovery
ORA-01110: data file 1: '+DATA/CDB/DATAFILE/system.347.1173663209'


RMAN> report schema;

using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name CDB

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    1170     SYSTEM               YES     +DATA/CDB/DATAFILE/system.347.1173663209
3    910      SYSAUX               NO      +DATA/CDB/DATAFILE/sysaux.269.1173663209
4    615      UNDOTBS1             YES     +DATA/CDB/DATAFILE/undotbs1.267.1173663209
5    510      PDB$SEED:SYSTEM      NO      +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/system.293.1173663279
6    480      PDB$SEED:SYSAUX      NO      +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/sysaux.258.1173663279
7    5        USERS                NO      +DATA/CDB/DATAFILE/users.268.1173663209
8    215      PDB$SEED:UNDOTBS1    NO      +DATA/CDB/0633F844101D69CBE0636401A8C09D55/DATAFILE/undotbs1.284.1173663279
9    250      UNDOTBS2             YES     +DATA/CDB/DATAFILE/undotbs2.270.1173663209
10   75       UNDOTBS3             YES     +DATA/CDB/DATAFILE/undotbs3.265.1173663209
11   510      PDB:SYSTEM           NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/system.287.1173663255
12   490      PDB:SYSAUX           NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/sysaux.261.1173663255
13   215      PDB:UNDOTBS1         NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undotbs1.274.1173663255
14   215      PDB:UNDO_3           NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_3.360.1173663255
15   215      PDB:UNDO_4           NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/undo_4.275.1173663255
16   5        PDB:USERS            NO      +DATA/CDB/06344F62B8C65A17E0636401A8C0F073/DATAFILE/users.282.1173663255
18   0        TEST                 NO      +DATA/CDB/DATAFILE/test.363.1173673135

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    22       TEMP                 32767       +DATA/CDB/TEMPFILE/temp.263.1173663343
2    36       PDB$SEED:TEMP        32767       +DATA/CDB/0633F844101D69CBE0636401A8C09D55/TEMPFILE/temp.264.1173663347

  
*
ERROR at line 1:
ORA-00376: file 18 cannot be read at this time
ORA-01110: data file 18: '+DATA/CDB/DATAFILE/test.363.1173673135'


SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac3 ~]$ rman target / 

RMAN> recover tablespace "TEST";

Starting recover at 07-JUL-24
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=66 instance=cdb3 device type=DISK

starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/07/2024 04:31:09
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover
 if needed datafile 18
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 18 - file is in use or recovery
ORA-01110: data file 18: '+DATA/CDB/DATAFILE/test.363.1173673135'

RMAN> alter tablespace test offline;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 07/07/2024 04:31:25
ORA-01539: tablespace 'TEST' is not online

RMAN> recover tablespace "TEST" ;

Starting recover at 07-JUL-24
using channel ORA_DISK_1

starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/07/2024 04:31:48
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover
 if needed datafile 18
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 18 - file is in use or recovery
ORA-01110: data file 18: '+DATA/CDB/DATAFILE/test.363.1173673135'

RMAN> alter tablespace test online;

Statement processed

RMAN> select *from TEST001;

        ID
----------
       100

RMAN> select *from TEST002;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 07/07/2024 04:32:20
ORA-00942: table or view does not exist

RMAN> exit


Recovery Manager complete.
[oracle@rac3 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jul 7 04:32:37 2024
Version 19.20.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL> SELECT * FROM TEST001;

        ID
----------
       100

SQL> SELECT * FROM TEST002;                   
SELECT * FROM TEST002
              *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac3 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Jul 7 04:33:00 2024
Version 19.20.0.0.0

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

connected to target database: CDB (DBID=2265125454)

RMAN> 


---------------------- test again

RMAN> SELECT * FROM TEST001;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 07/07/2024 04:46:46
ORA-00376: file 20 cannot be read at this time
ORA-01110: data file 20: '+DATA/CDB/DATAFILE/test.363.1173674275'

RMAN> alter database datafile 18 online;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 07/07/2024 04:49:25
ORA-01516: nonexistent log file, data file, or temporary file "18" in the current container

RMAN> alter tablespace test online;

Statement processed

RMAN> SELECT * FROM TEST001;

        ID
----------
       100

RMAN>  SELECT * FROM TEST002;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 07/07/2024 04:51:17
ORA-00942: table or view does not exist

RMAN> 

---------------------------不能再次恢复了--expdp 导出数据字典,沿用旧的datafile-----------------------


 
 RMAN>  RECOVER TABLESPACE "TEST" UNTIL LOGSEQ 16 THREAD 3 AUXILIARY DESTINATION '+data1';

Starting recover at 07-JUL-24
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 UNDOTBS1
Tablespace UNDOTBS2
Tablespace UNDOTBS3

Creating automatic instance, with SID='qsCl'

initialization parameters used for automatic instance:
db_name=CDB
db_unique_name=qsCl_pitr_CDB
compatible=19.0.0
db_block_size=8192
db_files=200
diagnostic_dest=/u01/app/oracle
_pdb_name_case_sensitive=false
_system_trig_enabled=FALSE
sga_target=2272M
processes=200
db_create_file_dest=+data1
log_archive_dest_1='location=+data1'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used


starting up automatic instance CDB

Oracle instance started

Total System Global Area    2382363816 bytes

Fixed Size                     9165992 bytes
Variable Size                520093696 bytes
Database Buffers            1845493760 bytes
Redo Buffers                   7610368 bytes
Automatic instance created

Removing automatic instance
shutting down automatic instance 
Oracle instance shut down
Automatic instance removed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/07/2024 04:52:32
RMAN-05002: aborting Tablespace Point-in-Time Recovery
RMAN-05073: Tablespace TEST creation SCN 7627742 is ahead of point-in-time SCN 7626106

RMAN> RECOVER TABLESPACE "TEST" UNTIL LOGSEQ 17 THREAD 3 AUXILIARY DESTINATION '+data1'; 

Starting recover at 07-JUL-24
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 UNDOTBS1
Tablespace UNDOTBS2
Tablespace UNDOTBS3

Creating automatic instance, with SID='wgkE'

initialization parameters used for automatic instance:
db_name=CDB
db_unique_name=wgkE_pitr_CDB
compatible=19.0.0
db_block_size=8192
db_files=200
diagnostic_dest=/u01/app/oracle
_pdb_name_case_sensitive=false
_system_trig_enabled=FALSE
sga_target=2272M
processes=200
db_create_file_dest=+data1
log_archive_dest_1='location=+data1'
enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No auxiliary parameter file used


starting up automatic instance CDB

Oracle instance started

Total System Global Area    2382363816 bytes

Fixed Size                     9165992 bytes
Variable Size                520093696 bytes
Database Buffers            1845493760 bytes
Redo Buffers                   7610368 bytes
Automatic instance created

Removing automatic instance
shutting down automatic instance 
Oracle instance shut down
Automatic instance removed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/07/2024 04:52:51
RMAN-05002: aborting Tablespace Point-in-Time Recovery
RMAN-05073: Tablespace TEST creation SCN 7627742 is ahead of point-in-time SCN 7626239

RMAN> SELECT * FROM TEST001;

        ID
----------
       100

RMAN> 

RMAN> 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/42502.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【WPF】桌面程序开发之xaml页面基础布局方式详解

使用Visual Studio开发工具&#xff0c;我们可以编写在Windows系统上运行的桌面应用程序。其中&#xff0c;WPF&#xff08;Windows Presentation Foundation&#xff09;项目是一种常见的选择。然而&#xff0c;对于初学者来说&#xff0c;WPF项目中xaml页面的布局设计可能是一…

EtherCAT转Profinet网关配置说明第三讲:博图配置

EtherCAT协议转Profinet协议网关模块&#xff08;XD-ECPNS20&#xff09;是实现EtherCAT协议和Profinet协议之间无缝通讯的重要设备。使EtherCAT协议和Profinet协议能够相互转换&#xff0c;进行工控自动化里的互连和传送数据。 EtherCAT作为一种高性能实时以太网通信协议&…

11、广告-数据统计原理

数据统计原理 数据统计是程序化广告中非常重要的一环&#xff0c;通过对广告数据和用户行为数据的统计分析&#xff0c;广告主可以评估广告效果、优化投放策略&#xff0c;提升用户转化率和广告收益。以下是关于数据统计原理的详细介绍&#xff1a; 一、Web统计逻辑 浏览器请…

【讲解下iOS语言基础】

&#x1f308;个人主页: 程序员不想敲代码啊 &#x1f3c6;CSDN优质创作者&#xff0c;CSDN实力新星&#xff0c;CSDN博客专家 &#x1f44d;点赞⭐评论⭐收藏 &#x1f91d;希望本文对您有所裨益&#xff0c;如有不足之处&#xff0c;欢迎在评论区提出指正&#xff0c;让我们共…

1431. 拥有最多糖果的孩子

1431. 拥有最多糖果的孩子 题目链接&#xff1a;1431. 拥有最多糖果的孩子 代码如下&#xff1a; class Solution { public:vector<bool> kidsWithCandies(vector<int>& candies, int extraCandies) {vector<bool> res(candies.size(),false);int max…

2024中国深圳国际新能源暨清洁能源产业展览会(高交会)

105个国家、5000家参展商、40万㎡展览规模、50万买家客户参观&#xff0c;高交会清洁能源展11月中旬将盛大启幕&#xff1b; ——在科技日新月异、产业融合加速的时代浪潮中&#xff0c;一场备受瞩目的科技盛会即将拉开帷幕&#xff0c;「第二十六届中国国际储能技术与设备展览…

【Linux详解】进程等待 | 非阻塞轮询

引入&#xff1a; 为什么&#xff1f;是什么&#xff1f;怎么办 是什么&#xff1f; 进程等待是指父进程暂停自己的执行&#xff0c;直到某个特定的子进程结束或发生某些特定的事件。 为什么&#xff1f; 僵尸进程刀枪不入&#xff0c;不可被杀死&#xff0c;存在内存泄露…

Linux_实现简易日志系统

目录 1、认识可变参数 2、解析可变参数 3、打印可变参数 3.1 va_list 3.2 va_start 3.3 va_arg 3.4 va_end 3.5 小结 4、实现日志 4.1 日志左半部分 4.2 日志右半部分 4.3 日志的存档归类 结语 前言&#xff1a; 在Linux下实现一个日志系统&#xff0c;该日…

ffmpeg图片视频编辑器工具的安装与使用

title: ffmpeg图片视频编辑器工具的安装与使用 tags: [ffmpeg, 图片, 音频, 视频, 工具, 流媒体] categories: [工具, ffmpeg] FFmpeg是一个开源的命令行工具&#xff0c;广泛用于处理视频和音频文件&#xff0c;包括转换格式、剪辑、混流、解码、编码等。以下是一些基本的FFmp…

Gunicorn配置指南:掌握最大并发连接数设置

摘要 Gunicorn 是一个 Python WSGI HTTP 服务器&#xff0c;广泛用于生产环境中部署 Python web 应用。合理配置 Gunicorn 的最大并发连接数对于优化服务器性能和资源利用至关重要。本文将详细介绍如何在 Gunicorn 中配置最大并发连接数&#xff0c;并探讨相关的配置选项和最佳…

补充:特征缩放技术(归一化与标准化)与学习率的选取和特征转换符合高斯分布

文章目录 前言一、特征缩放技术1. 标准化(Standardization)2. 归一化(Normalization)3 sklearn高级接口二、学习率的选取三、将特征转换为近似符合高斯分布1. 取对数变换(Log Transformation)原理为什么有效?2. 平方根变换(Square Root Transformation)原理为什么有效…

java项目总结6

目录 1.双列集合 2.map的三种遍历方式&#xff1a; 1.键找值 2.键值对 3.lambda遍历map 3.HashMap 例子&#xff1a;统计字符出现次数 4.LinkedHashMap 5.TreeMap 6.可变参数 7.Collections: 1.双列集合 双列集合特点&#xff1a; 定义Map<String&#xff0c;St…

Linux中的管道符‘|‘以及SQL(DQL,DCL)

ls 指令 语法&#xff1a; ls [选项][目录或文件] 功能&#xff1a; 对于目录&#xff0c;该命令列出该目录下的所有子目录与文件。对于文件&#xff0c;将列出文件名以及其他信息。 常用选项&#xff1a; -a 列出目录下的所有文件&#xff0c;包括以 . 开头的隐含文件。 -…

自注意力机制和多头注意力机制区别

Ref&#xff1a;小白看得懂的 Transformer (图解) Ref&#xff1a;一文彻底搞懂 Transformer&#xff08;图解手撕&#xff09; 多头注意力机制&#xff08;Multi-Head Attention&#xff09;和自注意力机制&#xff08;Self-Attention&#xff09;是现代深度学习模型&#x…

ntp服务器地址

推荐 阿里云 ntp.aliyun.com 腾讯云 ntp.tencent.com 海康威视 time.ys7.com 苹果 time.apple.com time.asia.apple.com 尚可 NTP域名授时快速服务(www.ntp.org.cn) cn.ntp.org.cn 高通Qualcomm 位置 &#xff08;XTRA 预测卫星数据服务&#xff09; time.izatcloud.net 国家授…

昇思25天学习打卡营第19天|Pix2Pix实现图像转换

1. 学习内容复盘 Pix2Pix概述 Pix2Pix是基于条件生成对抗网络&#xff08;cGAN, Condition Generative Adversarial Networks &#xff09;实现的一种深度学习图像转换模型&#xff0c;该模型是由Phillip Isola等作者在2017年CVPR上提出的&#xff0c;可以实现语义/标签到真实…

点胶系统实战1-项目介绍

准备实战开发如下图的多轴点胶系统实战课程&#xff0c;内容设计界面开发、运动板块开发、任务管理、点胶的控制等。我们将和进入这个领域的初学者门一起进步。 有感兴趣的小伙伴&#xff0c;可以关注点赞&#xff0c;或评论区反馈你们的重点关注的内容&#xff0c;那些部分我…

Postman使用指南①网页版使用

postman官网地址&#xff1a;Postman API Platform 进入后点击右上角免费注册&#xff0c;注册后登录 登录之后即可在网页使用&#xff0c;无需下载

线上问题---反思与回顾

线上问题一&#xff1a;麦哲伦2.0 人群配置不生效 发现背景&#xff1a;产品发现三层模型部分计划个别测试计划圈选人群特征与数仓统计数据的人群不一致&#xff0c;向值班人员反馈 根因定位&#xff1a; &#xff08;1&#xff09;用户配置三层模型计划时&#xff0c;配置单…

RNN 交叉熵

RNN善于处理时序 序列数据 简单RNN 展开就是 LSTM 遗忘门f_t决定上期记忆保留多少 隐藏层 在神经网络中&#xff0c;隐藏层指的是除了输入层和输出层之外的层&#xff0c;它们的输出不会直接用于网络的最终输出&#xff0c;而是作为中间步骤用于提取和转换数据。因此&#x…