表空间:
- 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)