Oracle Database Operations

Source: Internet
Author: User
Tags create directory

---restore content starts---

Now large enterprises generally use Oracle database, Oracle database in the general use of EXPDP,IMPDP Export import data, but in the operation often encountered some problems. The following is an analysis of these problems.

1. Exporting data

Typically, you need to create a directory address when exporting data

SELECT * from Dba_directories; --Query All directory addresses
Create or replace directory Winqt_dump as '/home/front/dmpfile '; --Create Directory address
Grant Read,write on directory winqt_dump to Qtdb; --Assigning read and Write permissions to directory addresses

Drop directory DUMPWINQT; --Delete directory address

Select Username,default_tablespace from Dba_users; --Query the table space below the user
SELECT * from User_indexes; --Query the user for all indexes

Select table_name from user_tables where num_rows > 0; --Querying tables with data

Note that you need to log in with an Oracle user when assigning permissions to the database.

EXPDP qtdb/qtdb dumpfile=20150907test.dmp directory=dumpwinqt schemas=qtdb logfile=export.log; --Export Database

Touch Export.log; --Export log path

CHOMD 777 Export.log; --Assigning permissions to the log

such as all

Question 1:

2. Import data

IMPDP hsqtdb/hsqtdb dumpfile=20150217qtdb.dmp directory=dumpwinqt remap_schema=hnqtdb:hsqtdb nologfile=true;--Import data

Export with EXPDP corresponding import is used IMPDP otherwise will be reported the following error:

If the empty table exists best with EXPDP export because there is a new feature in oracle11g, when the table has no data, the segment is not allocated to save space, so exp does not lead to empty table. The solution is to use EXPDP

3. Create a DB instance

Sqlplus/as SYSDBA
Drop user C3front cascade;
Create user C1ECIFGP identified by C1ECIFGP default tablespace USERS temporary tablespace TEMP;
Grant Connect, resource, dba to C1ECIFGP;

Oracle Database Operations

Related Article

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.