In Oracle Database backup, we often use the following three modes: Table mode, all objects in the specified user, and data export/import, the following describes the actual application of the three modes in Oracle Database Backup.
1) Export/import data from a specified table.
Export: export one or more tables:
- $ exp user/pwd file=/dir/xxx.dmp log=
xxx.log tables=table1,table2
Export some data of a table
- $ exp user/pwd file=/dir/xxx.dmp log=
xxx.log tables=table1 query=\“where col1=
\‘…\’and col2 \<…\”
Import: import one or more tables.
- $ imp user/pwd file=/dir/xxx.dmp log=
xxx.log tables=table1,
- table2 fromuser=dbuser touser=
dbuser2 commit=y ignore=y
2) In the second mode of Oracle Database backup, you need to export/import all objects and data of the specified user.
Export:
- $ exp user/pwd file=/dir/xxx.dmp log=
xxx.log owner=xx, yy)
Export only data objects, not data rows = n)
- $ exp user/pwd file=/dir/xxx.dmp log=
xxx.log owner=user rows=n
Import:
- $ imp user/pwd file=/dir/xxx.dmp log=
xxx.log fromuser=dbuser touser=dbuser2
- commit=y ignore=y
3) Export/Import and Export all objects in the database in full database mode:
- $ exp user/pwd file=/dir/xxx.dmp log=xxx.log full=
ycommit=y ignore=y
Import:
- $ imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=
dbuser touser=dbuser2
The above is an introduction to the three modes related to Oracle database backup. I hope you will gain some benefits.