DB2 v7.2 中的高级 SQL 过程脚本编制
2008-09-09 16:30:15 来源:WEB开发网在上面的输出中,成功执行了脚本,但我们注意到屏幕输出不同于日志文件(output.log)的输出。用粗体突出显示了这些差别,并且它们都是用感叹号(!)作为前缀的 OS“echo”命令。因为那些命令都在 OS 级别上执行,而不是由 DB2 执行,所以没有通过 -z 标志记录它们的输出。
请注意最后一句由下面 DB2 的 VALUES 语句发出的注释:
This will get written to the screen AND log file
被同时写到屏幕和日志文件,因为这个命令是由 DB2,而不是 OS 执行的。
下面是当脚本在星期三运行时相对应的屏幕和日志文件的结果:
屏幕输出 日志文件输出 beginning complex.db2
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0438N Application raised error with diagnostic text: "Script is for MON & FRI only!" SQLSTATE=80000
Retrieving from HELLO table..
MYCOL
--------------------
0 record(s) selected.
Cleaning up...
SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000
This will get written to screen, but not to log file
1
-----------------------------------
This will get written to the screen AND log file
1 record(s) selected.
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0438N Application raised error with diagnostic text: "Script is for MON & FRI only!" SQLSTATE=80000
MYCOL
--------------------
0 record(s) selected.
SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000
1
-----------------------------------
This will get written to the screen AND log file
1 record(s) selected.
- ››sql server自动生成批量执行SQL脚本的批处理
- ››sql server 2008亿万数据性能优化
- ››SQL Server 2008清空数据库日志方法
- ››sqlserver安装和简单的使用
- ››SQL Sever 2008 R2 数据库管理
- ››SQL SERVER无法安装成功,sqlstp.log文件提示[未发...
- ››Sql Server中通过父记录查找出所有关联的子记录
- ››SqlServer触发器、存储过程和函数
- ››SQL Server 中的事务(含义,属性,管理)
- ››Sqlite数据库插入和读取图片数据
- ››Sql server 2005拒绝了对对象 'xx表' (数...
- ››Sql server 2005拒绝了对对象 'xx表' (数...
更多精彩
赞助商链接