Quick resolution of ORA-00959 in IMP

Source: Internet
Author: User

Quick resolution of ORA-00959 in IMP

When using IMP to import DMP into the test library, the problem that the ORA-00959 table space does not exist is also encountered.
The general solution:

1. First build the table, add ignore=y parameters when importing DMP.

2. Create a new table space

3. New export using EXPDP, with Remap_tablespace in IMPDP

It takes a certain amount of work to be troublesome in any way. If you are in oracle10g,
This problem can be solved quickly with the method of renaming table space .

sql> alter tablespace &old_tbsname rename to &new_tbs_name;

As the default tablespace for the current user is test, now requires tablespace Ywdbs
Sql> alter tablespace TEST rename to Ywdbs;

/oracle$imp test/test file=dev_bak_20110702.dmp Tables=prpdrisk statistics=none

Import:release 10.2.0.4.0-production on Wed Jul 6 09:39:25 2011

Copyright (c) 1982, Oracle. All rights reserved.


Connected to:oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options

Export file created by export:v10.02.01 via conventional path

Warning:the objects were exported by DEV

Import done in ZHS16GBK character set and Al16utf16 NCHAR character set
. Importing DEV ' s objects into reporttest
. Importing DEV ' s objects into reporttest
Imp-00017:following statement failed with ORACLE error 959:
...
Imp-00003:oracle Error 959 encountered
Ora-00959:tablespace ' Ywdbs ' does not exist
Import terminated successfully with warnings.

sql> alter tablespace TEST rename to Ywdbs;

After renaming the tablespace, you will see the following information in Alert.log:
Tablespace ' TEST ' is renamed to ' Ywdbs '.
Completed:alter tablespace TEST Rename to Ywdbs

When you rename a tablespace, DMP can be imported smoothly
/oracle$imp test/test file=dev_bak_20110702.dmp Tables=prpdrisk statistics=none

Import:release 10.2.0.4.0-production on Wed Jul 6 10:05:08 2011

Copyright (c) 1982, Oracle. All rights reserved.


Connected to:oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options

Export file created by export:v10.02.01 via conventional path

Warning:the objects were exported by DEV

Import done in ZHS16GBK character set and Al16utf16 NCHAR character set
. Importing DEV ' s objects into reporttest
. Importing DEV ' s objects into reporttest
. . Importing table "Prpdrisk" of the rows imported
Import terminated successfully without warnings.

In order to manage the specification, the table space name can be returned after the import is successful.

The ORA-00959 in IMP generally occurs on a table with a CLOB field.


Original address

This article from "Potato potato, I am sweet potato" blog, please be sure to keep this source http://254698001.blog.51cto.com/2521548/1703281

Quick resolution of ORA-00959 in IMP

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.