把表imp到指定的表空间

     拿同事给的dmp文件导入到自己的数据库,

C:\> imp newsale / newsale@orcl file = d: \ ds . dmp fromuser = BZ1103 touser = newsale

SQL > select  table_name, tablespace_name  from  user_tables;
   发现表空间为SYSTEM,这并不是我想要的(在create user时有指定default tablespace newtbs )。
     删掉重新导,在imp时指定 tablespaces = newtbs还是不行, 不通 ……

     经过查资料+多次试验,最终确定,

SQL >   revoke  unlimited tablespace  from  newsale;
SQL
>   alter   user  newsale quota unlimited  on  newtbs;

    然后再重新imp,导入成功后发现表空间的确已经是newtbs了。

   

转载于:https://www.cnblogs.com/dengqiang/archive/2009/10/14/1583264.html

猜你喜欢

转载自blog.csdn.net/weixin_34236497/article/details/93240796