Use CMD to log on to SQLPLUS
C: \ Users \ Administrator> sqlplus/nolog
SQL> conn sys/pwd as sysdba;
Import and export a database (Source Network ):
1. Export the database TEST completely, and the username system Password manager is exported to D: \ daochu. dmp.
Exp system/manager @ TEST file = d: \ daochu. dmp full = y
2. Export the tables of system users and sys users in the database
Exp system/manager @ TEST file = d: \ daochu. dmp owner = (system, sys)
3. Export tables table1 and table2 in the database
Exp system/manager @ TEST file = d: \ daochu. dmp tables = (table1, table2)
4. Export the data with the field filed1 in table 1 in the database starting with "00"
Exp system/manager @ TEST file = d: \ daochu. dmp tables = (table1) query = \ "where filed1 like '201312 '\"
To compress, add compress = y to the end of the command above.
Data Import
1. import data from D: \ daochu. dmp to the TEST database.
Imp system/manager @ TEST file = d: \ daochu. dmp
The above may be a problem, because some tables already exist, and then it will report an error, the table will not be imported.
Add ignore = y to the end.
2. Import table 1 in d: \ daochu. dmp
Imp system/manager @ TEST file = d: \ daochu. dmp tables = (table1)
Create a tablespace
Create tablespace demo datafile 'e: \ oracle \ TableSpace \ tsdemo. dbf' size 100 M autoextend on next 1 M maxsize unlimited;
Create a user and assign the default Space
Create user deshortname
Identified by "userpwd"
Default tablespace demo
Temporary tablespace TEMP
Profile default;
Grant dba to demo; // revoke DBA Permissions
Grant unlimited tablespace to demo;