1.drop user [用户名] cascade;
2.drop tablespace [用户名] including contents and datafiles;
3.create tablespace [用户名] datafile '[创建表空间路径]' size 10M reuse
autoextend on next 5M segment space management auto;
4.create tablespace [用户名] datafile '[创建表空间路径]' size 10M autoextend on next
5M segment space management auto;
5.create user [用户名] identified by [用户密码]default TABLESPACE NHWG temporary
tablespace temp;
6.grant connect, resource, unlimited tablespace to [用户名];
7.grant select any dictionary to [用户名];
8.grant imp_full_database to [用户名];
9.grant exp_full_database to [用户名] ;
10.grant sysdba to [用户名] ;
11.grant dba to [用户名] ;
----禁用启用删除约束
1.select 'alter table '||table_name||' disable constraint '||constraint_name||';'
from user_constraints where constraint_type='R'
2.select 'alter table '||table_name||' enable constraint '||constraint_name||';'
from user_constraints where constraint_type='R'
3.select 'alter table '||table_name||' drop constraint '||constraint_name||';'
from user_constraints where constraint_type='R'
----禁用启用触发器
1.select distinct 'alter table '||table_name||' disable all triggers;'
from user_triggers where table_owner = 'NHLS';
2.select distinct 'alter table '||table_name||' enable all triggers;'
from user_triggers where table_owner = 'NHLS';
cmd下:
1.exp [用户名]/[用户密码]@oracle file=[导出dmp文件路径] owner=[用户名]
2.imp [导入用户名] /[导入用户密码]@oracle
file=[导入dmp文件路径] fromuser=[导出用户名] touser=[导入用户名]