How Does Oracle import data into different tablespaces?

Source: Internet
Author: User

Q: During data migration, I wanted to import the data into a tablespace different from the original system. After the import, I accidentally found that the data was imported into the original tablespace. How can I solve this problem?

A: Let me give you a simple example:

First, if the default user has the DBA permission, the data will be imported to the original tablespace according to the original location.

$ Imp bjbbs/passwd file = bj_bbs.dmp fromuser = jive touser = bjbbs grants = N

Revoke the unlimited tablespace permission to import the table space to the user's default tablespace.

SQL> create user bjbbs identified by passwd
2 def *** t tablespace bjbbs
3 temporary tablespace temp
4/
User Created.
SQL> grant connect, resource to bjbbs;
Grant succeeded.
SQL> grant DBA to bjbbs;
Grant succeeded.
SQL> revoke unlimited tablespace from bjbbs;
Revoke succeeded.
SQL> alter user bjbbs quota 0 on users;
User altered.
SQL> alter user bjbbs quota unlimited on bjbbs;
User altered.
SQL> exit

Now the data can be imported into the correct user tablespace.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.