资源描述:
《oracle11g备份还原》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Oracle9i,oracle10g备份出来的DMP第一次还原到oracle11g上是可以的(imp命令)Oracle11g备份还原不能用exp,imp1.在开始菜单运行,输入cmd进入命令行----输入Oralce命令行命令:sqlplus/nolog2.----sysdba身份登录Oracle数据库connsys/sys@orclassysdba3.----更改oracle配置参数altersystemset"_allow_level_without_connect_by"=true;4.----创建备份输出目录(如果此目录在服务器上不存在,则需要手动
2、创建)createdirectorydmpas'D:oracle';目录不支持中文定义参数dmp,可以根据自己喜好随便取名;Grantread,writeondirectorydmp(随便起的路径变量名)toDD(用户名);GRANTEXP_FULL_DATABASETO用户;5.备份数据库Expdpsystem/sys@htsm2008r2dumpfile=sde.dmpdirectory=dmpschemas=sde(第4步dmp定义;schemas后面接的是表空间)6.还原数据库Impdpsystem/sys@htsm2008r2dumpfile=
3、sde.dmpdirectory=dmpschemas=sde还原数据库Impuserid=wfbdcggk/wfbdcggk@192.168.0.200/wfbdcfile=E:ycbdcggk052ycbdcggk0520.dmpignore=yfull=ylog=E:ycbdcggk0520ycbdcggk0520.log下面的命令也可以;expdpsde/sde@htsm2008r2dumpfile=sde.dmpdirectory=dmpimpdpsde/sde@htsm2008r2dumpfile=sde.dmpdirectory=dm
4、pexpdp用户名/密码@实例dumpfile=备份文件名(sde.dmp)directory=目录名(dmp)impdp用户名/密码@实例dumpfile=备份文件名(sde.dmp)directory=目录名(dmp)服务器backup:echo开始备份数据expdpsde/sde@gissvrdirectory=bakdumpfile=sde-%DATE:~0,10%.dumplogfile=sde-%DATE:~0,10%.log"C:Programfiles7-Zip7z.exe"-tzipa%cd%sde-%DATE:~0,10%.zi
5、p%cd%sde-%DATE:~0,10%.dump%cd%sde-%DATE:~0,10%.logdelsde-%DATE:~0,10%.dumpdelsde-%DATE:~0,10%.logexpdpzxkjk/zxkjk@gissvrdirectory=bakdumpfile=zxkjk-%DATE:~0,10%.dumplogfile=zxkjk-%DATE:~0,10%.log"C:Programfiles7-Zip7z.exe"-tzipa%cd%zxkjk-%DATE:~0,10%.zip%cd%zxkjk-%DATE:~0,1
6、0%.dump%cd%zxkjk-%DATE:~0,10%.logdelzxkjk-%DATE:~0,10%.dumpdelzxkjk-%DATE:~0,10%.logexpdpkjsjk/kjsjk@gissvrdirectory=bakdumpfile=kjsjk-%DATE:~0,10%.dumplogfile=kjsjk-%DATE:~0,10%.log"C:Programfiles7-Zip7z.exe"-tzipa%cd%kjsjk-%DATE:~0,10%.zip%cd%kjsjk-%DATE:~0,10%.dump%cd%kj
7、sjk-%DATE:~0,10%.logdelkjsjk-%DATE:~0,10%.dumpdelkjsjk-%DATE:~0,10%.logecho拷贝备份到201备份服务器xcopy%cd%sde-%DATE:~0,10%.zip\172.18.0.201全要素数据备份/s/dxcopy%cd%zxkjk-%DATE:~0,10%.zip\172.18.0.201全要素数据备份/s/dxcopy%cd%kjsjk-%DATE:~0,10%.zip\172.18.0.201全要素数据备份/s/decho删除本地备份文件del%cd
8、%sde-%DATE:~0,10%.zipdel%cd%zxk