Oracle數據庫的Schema備份和恢復可以通過多種方式實現,以下是其中一種常用方法:
備份Schema:
expdp username/password schemas=schema_name directory=backup_directory dumpfile=schema_name.dmp logfile=expdp_schema_name.log
恢復Schema:
CREATE USER new_schema IDENTIFIED BY password;
impdp new_schema/password schemas=schema_name directory=backup_directory dumpfile=schema_name.dmp logfile=impdp_schema_name.log remap_schema=schema_name:new_schema
impdp new_schema/password schemas=schema_name directory=backup_directory dumpfile=schema_name.dmp logfile=impdp_schema_name.log REMAP_SCHEMA=schema_name:new_schema