您的位置:首页 > 数据库 > Oracle

Oracle创建表空间,并导入数据

2014-04-23 14:19 204 查看
1.连接数据库

export ORACLE_SID=mydb

  sqlplus /nolog

  connect / as sysdba

2.创建表空间

  create tablespace mydbtest datafile '/home/oracle/mydb.dbf' size 200m;

3.创建用户

  create user mydbuser identified by mypassword default tablespace mydbtest;

4.用户授权

  grant create session,create table,unlimited tablespace to mydbuser;

5.用户授权dba

  grant dba to mydbuser;

6.导入导出数据库

  exp mydbuser/mypassword file=/home/oracle/exp.dmp

  imp mydbuser/mypassword file=/home/oracle/exp.dmp FULL=Y

  expdp mydbmypassword dumpfile=mydb.dmp logfile=exp.log

impdp mydbuser/mypassword dumpfile=mydb.dmp REMAP_SCHEMA=mydb:mydbuser logfile=exp.log FULL=Y transform=OID:N
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐