copyright (c) 1995, 2002, oracle corporation. all rights reserved.
rman> connect catalog rman/[email protected]
連接到恢復(fù)目錄數(shù)據(jù)庫(kù)
rman> connect target /
連接到目標(biāo)數(shù)據(jù)庫(kù): encore (dbid=3146513770) rman> run 2> {allocate channel d1 type disk maxpiecesize = 500m; 3> backup full database 4> format 'e:/rmanbak/db_%d_%s_%p_%t'; 5> release channel d1; 6> }
rman> run 2> {allocate auxiliary channel d1 type disk; 3> set newname for datafile 1 to 'f:/clone/data ystem01.dbf';
腳本克隆數(shù)據(jù)庫(kù)時(shí),出現(xiàn) no backup copy 之類的錯(cuò)誤, 之后補(bǔ)充備份目標(biāo)數(shù)據(jù)庫(kù)的日志,
rman> run 2> {allocate channel d1 type disk maxpiecesize = 500m; 3> backup archivelog all 4> format 'e:/rmanbak/log_%d_%s_%p_%t'; 5> release channel d1; 6> }
rman> run 2> {allocate auxiliary channel d1 type disk; 3> set newname for datafile 1 to 'f:/clone/data ystem01.dbf'; 4> set newname for datafile 2 to 'f:/clone/data/undotbs01.dbf'; 5> set newname for datafile 3 to 'f:/clone/data/cwmlite01.dbf'; 6> set newname for datafile 4 to 'f:/clone/data/drsys01.dbf'; 7> set newname for datafile 5 to 'f:/clone/data/example01.dbf'; 8> set newname for datafile 6 to 'f:/clone/data/indx01.dbf'; 9> set newname for datafile 7 to 'f:/clone/data/odm01.dbf'; 10> set newname for datafile 8 to 'f:/clone/data/tools01.dbf'; 11> set newname for datafile 9 to 'f:/clone/data/users01.dbf'; 12> set newname for datafile 10 to 'f:/clone/data/xdb01.dbf'; 13> duplicate target database to clone_db 14> logfile 15> group 1 ('f:/clone/data/redo01.dbf') size 10m, 16> group 2 ('f:/clone/data/redo02.dbf') size 10m, 17> group 3 ('f:/clone/data/redo03.dbf') size 10m; 18> }
分配的通道: d1 通道 d1: sid=8 devtype=disk
正在執(zhí)行命令: set newname
正在執(zhí)行命令: set newname
正在執(zhí)行命令: set newname
正在執(zhí)行命令: set newname
正在執(zhí)行命令: set newname
正在執(zhí)行命令: set newname
正在執(zhí)行命令: set newname
正在執(zhí)行命令: set newname
正在執(zhí)行命令: set newname
正在執(zhí)行命令: set newname
啟動(dòng) duplicate db 于 2004-06-28 21:43:51
正在打印存儲(chǔ)的腳本: memory script { set until scn 261688166; set newname for datafile 1 to "f:/clone/data ystem01.dbf"; set newname for datafile 2 to "f:/clone/data/undotbs01.dbf"; set newname for datafile 3 to "f:/clone/data/cwmlite01.dbf"; set newname for datafile 4 to "f:/clone/data/drsys01.dbf"; set newname for datafile 5 to "f:/clone/data/example01.dbf"; set newname for datafile 6 to "f:/clone/data/indx01.dbf"; set newname for datafile 7 to "f:/clone/data/odm01.dbf"; set newname for datafile 8 to "f:/clone/data/tools01.dbf"; set newname for datafile 9 to "f:/clone/data/users01.dbf"; set newname for datafile 10 to "f:/clone/data/xdb01.dbf"; restore check readonly clone database ; } 正在執(zhí)行腳本: memory script
sql*plus: release 9.2.0.5.0 - production on mon jun 28 22:01:46 2004
copyright (c) 1982, 2002, oracle corporation. all rights reserved.
enter user-name: sys/[email protected] as sysdba
connected to: oracle9i enterprise edition release 9.2.0.5.0 - production with the partitioning, oracle label security, olap and oracle data mining options jserver release 9.2.0.5.0 - production
dbca是一款可以配置、管理和建立數(shù)據(jù)庫(kù)的工具。在初始數(shù)據(jù)庫(kù)安裝過(guò)程中,如果你選擇“建立一個(gè)數(shù)據(jù)庫(kù)選項(xiàng)(create a database option)”,這一工具就會(huì)啟動(dòng)并運(yùn)行。你可以建立一個(gè)基于模板的數(shù)據(jù)庫(kù),也可以從先前的范例中導(dǎo)入一個(gè)新的模板。 很多管理人員并不知道,只要在命令行中鍵入dbca這可以進(jìn)入到dbca環(huán)境。一旦這一工具啟動(dòng),你可以建立一個(gè)新的數(shù)據(jù)庫(kù),配置數(shù)據(jù)庫(kù)的init.ora選項(xiàng),刪除一個(gè)現(xiàn)有的數(shù)據(jù)庫(kù),或者管理數(shù)據(jù)庫(kù)模板。這些數(shù)據(jù)庫(kù)模板與安裝時(shí)生成的模板類似(比如general purpose, data warehouse,以及transaction processing)。