imp,exp

here are some examples on exp/imp:[@more@]
1. after drop the user, use below to create first.

create user cog84cs identified by welcome1 DEFAULT TABLESPACE COGNOS_APP TEMPORARY TABLESPACE TEMP;
GRANT UNLIMITED TABLESPACE TO cog84cs;

2. and get the privs info:
select * from DBA_SYS_PRIVS where grantee in ('COG84CS','CG84ADTD');
select * from DBA_TAB_PRIVS where grantee in ('COG84CS','CG84ADTD');
select * from DBA_ROLE_PRIVS where grantee in ('COG84CS','CG84ADTD');

nohup imp "/ as sysdba" file=/db01/cognos8.dmp log=/db01/cognos8)imp.log fromuser=(cog84cs,cg84adtd) touser=(cog84cs,cg84adtd) feedback=10000 buffer=100000000 &


*********************************************************************************************************
full db exp:
nohup exp "/ as sysdba" file=cogdbdexp.dmp log=cogdbdexp.log feedback=10000 consistent=y statistics=none indexes=y full=y buffer=100000000 Compress=Y &

full db imp:
before imp, use this statement to generate drop statement to drop all default oracle generated schemas:

select 'drop user '|| username||' cascade;' from dba_users where username not in ('SYS','SYSTEM','OUTLN','DIP','TSMSYS','DBSNMP','WMSYS','EXFSYS','XDB','ANONYMOUS','ORACLE_OCM','DBMON','DBA');

nohup imp "/ as sysdba" file=/db01/oraback/cogdbd/exp/cogdbdexp.dmp log=/tmp/cogdbdimp.log feedback=10000 buffer=100000000 full=y &


*****************************************************************************************************

exp "/ as sysdba" file=%DMPFILE% log=%LOGFILE% tablespaces=(SYSTEM,SYSAUX,USERS,ARC_SYSTEM_DATA,ARC_SYSTEM_INDEX) direct=Y STATISTICS=NONE

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14377/viewspace-1060256/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14377/viewspace-1060256/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值