导入导出中支持表名模式匹配

这个特性是从9i开始支持的,格式如下:TABLES=(MYSCHEMA.ORDER%, MYSCHEMA.EMP%)
可以将以模式MYSCHEMA下以ORDER、EMP开头的表导出或者导入,下面是个简单的验证过程

[@more@]

[oracle@localhost oracle]$ sqlplus test/test

SQL*Plus: Release 9.2.0.4.0 - Production on 星期三 4月 26 09:38:26 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL> select table_name from user_tables;

TABLE_NAME
------------------------------
CLUSTER
SESSION
ZY_1
ZY_2
ZY_3

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
[oracle@localhost oracle]$ exp test/test file=tmp.dmp tables=(zy%)

Export: Release 9.2.0.4.0 - Production on 星期三 4月 26 09:38:57 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table ZY_1 2 rows exported
. . exporting table ZY_2 3 rows exported
. . exporting table ZY_3 4 rows exported
Export terminated successfully without warnings.
[oracle@localhost oracle]$
[oracle@localhost oracle]$ exp test/test file=tmp.dmp tables=(%)

Export: Release 9.2.0.4.0 - Production on 星期三 4月 26 09:39:29 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table CLUSTER 0 rows exported
. . exporting table SESSION 0 rows exported
. . exporting table ZY_1 2 rows exported
. . exporting table ZY_2 3 rows exported
. . exporting table ZY_3 4 rows exported
Export terminated successfully without warnings.
[oracle@localhost oracle]$ sqlplus test/test

SQL*Plus: Release 9.2.0.4.0 - Production on 星期三 4月 26 09:43:10 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL> drop table zy1;
drop table zy1
*
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> drop table zy_1;

Table dropped.

SQL> drop table zy_2;

Table dropped.

SQL> drop table zy_3;

Table dropped.

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

[oracle@localhost oracle]$ imp test/test file=tmp.dmp tables=(zy%)

Import: Release 9.2.0.4.0 - Production on 星期三 4月 26 09:44:00 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

Export file created by EXPORT:V09.02.00 via conventional path
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. importing ZHANGYI's objects into ZHANGYI
. . importing table "ZY_1" 2 rows imported
. . importing table "ZY_2" 3 rows imported
. . importing table "ZY_3" 4 rows imported
Import terminated successfully without warnings.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/3898/viewspace-830435/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/3898/viewspace-830435/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值