oracle一条sql执行导入sql文件

来源:互联网 发布:vc ∈npc算法 编辑:程序博客网 时间:2024/04/29 20:17

sqlplus是oracle提供的一个命令行工具

使用这个命令 可以在cmd中

 

sqlplus huqun/liaomin@tianci  可以连接到oracle数据库

 

C:\>sqlplus huqun/liaomin@tianci53

SQL*Plus: Release 9.2.0.1.0 - Production on 星期三 10月 19 14:48:47 2011

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


连接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

SQL>

 

导入sql 只需要输入 @c:/test.sql  记得假如@符号

如果是用java应用程序 可以使用java调用cmd命令

sqlplus huqun/liaomin@tianci53  @c:/sql.ql

 

如果要记录日志:

sqlplus huqun/liaomin@tianci53  @c:/sql.ql >log.log

原创粉丝点击