oracle创建表空间新建新用户并受权
oracle创建表空间新建新用户并授权
oracle 在开发中必不可少。今天学习的小笔记
在自己原有的数据库tea 中新建一个表空间和用户用来学习练习sql 语句。
文章是参考一篇前辈的来写的。文章尾部有链接 里面有更详细的说明。。。
--表空间 CREATE TABLESPACE zq DATAFILE 'H:\oracle\zq' size 800M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; --索引表空间 CREATE TABLESPACE zq_Index DATAFILE 'H:\oracle\zq' size 512M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; --2.建用户 create user xyw identified by xyw default tablespace zq; --3.赋权 grant connect,resource to xyw; grant create any sequence to xyw; grant create any table to xyw; grant delete any table to xyw; grant insert any table to xyw; grant select any table to xyw; grant unlimited tablespace to xyw; grant execute any procedure to xyw; grant update any table to xyw; grant create any view to xyw;
--导入导出命令 ip导出方式: exp system/tea@127.0.0.1:1521/tea file=h:/f.dmp full=y imp xyw/xyw@tea file=f:/f.dmp full=y ignore=y
参考文章来源http://blog.****.net/starnight_cbj/article/details/6792364?c=6f4c9222f7b2748b9d236304e9b67f7b