运行cmd后输入如下代码 建立数据库连接
Sqlplus system/system@sc //连接上systemuser sc的服务器 (如果没有用户名则创建,代码如下)
Grant dba to lzgl identified by lzgl; //创建lzgl数据库的登录名称
Grant dba to systemuser identified by systemuser; //创建systemuser数据库的登录名称
Exit; //完成
导入数据库
Imp lzgl/lzgl@sc // lzgl 为数据库用户,sc 为服务名称
D:\dmp\sclzgl.dmp //输入数据库文件所在的目录
导出数据库
Exp 命令导出
1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中
exp system/manager@TEST file=d:\daochu.dmp full=y
2 将数据库中system用户与sys用户的表导出
exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)
3 将数据库中的表table1 、table2导出
exp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2)
4 将数据库中的表table1中的字段filed1以"00"打头的数据导出
exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"