oracle10g_rman_syntax testing_upgrade catalog_transport tablespace
"TRANSPORT TABLESPACE" --從備份中為一或多個表空間建立可傳輸表空間
Creates transportable tablespace sets from backup for one or more tablespaces.
Examples
Creating Transporable Tablespaces from Backup with TRANSPORT TABLESPACE: Example
In this example, the tablespaces for the transportable set are tbs_2 and tbs_3, the transportable set files are to be stored at /disk1/transport_dest, and the transportable tablespaces are to be recovered to the present time:
transport tablespace tbs_2, tbs_3
tablespace destination '/disk1/transportdest'
auxiliary destination '/disk1/auxdest'
;
Using TRANSPORT TABLESPACE with a Past Point in Time: Example
In this example, the tablespaces for the transportable set are tbs_2 and tbs_3, the transportable set files are to be stored at /disk1/transport_dest, and the transportable tablespaces are to be recovered to a specific SCN:
transport tablespace tbs_2, tbs_3
tablespace destination '/disk1/transportdest'
auxiliary destination '/disk1/auxdest'
UNTIL SCN 251982;
;
Using TRANSPORT TABLESPACE with Custom File Locations: Example
This example illustrates the use of the optional arguments of TRANSPORT TABLESPACE that control the locations of the Data Pump-related files such as the dump file, as well as the DATAPUMP DIRECTORY which in this case references a directory object mypumpdir:
TRANSPORT TABLESPACE tbs_2
TABLESPACE DESTINATION '/disk1/transportdest'
AUXILIARY DESTINATION '/disk1/auxdest'
DATAPUMP DIRECTORY mypumpdir
DUMP FILE 'mydumpfile.dmp'
IMPORT SCRIPT. 'myimportscript.sql'
EXPORT LOG 'myexportlog.log';
--unregister ,就是從rman catalog不再管理目標庫
Example
Unregistering a Database: Example
In this example, you connect to the target database test1 and then unregister it:
rman TARGET SYS/oracle@test1 CATALOG rman/rman@catdb
RMAN> UNREGISTER DATABASE NOPROMPT;
Unregistering a Database That is Not Unique in Catalog: Example
The following UNIX shell script. unregisters database testdb from the recovery catalog. Because multiple databases called testdb are registered in the recovery catalog, and because RMAN is not connected to the target database (which has already been deleted from the file system), you must run SET DBID:
rman CATALOG rman/rman@catdb
RMAN> RUN
{
SET DBID 1334531173; # specifies test database by DBID
UNREGISTER DATABASE testdb NOPROMPT;
}
--set until sequence|time|scn|restore point
Examples
Performing Incomplete Recovery Until a Log Sequence Number: Example
This example assumes that log sequence 1234 was lost due to a disk failure and the database needs to be recovered by using available archived redo logs.
RUN
{
SET UNTIL SEQUENCE 1234 THREAD 1;
RESTORE CONTROLFILE ;
ALTER DATABASE MOUNT;
RESTORE DATABASE;
RECOVER DATABASE; # recovers through log 1233
ALTER DATABASE OPEN RESETLOGS;
}
Performing Incomplete Recovery to a Specified SCN: Example
This example (which assumes a mounted database) recovers the database until a specified SCN:
RUN
{
ALLOCATE CHANNEL ch1 TYPE sbt;
RESTORE DATABASE;
RECOVER DATABASE UNTIL SCN 1000; # recovers through SCN 999
ALTER DATABASE OPEN RESETLOGS;
}
Performing Incomplete Recovery to a Restore Point: Example
This example (which assumes that the database starts out not mounted) recovers the database until a specified restore point:
STARTUP MOUNT;
RUN
{
SET UNTIL RESTORE POINT 'before_batch';
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
}
Reporting Obsolete Backups: Example
This example assumes that you want to be able to recover to any point within the last week. It considers as obsolete all backups that could be used to recover the database to a point one week ago:
REPORT OBSOLETE UNTIL TIME 'SYSDATE-7';
"UPGRADE CATALOG"
Upgrade the recovery catalog schema from an older version to the version required by the RMAN executable.
Note that UPGRADE CATALOG does not run scripts to perform. the upgrade. Instead, RMAN sends various SQL DDL statements to the recovery catalog to update the recovery catalog schema with new tables, views, columns, and so forth.
Upgrading a Recovery Catalog: Example
This example connects to recovery catalog database recdb at the operating system command line and then upgrades it to a more current version:
% rman CATALOG rcat/rcat@recdb
connected to recovery catalog database
PL/SQL package rcat.DBMS_RCVCAT version 08.00.04 in RCVCAT database is too old
RMAN> UPGRADE CATALOG
recovery catalog owner is rcat
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> UPGRADE CATALOG
recovery catalog upgraded to version 09.00.01
DBMS_RCVMAN package upgraded to version 09.00.01
DBMS_RCVCAT package upgraded to version 09.00.01
Creates transportable tablespace sets from backup for one or more tablespaces.
Examples
Creating Transporable Tablespaces from Backup with TRANSPORT TABLESPACE: Example
In this example, the tablespaces for the transportable set are tbs_2 and tbs_3, the transportable set files are to be stored at /disk1/transport_dest, and the transportable tablespaces are to be recovered to the present time:
transport tablespace tbs_2, tbs_3
tablespace destination '/disk1/transportdest'
auxiliary destination '/disk1/auxdest'
;
Using TRANSPORT TABLESPACE with a Past Point in Time: Example
In this example, the tablespaces for the transportable set are tbs_2 and tbs_3, the transportable set files are to be stored at /disk1/transport_dest, and the transportable tablespaces are to be recovered to a specific SCN:
transport tablespace tbs_2, tbs_3
tablespace destination '/disk1/transportdest'
auxiliary destination '/disk1/auxdest'
UNTIL SCN 251982;
;
Using TRANSPORT TABLESPACE with Custom File Locations: Example
This example illustrates the use of the optional arguments of TRANSPORT TABLESPACE that control the locations of the Data Pump-related files such as the dump file, as well as the DATAPUMP DIRECTORY which in this case references a directory object mypumpdir:
TRANSPORT TABLESPACE tbs_2
TABLESPACE DESTINATION '/disk1/transportdest'
AUXILIARY DESTINATION '/disk1/auxdest'
DATAPUMP DIRECTORY mypumpdir
DUMP FILE 'mydumpfile.dmp'
IMPORT SCRIPT. 'myimportscript.sql'
EXPORT LOG 'myexportlog.log';
--unregister ,就是從rman catalog不再管理目標庫
Example
Unregistering a Database: Example
In this example, you connect to the target database test1 and then unregister it:
rman TARGET SYS/oracle@test1 CATALOG rman/rman@catdb
RMAN> UNREGISTER DATABASE NOPROMPT;
Unregistering a Database That is Not Unique in Catalog: Example
The following UNIX shell script. unregisters database testdb from the recovery catalog. Because multiple databases called testdb are registered in the recovery catalog, and because RMAN is not connected to the target database (which has already been deleted from the file system), you must run SET DBID:
rman CATALOG rman/rman@catdb
RMAN> RUN
{
SET DBID 1334531173; # specifies test database by DBID
UNREGISTER DATABASE testdb NOPROMPT;
}
--set until sequence|time|scn|restore point
Examples
Performing Incomplete Recovery Until a Log Sequence Number: Example
This example assumes that log sequence 1234 was lost due to a disk failure and the database needs to be recovered by using available archived redo logs.
RUN
{
SET UNTIL SEQUENCE 1234 THREAD 1;
RESTORE CONTROLFILE ;
ALTER DATABASE MOUNT;
RESTORE DATABASE;
RECOVER DATABASE; # recovers through log 1233
ALTER DATABASE OPEN RESETLOGS;
}
Performing Incomplete Recovery to a Specified SCN: Example
This example (which assumes a mounted database) recovers the database until a specified SCN:
RUN
{
ALLOCATE CHANNEL ch1 TYPE sbt;
RESTORE DATABASE;
RECOVER DATABASE UNTIL SCN 1000; # recovers through SCN 999
ALTER DATABASE OPEN RESETLOGS;
}
Performing Incomplete Recovery to a Restore Point: Example
This example (which assumes that the database starts out not mounted) recovers the database until a specified restore point:
STARTUP MOUNT;
RUN
{
SET UNTIL RESTORE POINT 'before_batch';
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
}
Reporting Obsolete Backups: Example
This example assumes that you want to be able to recover to any point within the last week. It considers as obsolete all backups that could be used to recover the database to a point one week ago:
REPORT OBSOLETE UNTIL TIME 'SYSDATE-7';
"UPGRADE CATALOG"
Upgrade the recovery catalog schema from an older version to the version required by the RMAN executable.
Note that UPGRADE CATALOG does not run scripts to perform. the upgrade. Instead, RMAN sends various SQL DDL statements to the recovery catalog to update the recovery catalog schema with new tables, views, columns, and so forth.
Upgrading a Recovery Catalog: Example
This example connects to recovery catalog database recdb at the operating system command line and then upgrades it to a more current version:
% rman CATALOG rcat/rcat@recdb
connected to recovery catalog database
PL/SQL package rcat.DBMS_RCVCAT version 08.00.04 in RCVCAT database is too old
RMAN> UPGRADE CATALOG
recovery catalog owner is rcat
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> UPGRADE CATALOG
recovery catalog upgraded to version 09.00.01
DBMS_RCVMAN package upgraded to version 09.00.01
DBMS_RCVCAT package upgraded to version 09.00.01
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-615576/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- tablespace 大檔案,undo,temp tablespace
- db2 sms tablespace 不支援large tablespaceDB2
- Tablespace Space Script
- remap_tablespaceREM
- The SYSAUX Tablespace (40)UX
- [Oracle] 檢視tablespace的使用率(Including temp tablespace)Oracle
- Master Note for Tablespace IssuesAST
- TRANSPORT TABLESPACE總結
- Tablespace Repository (60)
- Oracle OCP(48):UNDO TABLESPACEOracle
- MySQL 5.7 InnoDB Tablespace EncryptionMySql
- Oracle Table and tablespace CompressOracle
- CREATE TABLESPACE命令詳解
- tablespace_name 為nullNull
- How to move Oracle Spatial objects from SYSAUX tablespace to a user defined tablespace [ID 1119758.1OracleObjectUX
- [Oracle Script] check tablespace usage infoOracle
- [Oracle Script] check temp tablespace usageOracle
- Oracle 11g tablespace usageOracle
- 獲取建tablespace sql ddlSQL
- rman:configure exclude for tablespace ...
- CREATE TABLESPACE命令詳解(轉)
- [Oracle] Raw device上Create TablespaceOracledev
- [Shell] Linux monitor tablespace usageLinux
- tablespace point in time recover (tpitr)
- read only tablespace backup restoreREST
- Creating the SYSAUX Tablespace (72)UX
- Specifying the Default Tablespace Type (78)
- 轉 SYSAUX tablespace 100% fullUX
- 【TABLESPACE】使用“ALTER TABLESPACE”命令的“RENAME”功能實現表空間快速重新命名
- How To Move The DB Audit Trails To A New TablespaceAI
- oracle 切換undo tablespace小結Oracle
- Rename Tablespace in Oracle database 10gOracleDatabase
- 批量move tablespace 指令碼範例指令碼
- How to Rename Tablespace In Oracle10gOracle
- 4.Linux monitor tablespace usageLinux
- Expert Tips on Drop Temporary Tablespace Hangs!!
- RMAN: Tablespace Point In Time Recovery (TSPITR)
- Overriding the Default Tablespace Type (79)