几条最基本的 sqlplus命令

 

sqlplus登录服务器:

sqlplus sys/system@192.168.1.55:1521/orcl as sysdba

创建表空间:

 

create tablespace tspace1 datafile 'tspace1.dat' size 100M autoextend on next 50m maxsize unlimited;

创建用户: 

create user user1 identified by user1 default tablespace tspace1;

授权:

grant connect,resource ,dba to user1;

删除表空间和数据库文件

drop tablespace tspace1 including contents and datafiles cascade constraints;

删除用户:

drop user user1 cascade;

 

 

以dba用户导出表:

exp 'sys/system@192.168.1.55:1521/orcl as sysdba'  file=d:\backup.dmp tables=(table1,table1)

 

以表空间所有者用户导出表:

 

exp  user1/password@192.168.1.55:1521/orcl    file=d:\backup.dmp tables=(myTable1,myTable1)

(用户只能导出自己的表)

 

以dba用户导入表

imp 'sys/system@192.168.1.55:1521/orcl as sysdba'  file=d:\mdm.dmp fromuser=user1  touser=user2 tables=(table1,table2)

 

 


 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值