Export and import of Oracle's DMP data files and create user

Source: Internet
Author: User
Tags sqlplus

About DMP Files We use more, DMP files It is used as the file format for the Oracle Import and export tables, and today the DMP files are exported and imported for learning.

DMP file Export

DMP file export is generally three kinds, they are: export all the data under the entire database instance, export all the tables of the specified user, export the specified table.

Here's my database for example, my Oracle DB instance is "Oracle", and I see my db instance can be viewed from Task Manager-to-service, as

Open the command line:1, full export of database Oracle, user Name System Password Manager exported to c:\daochu.dmpExpSystem/Manager@ORACLE file=C:\daochu.dmp Full=y2, export the tables of RfD users and JYZGCX users in the databaseExpSystem/Manager@ORACLE file=D:\daochu.dmpowner=(RFD,JYZGCX)3, export the tables in the database T_user, T_role expjyzgcx/Jyzgcx@ORACLEfile=D:\DATA\NEWSMGNT.DMP tables=(T_user,t_role) The above system is the user name, the manager is the password, Oracle is the database instance name, actually does not necessarily use the system user, as long as has the administrator privilege user to be able. 

DMP file Import
1, open "Start"--> Input cmd-> sqlplus/nolog;2, enter Conn/  asSYSDBA Administrator account login;3, you need to create a table space, if we know the table space that needs to import the database directly created can, if not know, also does not matter, we can open the DMP file with TXT,
Use the shortcut key CTRL+F, find tablespace, you can find the database of the DMP file table space, and then create the table space we found can be, step, do not create the table space, create users, and assign permissions;5, open "Start"--> Input cmd (note: Here is the cmd window, not the Sqlplus window!!!) ), enter the following statement:
"Imp kang/[email protected]/oraclefile=" C:\daochu.dmp "full=y ignore=y"The above statement is described as follows: Kang is the user name of the login database created, 123456 is the password of the login database; localhost: The address representing the current database is native, and if it is a remote import, replace it with the corresponding IP address. Oracle: is the instance name)file: The following is the path where your current dmp file is stored Full=y, this looks like it's all ignore.=Y, ignoring some errors

Import to a specified user:

  imp system/[email protected] fromuser=AAA touser=bbb file=aaa. DMP

To create a new user:     
1 Create UserUepro identified byUeprodefaultTablespace ORCLTemporarytablespace ORCL account UNLOCK;2 GRANTCONNECT toUepro; Connect to a database3 GRANTRESOURCE toUepro;4 Grant Alter,Delete,Update,Insert,Select  onTable name toUser name;

Summary

This article focuses on the specific steps of Oracle data export and import, where you can import DMP files even if you do not know the tablespace, user name, and password. Oracle's learning is indeed a long way to fix it!

Export and import of Oracle's DMP data files and create users

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.