`

Oracle 数据库恢复与备份

阅读更多
--创建数据库备份目录
create directory dpdata as 'E:\oradata\dpdata';
--创建表空间
SQL> create tablespace xxx datafile 'E:\oradata\tablespace\xxx.dbf' size 500m;
--创建临时表空间
SQL> create temporary tablespace xxx_tmp tempfile 'E:\oradata\tablespace\xxx_temp.dbf' size 32m autoextend on next 32m maxsize 2048m extent management local;
--创建用户并制定默认表空间及临时表空间
SQL> create user xxx identified by xxxxxx default tablespace xxx temporary tablespace xxx_tmp;
--用户授权
SQL> grant read,write on directory dpdata to xxx;
SQL> grant create session to xxx;
SQL> grant unlimited tablespace to xxx;
SQL> grant resource to xxx;
--数据库恢复
cmd窗口  expdp xxx/xxxxxx@localhost/orcl DIRECTORY='dpdata' DUMPFILE=xxxxxx.dmp
--备份
cmd窗口  impdp xxx/xxxxxx@localhost/orcl DIRECTORY='dpdata' DUMPFILE=xxxxxx.dmp

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics