常用的sql脚本(陆续更新)

赋予远程debug权限:

grant debug any procedure to #user_name; 
grant debug connect session to #user_name; 

导入导出整个schema,需要先建立dpdir的directory:

expdp schemaABC/schemaABC dumpfile=schemaABC.dmp directory=dpdir schemas=schemaABC logfile=expschemaABC.log compression=all
impdp system/system dumpfile=schemaABC.dmp directory=dpdir schemas=schemaABC logfile=impschemaABC.log

创建用户后需要赋予的权限,否则不能做impdp:

create user yourusername identified by yourusername quota unlimited on users;
grant connect,resource to yourusername;   -- most important
grant read,write on directory dpdir to yourusername;
grant create any synonym to yourusername;
grant create any view to yourusername;
grant create database link to yourusername;
grant alter database link to yourusername;

 

posted @ 2012-11-07 14:40  valleylord  阅读(274)  评论(0编辑  收藏  举报