102.You want to import schema objects of the HR user using Oracle Data Pump from the development dat
来源:互联网 发布:推荐充电宝 知乎 编辑:程序博客网 时间:2024/05/22 17:43
102.You want to import schema objects of the HR user using Oracle Data Pump from the development
database, DEVDB, to the production database, PRODDB. A database link devdb.us.oracle.com is
created between PRODDB and DEVDB.
You execute the following command on the PRODDB database server:
$ impdp system/manager directory = DB_DATA
dumpfile = schemas.dat
schemas = hr
flashback_time = "TO_TIMESTAMP('25-08-2007 14:35:00', 'DD-MM-YYYY HH24:MI:SS')"
The command fails displaying the following error:
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31640: unable to open dump file "/home/oracle/schema/schemas.dat" for read
ORA-27037: unable to obtain file status
What would you do to overcome the error?
A.Add the user, SYSTEM, to the schemas option.
B.Add the network_link = devdb.us.oracle.com option.
C.Change the dumpfile option to schema.dat@devdb.us.oracle.com.
D.Replace the schemas option with the network_link = devdb.us.oracle.com option.
E.Replace the dumpfile option with the network_link = devdb.us.oracle.com option.
答案:E
解析:这道题主要问的是远程导入,我们测试一下远程导入和导出
这里需要注意的是network_link和dumpfile不能同时出现,如果远程导入的话,并且数据文件不在被导入的服务器本地的话,那么
必须使用network_link,还有一种方法,那就是先导入本地,然后通过network_link导入目标数据库
impdp导入远程数据库
1.impdp system/oracle@test3 directory=data_pump_dir dumpfile=test.dmp logfile=log.log tables=test.dept;
这里directory指的是远程的目录,dumpfile指的是远程的文件
2.如果dmp文件在本地,那么只能通过使用network_link来进行操作
客户端A:wahaha3,存在test
服务端B:wahaha7,不存在test
在B上执行,impdp system/oracle directory=data_pump_dir logfile=log.log network_link='dblink3' schemas=test remap_tablespace=test:users;
--这里需要注意,这个impdp是在目标端执行的,直接从远程客户机test导过来,说明还是在服务器上
在A上执行,impdp system/oracle@wahaha7 directory=data_pump_dir logfile=log.log network_link='dblink3' schemas=test remap_tablespace=test:users;
总结:这里impdp 连接的哪个库,就给哪个库里面导入,network_link是连接到的数据库的link
expdp导出
在wahaha7上导出wahaha3的东西
1.wahaha7上创建public database link
SQL> CREATE PUBLIC DATABASE LINK dblink3
2 CONNECT TO system
3 IDENTIFIED BY oracle
4 using 'TEST3';
[oracle@wahaha7 ~]$ expdp system/oracle directory=data_pump_dir dumpfile=test.dmp logfile=log.log network_link='dblink3' schemas=test;
directory==wahaha7的目录
dumpfile==wahaha7的文件
network_link==连接wahaha3的dblink
--这个时候出成功,并且本地数据库中并没有导入test账号,这里使用system/oracle估计是使用dblink
database, DEVDB, to the production database, PRODDB. A database link devdb.us.oracle.com is
created between PRODDB and DEVDB.
You execute the following command on the PRODDB database server:
$ impdp system/manager directory = DB_DATA
dumpfile = schemas.dat
schemas = hr
flashback_time = "TO_TIMESTAMP('25-08-2007 14:35:00', 'DD-MM-YYYY HH24:MI:SS')"
The command fails displaying the following error:
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31640: unable to open dump file "/home/oracle/schema/schemas.dat" for read
ORA-27037: unable to obtain file status
What would you do to overcome the error?
A.Add the user, SYSTEM, to the schemas option.
B.Add the network_link = devdb.us.oracle.com option.
C.Change the dumpfile option to schema.dat@devdb.us.oracle.com.
D.Replace the schemas option with the network_link = devdb.us.oracle.com option.
E.Replace the dumpfile option with the network_link = devdb.us.oracle.com option.
答案:E
解析:这道题主要问的是远程导入,我们测试一下远程导入和导出
这里需要注意的是network_link和dumpfile不能同时出现,如果远程导入的话,并且数据文件不在被导入的服务器本地的话,那么
必须使用network_link,还有一种方法,那就是先导入本地,然后通过network_link导入目标数据库
impdp导入远程数据库
1.impdp system/oracle@test3 directory=data_pump_dir dumpfile=test.dmp logfile=log.log tables=test.dept;
这里directory指的是远程的目录,dumpfile指的是远程的文件
2.如果dmp文件在本地,那么只能通过使用network_link来进行操作
客户端A:wahaha3,存在test
服务端B:wahaha7,不存在test
在B上执行,impdp system/oracle directory=data_pump_dir logfile=log.log network_link='dblink3' schemas=test remap_tablespace=test:users;
--这里需要注意,这个impdp是在目标端执行的,直接从远程客户机test导过来,说明还是在服务器上
在A上执行,impdp system/oracle@wahaha7 directory=data_pump_dir logfile=log.log network_link='dblink3' schemas=test remap_tablespace=test:users;
总结:这里impdp 连接的哪个库,就给哪个库里面导入,network_link是连接到的数据库的link
expdp导出
在wahaha7上导出wahaha3的东西
1.wahaha7上创建public database link
SQL> CREATE PUBLIC DATABASE LINK dblink3
2 CONNECT TO system
3 IDENTIFIED BY oracle
4 using 'TEST3';
[oracle@wahaha7 ~]$ expdp system/oracle directory=data_pump_dir dumpfile=test.dmp logfile=log.log network_link='dblink3' schemas=test;
directory==wahaha7的目录
dumpfile==wahaha7的文件
network_link==连接wahaha3的dblink
--这个时候出成功,并且本地数据库中并没有导入test账号,这里使用system/oracle估计是使用dblink
0 0
- 102.You want to import schema objects of the HR user using Oracle Data Pump from the development dat
- 101.You want to move all objects of the APPS user in the test database to the DB_USER schema of the
- 160 You want to use the automatic management of backup and recovery operations features for your dat
- 68.You are managing an Oracle Database 11g database. You want to ensure the recovery of the database
- The using of import
- Exporting and Importing Objects Using Oracle Data Pump(1.expdp)
- Exporting and Importing Objects Using Oracle Data Pump(2.impdp)
- Browser Helper Objects: The Browser the Way You Want It
- Browser Helper Objects: The Browser the Way You Want It
- How to export/import data with LOB type from one user/schema to another
- 103.Which two statements are true regarding the Oracle Data Pump export and import operations? (Choo
- Android-WARNING: Uninstalling will remove the application data! Do you want to uninstall the existi
- 155.The user HR owns the EMP table. The user HR grants privileges to the user SCOTT by using this co
- ccah-500 第45题 You want to minimize the chance of data loss in your cluster. What should you do
- 69.You are working on an instance started using the SPFILE. You want to move the Flash Recovery Area
- Data Pump Import --ORACLE SG
- 93.You are using flat files as the data source for one of your data warehousing applications. To opt
- 147.View the Exhibit. You want to create a tablespace to contain objects with block size 16 KB. But
- Linux 下使用mount命令挂载CDROM
- Visual Studio 的免费性能调试工具
- 01-Shiro初识
- 机器学习(周志华) 参考答案 第四章 决策树 4.5
- linux swap分区使用指南
- 102.You want to import schema objects of the HR user using Oracle Data Pump from the development dat
- Android多线程消息处理机制(一) Looper、Thread专题
- 自定义复选框checkbox样式
- HDOJ 3791 二叉搜索树(二叉树)
- splay伸展树
- 递归的应用-获取body的后代元素
- CodeForces 339D Xenia and Bit Operations 数据结构+线段树+点更新
- Java 中的 static 使用之静态变量·静态方法·静态初始化块
- java中的冒泡排序