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

Example of basic operations for importing and exporting Oracle data

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Example of basic operations for importing and exporting Oracle data

Data export

a. Export database orcl completely, username user password password to D:\ dc.dmp

Exp user/password@orcl file=d:\ dc.dmp full=y

Full=y stands for full library export

b. Export user1 and user2 users in the database

Exp user/password@orcl file=d:\ dc.dmp owner= (user1,user2)

Full can back up all users' database objects, including tablespaces and user information, while owner=XX can only back up specified users' objects.

c. Export table user_operator,user_id in user user

Exp user/password@orcl file=d:\ dc.dmp tables= (user_operator,user_id)

Tables=xx means backup related tables.

d. Export data by condition

Exp user/password@orcl file=d:\ dc.dmp tables= (user_id) query='where dept_id=1'

e. Export only tables, not data

Exp user/password@orcl file=d:\ dc.dmp tables= (user_id) rows=N

two。 Data import

a. Import D:\ dc.dmp into the database

Imp user/password@orcl file=d:\ dc.dmp ignore=y

Ignore=y means to ignore the error because some table already exists, and then it reports an error and does not import the table.

b. Import the table user _ id from d:\ daochu.dmp

Imp user/password@orcl file=d:\ dc.dmp tables= (user_id)

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

Database

Wechat

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

12
Report