Oracle import table export table

The dmp file is the file format used as the oracle import and export table. There are generally three types of
dmp
files for export. They are:
1. Export all data under the entire database instance
2. Export all data of a specified user Table
3. Export specified table.

Open the command line:
1. Fully export the database ORACLE, export the username system password manager to c:\daochu.dmp
exp system/manager@ORACLE file=c:\daochu.dmp full=y
or exp test/[email protected] .10.10:1521/orcl file=E:\aaa.dmp  
2. Export the tables of RFD users and ,JYZGCX users in the database to
exp system/manager@ORACLE file=d:\daochu.dmp owner=(RFD,JYZGCX)
3 , export the tables T_USER and T_ROLE in the database
exp JYZGCX/JYZGCX@ORACLE file= d:\data\newsmgnt.dmp tables=(T_USER,T_ROLE)
The above system is the user name, manager is the password, ORACLE is the database instance name, In fact, it is not necessary to use the system user, as long as it is a user with administrator privileges.



dmp file import

1, open "Start" --> enter cmd—> sqlplus /nolog;
2, enter conn / as sysdba administrator account to log in;
3. It is necessary to create a tablespace. If we know the tablespace of the database that needs to be imported, we can create it directly.
If we don’t know it, it doesn’t matter. We can open the dmp file with txt and use the shortcut key ctrl+F to find the tablespace
. You can find the tablespace of the database corresponding to the dmp file, and then create the tablespace we found;
4. Open "Start" --> enter cmd (note: this is the cmd window, not the sqlplus window!!!), enter The following statement:
"imp kang/123456@localhost/ORACLE file="C:\daochu.dmp" full=y ignore=y"

The above statement is explained as follows:
kang is the created login database username;
123456 is the password for logging in to the database;
localhost: The address representing the current database is the local machine. If it is a remote import, replace it with the corresponding ip address.
ORACLE: It is the instance name
file: The following is the path where your current dmp file is stored
full=y, which seems to be all
ignore= y, ignore some errors


 

Attached:



EXP-00003: The storage definition of segment (0,0) was not found when exp exported the dmp file.
This problem occurred after reinstalling the oracle client.

Refer to the solution:
select 'alter table'||table_name||'allocate extent;' from 
user_tables where num_rows=0 or num_rows is null;
Execute all the information executed by this statement and try

alter system set deferred_segment_creation = false;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326122206&siteId=291194637