oracle导出导入某用户所有数据(表、视图、存储过程....)

cmd下:
导出: exp 用户名/密码@数据库 owner = 用户名 file=文件保存路径;
例:exp shaoge/123@orcl owner=shaoge file=F:\abc.dmp tables=(t1,t2) tables可省

导入:imp 用户名/密码@数据库 fromuser = 用户名 touser = 用户名 file = 文件路径 ignore = y

fromuser:文件的指定用户
touer: 导入某用户
ignore: 是否忽略创建错误 y/n

导出表单部分数据:
1.windows:exp shaoge/123@orcl file=F:\abc.dmp tables=abc query="""(条件)""
2.Linux:exp shaoge/123@orcl file=\abc.dmp tables=abc query=\" where time \>=to_date\(\‘1234-05-06\’,\‘yyyy-mm-dd\’\)\"
\ " \’ \( \) \> \< 转义字符
3.通用 : exp shaoge/123@orcl tables=t file =abc.dmp parfile = E:\exp.par
exp.par : query =“where time<=to_date(‘1234-05-06’,‘yyyy-mm-dd’)”
条件写在exp.par文件中 不需要转义

你可能感兴趣的:(oracle)