linux操作oracle命令

2015-12-06 09:28:28来源:CSDN作者:zhengyong15984285623人点击

1. 登录oracle服务器

 ssh oracle@192.168.6.77

2. 调用出sqlplus

 sqlplus /nolog 

3. 创建表空间"USERTEST"

- CREATE TABLESPACE USERTEST- DATAFILE ‘/usr/tablespace/USERTEST' size 1000M-          EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;- --索引表空间- CREATE TABLESPACE sdt_Index- DATAFILE ‘/usr/tablespace/demo' size 512M-          EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;-

4. 给表空间创建用户"admin" / "admin"

- create user admin identified by admin- default tablespace USERTEST;

5. 登录表空间

connect admin/admin

6. 给表空间分配权限 

- grant connect,resource to USERTEST;- grant create any sequence to USERTEST;- grant create any table to USERTEST;- grant delete any table to USERTEST;- grant insert any table to USERTEST;- grant select any table to USERTEST;- grant unlimited tablespace to USERTEST;- grant execute any procedure to USERTEST;- grant update any table to USERTEST;- grant create any view to USERTEST;


微信扫一扫

第七城市微信公众平台