Oracle DB 10g+ Backup and Restore
Here's the steps for backupa db schema, which just applies to oracle database.
Supposetheoslschemaisosl/welcome1,andtheORACLE_SID=orcl,then:
- ExportSchema(backup)
- First,createdirectoryexpdir
SQL>CONNECTsystem/welcome1
SQL>CREATEORREPLACEDIRECTORYexpdirAS'/home/oracle/exp_data';
SQL>GRANTREAD,WRITEONDIRECTORYexpdirTOPUBLIC;
- Thenuseexpdp
$ORACLE_HOME/bin/expdposl/welcome1@orclDUMPFILE=osl_bak.dmpDIRECTORY=expdirSCHEMAS=osl
- Thenyoucancopythe/home/oracle/exp_data/osl_bak.dmptosomeotherdirectoryorsomeothermachinetobackupit.
- First,createdirectoryexpdir
- ImportSchema(restore)
- First,createdirectoryexpdir(ifyoualreadycreatedit,plzignorethisstep)
- Thendeletetheoslschema(bewareofthisstep!!!)
SQL>CONNECTsystem/welcome1
SQL>DROPUSERoslCASCADE;
- Thenuseimpdp
$ORACLE_HOME/bin/impdposl/welcome1DIRECTORY=expdirDUMPFILE=osl_bak.dmp
相关推荐
lklong 2020-11-22
oraclemch 2020-11-06
shilukun 2020-10-10
周嘉笙 2020-11-09
iilegend 2020-10-19
EricRay 2020-10-16
zhuzhufxz 2020-09-16
dataminer 2020-08-17
bfcady 2020-08-16
Hody 2020-08-16
FightFourEggs 2020-08-16
数据库设计 2020-08-16
Seandba 2020-08-16
Omega 2020-08-16
zjyzz 2020-08-16
yanghuatong 2020-08-16
ktyl000 2020-08-16
dbasunny 2020-08-16