資源描述:
《數(shù)據(jù)庫備份與恢復(fù)總結(jié)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、1.獲取幫助$exphelp=y$imphelp=y2.三種工作方式(1)交互式方式$exp//然后按提示輸入所需要的參數(shù)(2)命令行方式$expuser/pwd@dbnamefile=/oracle/test.dmpfull=y//命令行中輸入所需的參數(shù)(3)參數(shù)文件方式$expparfile=uscrname.par//在參數(shù)文件中輸入所需的參數(shù)參數(shù)文件username,par內(nèi)容userid=username/userpasswordbuffer=8192000compress=ngrant
2、s=yfile=/oracle/test.dmpfull=y3.三種模式(1)表方式,將指定表的數(shù)據(jù)導(dǎo)出/導(dǎo)入。導(dǎo)出:導(dǎo)出一張或幾張表:$expuser/pwdfile=/dir/xxx.dmplog=xxx.logtables=tablel,table2導(dǎo)出某張表的部分?jǐn)?shù)據(jù)$expuser/pwdfile=/dir/xxx.dmplog=xxx.logtables=tablelquery=,,wherecoll=,???,andcol2'〈???'"導(dǎo)入:導(dǎo)入一張或幾張表$impuser/
3、pwdfi1e=/dir/xxx.dmplog=xxx.logtables二tablel,table2fromuser=dbusertouser=dbuser2commit=yignore二y(2)用戶方式,將指定用戶的所有對(duì)象及數(shù)據(jù)導(dǎo)出/導(dǎo)入。導(dǎo)出:$expuser/pwdfile=/dir/xxx.dmplog=xxx.logowner=(xx,yy)只導(dǎo)出數(shù)據(jù)對(duì)象,不導(dǎo)出數(shù)據(jù)(rows=n)$expuser/pwdfilc=/dir/xxx?dmplog=xxx.logowncr=uscrr
4、ows=n導(dǎo)入:$impuser/pwdfile=/dir/xxx.dmplog=xxx.logfromuser=dbusertouser=dbuser2commit二yignore二y(3)全庫方式,將數(shù)據(jù)庫中的所有對(duì)象導(dǎo)出/導(dǎo)入導(dǎo)出:$expuser/pwdfi1e=/dir/xxx.dmplog=xxx.logfull二ycommit二yignorc二y導(dǎo)入:$impuser/pwdfile=/dir/xxx.dmplog=xxx.logfromuser1.2高級(jí)選項(xiàng)1.分割成多個(gè)文件//o
5、racle9i必須為SYS或增量導(dǎo)出:(1)“完全”增量導(dǎo)出(Complete)以后exp不再支持inctypeSYSTEM才可執(zhí)行增量導(dǎo)出導(dǎo)入包括三個(gè)類型:$expuser/pwdfile=/dir/xxx.dmp(2)“增量型”增量導(dǎo)出$expuser/pwdfi1e=/dir/xxx.dmp(3)//備份整個(gè)數(shù)據(jù)庫log二xxx?loginctype二complete導(dǎo)出上一次備份后改變的數(shù)據(jù)。log二xxx.loginctype二incremental“累計(jì)型”增量導(dǎo)岀(Cumulativ
6、e)只導(dǎo)出自上次“完全”導(dǎo)出之后數(shù)以多個(gè)固定大小文件方式導(dǎo)入$impuser/pwdfile=l.dmp,2.dmp,3.dmp,??-tables二xxxfromuser二dbusertouser=dbuser2filesize=1000mconnnit二yignore二y以多個(gè)固定大小文件方式導(dǎo)出:這種做法通常用在表數(shù)據(jù)量較大,單個(gè)dump文件可能會(huì)超出文件系統(tǒng)的限制的情況$expuser/pwdfi1e=l.dmp,2.dmp,3.dmp,???filesize=1000mlog=xxx.l
7、ogfull二y2.i=i量導(dǎo)出/導(dǎo)入據(jù)庫屮變化了的信息。$expuser/pwdfile=/dir/xxx.dmplog=xxx.loginctype=cumulative增量導(dǎo)入:$impusr/pwdFULL二yinctype二system/restore/inctype其中:SYSTEM:RESTORE:導(dǎo)入系統(tǒng)對(duì)彖導(dǎo)入所有用戶對(duì)象3.以SYSDBA進(jìn)行導(dǎo)出/導(dǎo)入1.用于Oracle技術(shù)支持2.用于表空間傳輸例:$imp'usr7pwd@instaneeassysdba,tablesp
8、aces二xxtransport_tablespace=yfile=xxx.dmpdatafilcs=xxx?dbf$impfile=expdat.dmpuserid二"""sys/passwordassysdba”””transport_tablespace=y"datafile二(c:tempappdata,c:tempapp_index)”1.表空間傳輸(速度快)表空間傳輸是8i新增加的一種快速在數(shù)據(jù)庫間移動(dòng)數(shù)據(jù)的一種辦法,是把一個(gè)數(shù)據(jù)庫上的格式數(shù)據(jù)文件附加到另外一個(gè)數(shù)據(jù)庫中