ORACLE数据库导入导出相关小结
来源:互联网 发布:java version 编辑:程序博客网 时间:2024/06/03 17:24
**: {}表示变量或注解 []表示可选项 ()表示原始意义 ,-表示省略重复或者循环
1,oracle导出某用户的数据库-非exp工具的exp命令(oracle自带程序):
exp {user name}/{user password}@<oracle IP>:<port>/{oracle SID} owner=({username1 of who the tables you will export belongs},{username2 of who the tables you will export belongs to},-) file={dmp file storage directory} [log={log file storage directory}] [grants=y] [compress=y] [full=y]
example1: exp rofine/rofine@192.168.1.60:1521/orcl owner={system,rofine} file=C:\daochu.dmp log=C:\daochu.log compress=y
example2: exp rofine/rofine@orcl owner=rofine file=C:\daochu.dmp log=C:\daochu.log compress=y grants=y
**: 1,grants=y,对于没有拥有到处权限或者非管理员的账户,需要赋予此权限才能进行导出操作;
2,compress=y,是否压缩dmp数据;
3,full=y,将导出所有用户的数据,此时不能指定owner参数,否则导致 冲突模式错误;
4, 其中oracle IP和port,如果是本机上操作并且port是默认的1521,则ip和port都可以不指定,否则,需要指定ip和port,他们之间用冒号':'隔开,port和SID之间用反斜杠'/'隔开;
2,oracle导出某用户的数据库中的某些表-非exp工具的exp命令(oracle自带程序):
exp {user name}/{user password}@{oracle SID} file={dmp file storage directory} log={log file storage directory} tables=({full name of table1, name of table2,-}) [query=\" where {column name} like '%{value}%'\"] [grants=y]
example1: exp rofine/rofine@orcl file=C:\daochu.dmp log=C:\daochu.log tables={role_privileges,privileges} grants=y
example2: exp rofine/rofine@orcl file=C:\daochu.dmp log=C:\daochu.log tables={role_privileges} query=\" where fk_role_id like '%10%'\" grants=y compress=y
**: 1,grants=y,对于没有拥有到处权限或者非管理员的账户,需要赋予此权限才能进行导出操作;
2,导出具体的某些表数据时,切忌不能使用owner参数来指定要导出的表所属的用户,但是必须在tables参数里面,对table name要写全名,即加上所属用户名,否则将导致 冲突模式错误;
3,如果要对某一个表进行query查询query符合条件的数据记录,则tables里面只能有一个table name,query格式是必须采用‘\’转义;
3, oracle导入dmp数据-非imp工具的imp命令(oracle自带程序):
imp {user name}/{user password}@{oracle SID} fromuser={username of the user who the import file belongs to} touser={username of the user import into} file={the import file directory} [log={the log file storage directory}] [grants=y]
example: imp rofine/rofine@orcl fromuser=rofine touser=rofine file=C:\daochu.dmp log=C:\daochu.log grants=y
1,oracle导出某用户的数据库-非exp工具的exp命令(oracle自带程序):
exp {user name}/{user password}@<oracle IP>:<port>/{oracle SID} owner=({username1 of who the tables you will export belongs},{username2 of who the tables you will export belongs to},-) file={dmp file storage directory} [log={log file storage directory}] [grants=y] [compress=y] [full=y]
example1: exp rofine/rofine@192.168.1.60:1521/orcl owner={system,rofine} file=C:\daochu.dmp log=C:\daochu.log compress=y
example2: exp rofine/rofine@orcl owner=rofine file=C:\daochu.dmp log=C:\daochu.log compress=y grants=y
**: 1,grants=y,对于没有拥有到处权限或者非管理员的账户,需要赋予此权限才能进行导出操作;
2,compress=y,是否压缩dmp数据;
3,full=y,将导出所有用户的数据,此时不能指定owner参数,否则导致 冲突模式错误;
4, 其中oracle IP和port,如果是本机上操作并且port是默认的1521,则ip和port都可以不指定,否则,需要指定ip和port,他们之间用冒号':'隔开,port和SID之间用反斜杠'/'隔开;
2,oracle导出某用户的数据库中的某些表-非exp工具的exp命令(oracle自带程序):
exp {user name}/{user password}@{oracle SID} file={dmp file storage directory} log={log file storage directory} tables=({full name of table1, name of table2,-}) [query=\" where {column name} like '%{value}%'\"] [grants=y]
example1: exp rofine/rofine@orcl file=C:\daochu.dmp log=C:\daochu.log tables={role_privileges,privileges} grants=y
example2: exp rofine/rofine@orcl file=C:\daochu.dmp log=C:\daochu.log tables={role_privileges} query=\" where fk_role_id like '%10%'\" grants=y compress=y
**: 1,grants=y,对于没有拥有到处权限或者非管理员的账户,需要赋予此权限才能进行导出操作;
2,导出具体的某些表数据时,切忌不能使用owner参数来指定要导出的表所属的用户,但是必须在tables参数里面,对table name要写全名,即加上所属用户名,否则将导致 冲突模式错误;
3,如果要对某一个表进行query查询query符合条件的数据记录,则tables里面只能有一个table name,query格式是必须采用‘\’转义;
3, oracle导入dmp数据-非imp工具的imp命令(oracle自带程序):
imp {user name}/{user password}@{oracle SID} fromuser={username of the user who the import file belongs to} touser={username of the user import into} file={the import file directory} [log={the log file storage directory}] [grants=y]
example: imp rofine/rofine@orcl fromuser=rofine touser=rofine file=C:\daochu.dmp log=C:\daochu.log grants=y
0 0
- ORACLE数据库导入导出相关小结
- 导出导入oracle数据库
- Oracle数据库导入导出
- ORACLE 数据库导入导出
- ORACLE 数据库导入导出
- oracle 数据库导入导出
- ORACLE数据库导入导出
- ORACLE数据库导入导出
- ORACLE数据库导入导出
- oracle数据库导入导出
- Oracle导入导出数据库
- ORACLE 数据库导入、导出
- oracle数据库导入导出
- Oracle导入导出数据库
- oracle数据库导入导出
- oracle数据库导入导出
- Oracle 数据库 导入导出
- Oracle数据库导入导出
- mysql_store_result和mysql_use_result的区别
- Docker的安全性
- 11g安装oracle text组件
- poj 1753 Flip Game 点灯问题
- expect学习笔记-3
- ORACLE数据库导入导出相关小结
- 安装pnp4nagios时出现Pango-WARNING **: error opening config file '/home/www/.pangorc': Not a directory错误
- Cordova 3.6.3 + Sencha Touch 2.4.0 打包 APK 详细教程
- liunx mysql 安装
- Windows线程同步的方法
- 日历之完美版-添加了输入框
- java常用设计模式
- [转载]基于效率考虑,对Windows多线程同步机制的选择,分析与实测
- 论ntoskrnl.exe中的导出函数、非导出函数、公开函数、非公开函数