ITPub博客

首页 > 数据库 > Oracle > 记录一次sqlplus导出文件

记录一次sqlplus导出文件

原创 Oracle 作者:wzq609 时间:2015-07-28 13:47:39 0 删除 编辑

【说明】本文档介绍通过sqlplus导出数据的办法

 

【1】远程桌面登录到服务器

 

【2】进行脚本的编辑,脚本文件为D:\export.sql,用记事本打开

注意:请注意修改导出文件的名称和导出条件

set termout off

set pagesize 0

set verify off

set echo off

set heading on;

spool D:\export\201413.csv #修改输出的文件名

select FKDAT||','||VKORG||','||KTGRM||','||FKIMG||','||NETWR||','||MWSBP||','||TOTAL FROM VW_TOTAL_R WHERE FKDAT='20140113'; #修改输出的条件,导出20140113这一天的数据

spool off

exit

 

【3】运行脚本

C:\Users\Administrator>sqlplus datachk/datachk@db1 #输入脚本

 

SQL*Plus: Release 11.2.0.1.0 Production on 星期一 4月 6 10:33:58 2015

 

Copyright (c) 1982, 2010, Oracle. 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

 

SQL> @d:\export.sql 输入脚本

从 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options 断

开

 

【4】 导出的结果文件,在D:export下面

227659435

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

请登录后发表评论 登录
全部评论

注册时间:2013-06-16

  • 博文量
    173
  • 访问量
    3083836