Preface
about the DMP File we're still using more, DMP file It is as Oracle Import and export the file format used by the table, today will DMP file export and import for learning.
DMP file export
DMP file export with more than three commonly, 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, to introduce, my Oracle DB instance is "ORACLE", viewing your own DB instance can be viewed from " Task Manager - Service " view, as in
Open the command line:
1, set the database ORACLE full export, user Name System Password Manager export to C : In \daochu.dmp
exp System/[email protected] ORACLE file= C : \daochu.dmp full=y
2, in the database RFD users and, jyzgcx User's Table export
exp System/[email protected] ORACLE file=d:\daochu.dmpowner= (RFD,jyzgcx)
3, set the table in the database T_user , T_role Export
Exp jyzgcx / jyzgcx @ ORACLE file= d:\data\newsmgnt.dmp tables= (t_user,t_role)
above the system is the user name, Manager as a password, ORACLE is not necessarily a database instance name . system user, as long as the user has administrator rights can.
DMP file import
1 , open "Start" and enter cmd- > Sqlplus/nolog ;
2 , enter Conn /As Sysdba Administrator account login;
3 , you need to create a tablespace if we know that the table space of the database that needs to be imported is created directly, and if you don't know it, it doesn't matter, we can use txt Open DMP file, use the shortcut key ctrl+f, find the tablespace, you can find the database of the DMP file table space, and then create the table space we found can;
Step, do not create a tablespace, create a user, and assign permissions;
5 , open "start" and input cmd (note: here is the cmd window, not the Sqlplus window!!!) ), enter the following statement: "imp kang/[email protected]/ORACLEfile=" \Daochu . DMP " full=y ignore=y"
The above statement illustrates the following:
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 seems to be all.
Ignore=y, ignoring some errors
Note: For basic concepts such as database instances, table spaces, users, and the statements created, refer to the previous article "Oracle Learning-Literacy article"
Summary
This article mainly describes, Oracle specific steps for data export and import, where import DMP files can be imported even if you do not know the tablespace, user name, and password. Oracle 's learning is indeed a long way to fix it!
Oracle Learning--dmp File (table) Import and Export