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

Steps for Oracle exp imp to back up and restore tablespace data

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

Share

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

Oracle backups are divided into logical backups and physical backups. Logical backups are exp/imp; physical backups are cold, hot, and RMAN backups. Exp/imp has three modes, table mode, user mode and full library mode.

Use exp/imp to backup tablespaces

exp user/password@server file=filefullpathname log=logfullpathname

For example, if the author wants to export a table space with username bsm, password forebsm, and sid bsm, the command used under Linux is as follows:

exp bsm/forebsm@bsm owner=bsm file=/home/bsm.ump log=/home/bsmexp.log

(bsm/forebsm@bsm

User name/password @ instance name, the same below)

The backup file bsm.mmp will be generated in the directory/home

Use exp/imp to restore tablespaces

imp user/password@server ignore=y rows=y full=y commit=y buffer=4096000 file=filefullpathname

Using the above example, to restore the table space data, the Linux platform commands are as follows:

imp bsm/forebsm@bsm fromuser=bsm touser=bsm file=/home/bsm.ump log=/home/bsmimp.log

When migrating tablespaces between two databases, you need to pay attention to which database in the latter needs to be greater than or equal to the original database tablespaces, or an error will be reported.

Postscript: exp/imp When data recovery is performed, it is necessary to first establish a database in all three modes, then establish a table space, create a user, and finally use the statement described above for recovery.

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: 267

*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