oracle命令

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=[导入用户名]

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值