preface
Today we introduce a simple function, usually will use, Oracle database export and import database, generally used for local computer testing or database migration, etc..
1. Export database
Do not enter SQLPlus, execute the following command directly from CMD window command
exp "'sys/oracle@testxxxx as sysdba'" file=G:\sx20190325.dmp full=y
Copy the code
After @ is the name of your database
File = indicates which disk you want to save to
As is shown in
Wait patiently for the export to succeed,
This means the export is successful
Importing a Database
As with importing a database, do not go into SQLPlus and run commands directly from a CMD window
Command:
imp "'sys/oracle@testxxxx as sysdba'"file=G:\sx20190325.dmp full=y ignore=y
Copy the code
File = must contain this file, otherwise an error will be reported