Backup oracle database into dmp package

The database server is generally linux.

Scenario: There are new table creation statements and SQL when upgrading the system. Before upgrading, back up the current database in case of accidents.

① Execute under sql statement (su - oracle, sqlplus / as sysdba)

create or replace directory DMUP_DIR as '/home/oracle';

Create path, DMUP_DIR, /home/oracle can be customized. If you don’t want to create it, you can use the existing path, and you can use the query statement to query

select * from dba_directories;

Find a path you like.

② Execute under the oracle user

expdp userid=aaa/bbb directory=DMUP_DIR dumpfile=ccc.dmp schemas=aaa

in:

aaa is the database username

bbb is the database password

ccc is the name you want to backup

③The database dmp file is backed up under the DMUP_DIR path.

 

Guess you like

Origin blog.csdn.net/htsssss/article/details/108493746