Import and Export imp/exp of the Oracle database is equivalent to backing up and restoring the Oracle database. The exp command can export data from a remote database server to a local DMP file; the IMP command is used to import the DMP file from the local machine to the remote database server.
Example:
Exp command:
1. Exp username/password storage location of the DMP file. Enter sqlplus simmspstest/simmspstest file = 'C: \ simmspstest_20120714.dmp 'in the DOS window below'
It is to import the user database information that the user is named simmspstest and the password is simmspstest into the simmspstest_20120714.dmp file of drive C.
2. Exp system/password owner = (user 1, user 2) storage location of the DMP file, for example, exp system/system owner = (Scott, HMPL) file = 'C: /db_001.dmp 'indicates that the exp command exports only the objects owned by the Scott and HMPL users. If a user does not exist, a warning is given, but the export of another user is not affected.
3. Exp username/password tables = (table 1, Table 2) DMP file storage location, for example: EXP Scott/Scott tables = (Dept, EMP) file = 'C: /db_tables.dmp 'indicates that the exp command exports only the dept and EMP tables of the Scott user. If the exported table does not exist, a warning is given, but the export of other tables is not affected.
Run the following command: Drop user simmspstest cascade to delete user simmspstest. cascade to delete all tables, views, and stored procedures under simmspstest.
Create a user and authorize the user,
Create temporary tablespace
Create temporary tablespace neocms30temp tempfile 'C: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ neocms30temp. dbf'size 200 m;
Create and authorize a user
Create user simmspstest identified by simmspstest default tablespace simmspstest quota unlimited on simmspstest temporary tablespace simmspstesttemp;
Grant resource to simmspstest;
Grant connect to simmspstest;
Grant create view to simmspstest;
Grant create trigger to simmspstest;
Grant create synonym to simmspstest;
Then, use the IMP command to import the DMP file exported through exp.
IMP simmspstest/simmspstest file = 'C: \ simmspstest_20120714.dmp 'Log = 'C: \ simmspstest_20120714log.log 'fromuser = simmspstest touser = simmspstest