使用 finderr 实用程序来查看 GBase 8s 上错误消息的额外信息。在 UNIX™ 和 Linux™ 平台上,该信息通过命令行显示。在 Windows™ 平台上,该信息在错误消息程序中显示。
元素 | 用途 | 关键注意事项 |
---|---|---|
error_number | 错误消息编号为其提供额外信息 | 在 UNIX 或 Linux 上: 如果错误消息不包含减号 (-) 或加号
(+),并且存在正版本和负版本的错误消息,那么将会显示负版本的消息。若错误消息的编号前带一个加号则显示的信息是正的错误消息。
在 Windows 上: 如果错误消息不包含减号 (-) 或加号(+),并且存在正版本和负版本的错误消息,那么必须在错误消息程序中手动选择您想要查看的消息。 |
在消息日志中输出的错误消息内容包含了消息的编号及其简要概述。使用 finderr 消息编号命令来查找错误和可能的用户操作的原因的更详细的描述,以纠正或防止错误。
在 Windows 上,您可以直接从数据库服务器程序组中选择 Error Messages 来打开错误消息程序。
下面的命令显示了在 UNIX 或 Linux 平台上有关错误消息 -201 的信息:
finderr 201 -201 A syntax error has occurred. This general error message indicates mistakes in the form of an SQL statement. Look for missing or extra punctuation (such as missing or extra commas, omission of parentheses around a subquery, and so on), keywords misspelled (such as VALEUS for VALUES), keywords misused (such as SET in an INSERT statement or INTO in a subquery), keywords out of sequence (such as a condition of "value IS NOT" instead of "NOT value IS"), or a reserved word used as an identifier. Database servers that provide full NIST compliance do not reserve any words; queries that work with these database servers might fail and return error -201 when they are used with earlier versions of GBase 8s database servers. The cause of this error might be an attempt to use round-robin syntax with CREATE INDEX or ALTER FRAGMENT INIT on an index. You cannot use round-robin indexes. The error may also occur if an SQL statement uses double quotation marks around input strings and the environment variable DELIMIDENT is set. If DELIMIDENT is set, strings that are surrounded by double quotation marks are regarded as SQL identifiers rather than string literals. For more information on the usage of DELIMIDENT, see the GBase 8s Guide to SQL: Reference.
下列命令显示了有关错误消息 100 ,即对应于 SQLCODE 值为 100 的信息:
finderr +100 100 No matching records found. The database server did not find any more data. This message is an ANSI- standard SQLCODE value. If you attempted to select or fetch data, you encountered the end of the data, or no data matched the criteria in the WHERE clause. Check for an empty table. Use this SQLCODE value to determine when a statement reaches the end of the data. For more information, see the discussion of SQLCODE in the GBase 8s ESQL/C Programmer's Manual. The database server can return this SQLCODE value to a running program.