export导出一条记录

尝试从数据库里导出一条记录,下面从不同系统导出一条记录:

[@more@]

1. windows 7:


C:Users123>exp hr/hr file=c:emp_1.dmp tables=hr.employees_t query="where rownum <= '1' "

Export: Release 11.2.0.3.0 - Production on 星期五 2月 1 10:08:29 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.


连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
服务器使用 AL32UTF8 字符集 (可能的字符集转换)

即将导出指定的表通过常规路径...
. . 正在导出表 EMPLOYEES_T导出了 1 行
EXP-00091: 正在导出有问题的统计信息。
导出成功终止, 但出现警告。

2. AIX 5.3

exp "/ as sysdba" tables=CASESURVEY.QUEST_SL_TEMP_EXPLAIN1,COREBASE.FEE_HIGH_SEARCH,

COREBASE.FILE_TEMPLATE,COREBASE.LAND_LONGTEXT,

COREBASE.LAND_OPINION,COREBASE.LAND_PARAMCONFIG,

COREBASE.LAND_PRINTFORM,COREBASE.LAND_SEND_CONTROL file=/oradata/user_1.dmp log=/oradata/user_1.log grants=n indexes=n statistics=none query=""where rownum <= '1' ""

Connected to: Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
Note: grants on tables/views/sequences/roles will not be exported
Note: indexes on tables will not be exported

About to export specified tables via Conventional Path ...
Current user changed to CASESURVEY
. . exporting table QUEST_SL_TEMP_EXPLAIN1
Current user changed to COREBASE
. . exporting table FEE_HIGH_SEARCH 1 rows exported
. . exporting table FILE_TEMPLATE 1 rows exported
. . exporting table LAND_LONGTEXT 1 rows exported
. . exporting table LAND_OPINION 1 rows exported
. . exporting table LAND_PARAMCONFIG 1 rows exported
. . exporting table LAND_PRINTFORM 1 rows exported
. . exporting table LAND_SEND_CONTROL 1 rows exported
. . exporting table LSGIS_STAFF_T 0 rows exported
. . exporting table MMDATA 1 rows exported
. . exporting table SEL_RADIO_LIST_CONFIG 1 rows exported
Current user changed to DKNW
. . exporting table CK_ITEM_ARCHIVES 1 rows exported
. . exporting table TK_ITEM_ARCHIVES 1 rows exported
Current user changed to ECASE
. . exporting table E_SERMATERIAL 1 rows exported
Current user changed to EMAPCGGL
. . exporting table E_CHK_SERMATERIAL 1 rows exported
. . exporting table QUEST_SL_TEMP_EXPLAIN1

.......

..........

Export terminated successfully without warnings.

0条记录,是因为表是空表.

3. linux 5.3

[oracle@dbhouse ~]$ exp hr/hr file=/tmp/hr.dmp tables=hr.employees_t query="where rownum = '1' "

Export: Release 11.2.0.3.0 - Production on Fri Feb 1 18:18:11 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table EMPLOYEES_T 1 rows exported
Export terminated successfully without warnings.

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

转载于:http://blog.itpub.net/28227905/viewspace-1060184/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
帮我优化以下代码,不使用ADO ,然后每次导出不同的10000条记录至新的EXECL文件中:Dim strSQL As String Dim strFileName As String Dim i As Long Dim batchSize As Long '每批次导出记录数 Dim batchCount As Long '批次计数器 Dim exportCount As Long '导出计数器 '设置导出文件路径和文件名 strFileName = "C:\Users\icd\Desktop\流水分割\" batchSize = 10000 '每批次导出记录数 DoCmd.SetWarnings False '暂时关闭Access的警告信息 DoCmd.RunSQL "SELECT 导出数据.* INTO ExportData FROM 导出数据" '将表导入临时表ExportData DoCmd.SetWarnings True '重新开启Access的警告信息 Set rs = CurrentDb.OpenRecordset("SELECT * FROM ExportData", dbOpenSnapshot) '打开临时表ExportData '循环导出数据 Do While Not rs.EOF If exportCount Mod batchSize = 0 Then '每批次导出到一个新的文件 If exportCount <> 0 Then DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "ExportData", strFileName & Format(batchCount, "000000") & ".xlsx", True End If batchCount = batchCount + 1 End If exportCount = exportCount + 1 rs.MoveNext Loop '导出最后一份文件 If exportCount Mod batchSize <> 0 Then DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "ExportData", strFileName & Format(batchCount, "000000") & ".xlsx", True End If rs.Close Set rs = Nothing DoCmd.SetWarnings False '暂时关闭Access的警告信息 DoCmd.RunSQL "DROP TABLE ExportData" '删除临时表ExportData DoCmd.RunSQL "DELETE 导出数据.* FROM 导出数据" '删除导出数据内容 DoCmd.SetWarnings True '重新开启Access的警告信息
最新发布
06-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值