oracle 新建用户,表空间、分配权限及导入

来源:互联网 发布:c盘中的windows文件夹 编辑:程序博客网 时间:2024/05/17 20:00

表空间:

create tablespace renshi datafile '/data/renshi/db.dbf' size 100M autoextend on next 5M

/data/renshi 必须存在并有写入权限 ,centeros 下,使用chown oracle /data/renshi将该目录分配到oracle用户中。

用户名:

create user DCAMPUS identified by 密码 default tablespace renshi;

设置用户权限:

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

导入:

imp dcampus/密码@orcl11g  file=renshi.dmp ignore=y full=y

这个导入适合部署时全库导入,维护时需写脚本进行单独表结构的更改。

导出:

exp dcampus20/密码@orcl file=d:\dbexp\daochu.dmp owner=(system,dcampus20)

使用owner参数,只导出指定用户下的内容,否则是全库导出,会很大

阅读全文
0 0
原创粉丝点击