View the IMP in Oracle, Exp command:
IMP help = y
Exp Help = Y
1. Export table data:
The file name is represented by backup_yymmddhhmm.dmp.
DateString = `Date % Y% M% D% h% M`
# Echo $ dateString
Su - Oracle -c "Exp Userid / Password Tables = Table1, Table2 File = PATH / BACKUP_ $ DATESTRING.DMP BUFFER = 8192 GRANTS = y compress = n"
Compress: n indicates that the exported file does not need to be compressed in a block, when the table data in the database is particularly large, if you are placed in different databases, there is a problem when recovery.
The exported data includes a table creation statement, sequence, trigger, and the like.
2. Import Table Data
Table Import: Create a table, import data, create a sequence
Echo Backup File: $ 1
FILENAME = $ 1
Echo $ filename
#if ["$ filename" = ""]
#Then
# Echo "Please specify the file name of the backup recovery, specify the absolute file path"
# Exit 0;
#fi
#echo filename = $ filename
Su - Oracle -c "IMP Userid / Password File = $ filename show = n buffer = 2048000 ignore = y Commit = y GRANTS = Y FULL = Y"
IGNORE: Y indicates that the process of ignoring the form creation is just in the table in the table.