Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use oracle exp and imp

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to use oracle exp and imp". The content in the article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use oracle exp and imp".

-- both 1.exp and imp are entered as name and value pairs: for example, exp parameter_name=value or exp parameter_name= (value1,value2,value3..)-- both 2.exp and imp support the help=y option. The command format is: parameters in exp/imp help=y--3.exp: the default value meaning of the parameter name suggests that compress Y does not compress the contents of the exported data compress=Nrows Y whether to export the row data in the table / that is, to export the maximum size of the dmp file to be created if it is set to positive value. Query NCMA allows you to associate where statements to the exported table. Full N is set to Y and all databases are exported. Everything that includes the users used, tablespace definitions, system permissions, and databases. Ower NumberA allows you to export a series of schemas. Used to clone the schema or to "rename" the user tables N _ An allows you to export a series of tables parfile N _ A to specify the name of the file that contains the parameter_name=values parameter. Can be used to replace the specified parameter on the command line. Consitent N specifies whether the export occurs in a read-only transaction. Transport_tablespace N can transfer tablespace settings to specify whether exp is used to export metadata. Tablespaces transport_tablespace A lists the tablespaces to be transferred-the default value of the 4.imp parameter name means that if show N is set to Y, the import will show what has been completed and if set to Y, most object creation errors will be ignored on import. This parameter is useful when an object is pre-created in the database and you want to use imp just to add data to the table. If specified, imp will import all create index commands and many other DDL statements into the specified file. If set, this parameter specifies a series of users from the dmp file for import. This parameter can be used to restore a single schema touser N fromuser A from a full database export. If specified, the object will be imported from the user specified in the user parameter to the user specified in the user parameter. This allows users to be "cloned". Commit N specifies whether the imp is committed after each array is inserted, which is controlled by the buffer parameter. The recommended setting is Ntis_owners Nramp A for use with transporttable_tablespace, which lists the owner of the object in the transport tablespace--

Data export:

1. Export the database TEST completely, and export the username gdoa password 123 to D:\ TEST_BK.dmp

Exp gdoa/123@TEST file=d:\ TEST_BK.dmp full=y

Or exp gdoa/123@TEST file=d:\ TEST_BK.dmp

2 export the tables of gdoa users and sys users in the database

Exp gdoa/123@TEST file=d:\ TEST_BK.dmp owner= (gdoa,sys)

3 Export the tables table1 and table2 in the database

Exp gdoa/123@TEST file=d:\ TEST_BK.dmp tables= (table1,table2)

4 export the field filed1 in the table table1 in the database with the data starting with "00"

Exp gdoa/123@TEST file=d:\ TEST_BK.dmp tables= (table1) query=\ "where filed1 like'00%'\"

The above are commonly used exports. I don't care much about compression. I can compress the dmp file very well with winzip.

But just add compress=y after the above command.

Data Import 1 imports the data from D:\ TEST_BK.dmp into the TEST database.

Imp gdoa/123@TEST file=d:\ TEST_BK.dmp

There may be a problem above, because some table already exists, and then it reports an error and does not import the table.

Just add ignore=y at the end.

2 Import the table table1 in d:\ TEST_BK.dmp

Imp gdoa/123@TEST file=d:\ TEST_BK.dmp tables= (table1)

Basically, the above import and export is enough. In many cases, I delete the table completely and then import it.

Note:

If you have enough authority, it will prompt you if you don't have enough authority.

You can connect to the database. You can use tnsping TEST to find out whether the database TEST can be connected.

Thank you for your reading, the above is the content of "how to use oracle exp and imp", after the study of this article, I believe you have a deeper understanding of how to use oracle exp and imp, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report