oracle10g_rman_語法測試_5
bash-3.00$ export ORACLE_SID=newly ---rman catalog庫
bash-3.00$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.2.0 - Production on Sat Sep 19 13:18:24 2009
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
???:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> show parameter db_na
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string newly
SQL> alter session set nls_language=american;
Session altered.
SQL> create tablespace cattbs datafile '/oracle/newly/cattbs.dbf' size 500m;--建立一個rman catalog使用者對應儲存的表空間
Tablespace created.
SQL> create user rman identified by system default tablespace cattbs quota unlimited on cattbs;--建立一個rman catalog使用者
User created.
SQL> grant recovery_catalog_owner to rman;--給rman catalog使用者授權,非常重要,必須要
Grant succeeded.
SQL> exit
bash-3.00$ rman target "sys/system@ora10g" catalog rman/system@newly --利用rman同時連線目標庫(備份目標庫)及rman catalog庫
Recovery Manager: Release 10.2.0.2.0 - Production on Sat Sep 19 13:38:21 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORA10G (DBID=4016423416)
connected to recovery catalog database
RMAN> create script. backup_db --在rman catalog中構建指令碼
2> comment 'backup db and logs'
3> {
4> backup incremental level 0 tag incr_whole_10
5> database plus archivelog;
6> }
created script. backup_db
RMAN> create global script. global_backup_db
2> comment 'backup any database from the recovery catalog and logs'
3> { backup database plus archivelog;}
created global script. global_backup_db
RMAN> create script. backup_db
2> comment 'backup db and logs'
3> {
4> backup incremental level 0 tag incr_whole_10
5> database plus archivelog;
6> }
created script. backup_db
RMAN> print script. backup_db; --顯示指令碼
printing stored script. backup_db
{backup database plus archivelog;
}
RMAN> print script. backup_db to file '/oracle/newly/output.rman';---把指定的指令碼導向到指定的檔案
script. backup_db written to file /oracle/newly/output.rman
RMAN> replace script. backup_db --更新指令碼
2> comment 'run this to back up the db'
3> {
4> #uses configured channel for default device type
5> backup database;
6> }
replaced script. backup_db
RMAN> replace script. backup_db from file '/oracle/newly/output.rman'; ---以指定的檔案更新指令碼
script. commands will be loaded from file /oracle/newly/output.rman
replaced script. backup_db
RMAN> run ---執行指令碼,必須在run塊中
2> {
3> execute script. backup_db;
4> }
executing script. backup_db
Starting backup at 19-SEP-09
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=138 devtype=DISK
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=2 recid=18 stamp=697895462
input archive log thread=1 sequence=3 recid=19 stamp=697895462
input archive log thread=1 sequence=4 recid=20 stamp=697895462
input archive log thread=1 sequence=5 recid=21 stamp=697895462
input archive log thread=1 sequence=6 recid=17 stamp=697895461
channel ORA_DISK_1: starting piece 1 at 19-SEP-09
channel ORA_DISK_1: finished piece 1 at 19-SEP-09
piece handle=/oracle/auto/backup_3hkpkv3k_1_1 tag=TAG20090919T141059 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:26
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=12 recid=15 stamp=697892624
input archive log thread=1 sequence=13 recid=16 stamp=697893507
input archive log thread=1 sequence=14 recid=22 stamp=697985490
input archive log thread=1 sequence=15 recid=23 stamp=697990254
channel ORA_DISK_1: starting piece 1 at 19-SEP-09
channel ORA_DISK_1: finished piece 1 at 19-SEP-09
piece handle=/oracle/auto/backup_3ikpkv4f_1_1 tag=TAG20090919T141059 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 19-SEP-09
Starting backup at 19-SEP-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oracle/oradata/ora10g/system01.dbf
input datafile fno=00003 name=/oracle/oradata/ora10g/sysaux01.dbf
input datafile fno=00005 name=/oracle/zxy.dbf
input datafile fno=00002 name=/oracle/oradata/ora10g/undotbs01.dbf
input datafile fno=00004 name=/oracle/oradata/ora10g/users01.dbf
channel ORA_DISK_1: starting piece 1 at 19-SEP-09
channel ORA_DISK_1: finished piece 1 at 19-SEP-09
piece handle=/oracle/auto/backup_3jkpkv4o_1_1 tag=TAG20090919T141136 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
Finished backup at 19-SEP-09
Starting backup at 19-SEP-09
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=16 recid=24 stamp=697990364
channel ORA_DISK_1: starting piece 1 at 19-SEP-09
channel ORA_DISK_1: finished piece 1 at 19-SEP-09
piece handle=/oracle/auto/backup_3kkpkv6u_1_1 tag=TAG20090919T141246 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 19-SEP-09
Starting Control File and SPFILE Autobackup at 19-SEP-09
piece handle=/oracle/c-4016423416-20090919-00 comment=NONE
Finished Control File and SPFILE Autobackup at 19-SEP-09
RMAN>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-615033/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle10g_rman_語法測試_1Oracle
- oracle10g_rman_語法測試_2Oracle
- oracle10g_rman_語法測試_3Oracle
- oracle10g_rman_語法測試_4Oracle
- oracle10g_rman_語法測試_6Oracle
- oracle10g_rman_語法測試_7Oracle
- oracle10g_rman_語法測試_8Oracle
- oracle10g_rman_語法測試_10Oracle
- oracle10g_rman_語法測試_restore專題OracleREST
- oracle10g_rman_語法測試_show專題Oracle
- oracle10g_rman_語法測試_spool_sql_startupOracleSQL
- oracle10g_rman_語法測試_reset database_allocate channel_OracleDatabase
- if測試和語法規則
- 前端測試框架Jest——語法篇前端框架
- python語法-測試程式碼Python
- 軟體測試培訓之:白盒測試的語句覆蓋法和判定覆蓋法
- html5語法HTML
- 【5】測試用例
- PJzhang:搜尋引擎高階語法與滲透測試
- H5測試||測試執行階段測啥H5
- JUnit5的條件測試、巢狀測試、重複測試巢狀
- python介面自動化測試之python基礎語法Python
- 軟體測試術語
- Spring(5) -(14) pointcut 語法Spring
- HTML5語法總結HTML
- 程式測試第一法則?
- ESlint語法檢測工具EsLint
- 測試工程師必知的10大測試法則工程師
- Robot Framework(5)- 使用測試庫Framework
- C語言單元測試C語言
- 軟體測試要學什麼(5)效能測試大綱
- 測試測試測試測試測試測試
- 《shell條件測試語句,字串測試apache是否開啟》字串Apache
- C語言模擬試題5C語言
- 整合測試時 MockMvc 無法注入MockMVC
- 八大藝術測試法
- oracle儲存過程plsql_sp_多個out引數測試語法Oracle儲存過程SQL
- 英語語法(5) 形容詞和副詞之二