Oracle import and export problems

Source: Internet
Author: User

Considerations for importing and exporting Oracle databases
1. When Oracle exp exports the dmp file, the storage clause defined by the table structure is exported by default, and the compress parameter is Y by default, after repeated exp and imp operations, the initial parameter of storage will become larger and larger. compress = Y is not a good choice for large tables;

2. As the initial parameter is getting bigger and bigger, even if ROWS = N during exp export, the tablespace occupies a large disk space after being imported to the new database;

3. If you only need to Export table schema definitions without table data and do not need to include storage clauses, you can use the features in PL/SQL: Tools-Export User Objects.

4. Depressed, the synonym is not exported:
1: synonym. cmd:

Sqlplus USER/PASSWORD @ SID @ synonym. SQL

2. synonym. SQL:

Create table tmp_user_synonym as select 'create or replace public synonym' | synonym_name | chr (13) | 'for' | chr (13) | TABLE_OWNER | '. '| TABLE_NAME | chr (13) |'/'text from all_synonyms where table_owner = 'user ';
Set heading off feedback off termout off
Set pagesize 0
Set linesize 100
Sets long 100000
Col tt format
Spool d: \ bat \ synonym. log;
Select text tt from tmp_user_synonym;
Spool off;
Drop table tmp_user_synonym;
Exit;

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.