The SET PRINTRULES statement specifies whether rule names and statement
types are to be issued as messages when the rules are fired during
a DBEnvironment session.
Scope |
 |
ISQL or Application Programs
SQL Syntax |
 |
Parameters |
 |
- ON
specifies that rule name and statement type should
be issued as a message when the rule is fired.
- OFF
specifies that rule name and statement type should
not be issued as a message when the rule is fired. This is the default
for all sessions.
Description |
 |
SET PRINTRULES OFF returns the DBEnvironment session to its default behavior
of not issuing messages with rule names and statement types as rules
fire.
SET PRINTRULES ON causes rule names and statement types (INSERT, DELETE, UPDATE) to be issued as messages in the current DBEnvironment
session until the session completes or a SET PRINTRULES OFF statement is executed.
SET PRINTRULES ON has no effect if rule printing is already on in the DBEnvironment.
SET PRINTRULES OFF has no effect if rule printing is already off in the DBEnvironment.
The statement only affects the current SID (session
id). Other users are not affected.
Rule names are printed by issuing an informative
message DBWARN 2021, with the following text:
Rule Owner.RuleName fired on StatementType statement.
|
StatementType is one of the following:
The effects of this statement are not undone by
a ROLLBACK WORK or COMMIT WORK statement.
Authorization |
 |
You must have DBA authority.
Example |
 |
The DBA enables the issuing of messages when rules fire.
The DBA issues statements that fire rules.
INSERT INTO PurchDB.Parts VALUES (9213, 'Widget', 12.95)
Rule PurchDB.InsertParts fired on INSERT statement. (DBWARN 2021)
|
The DBA disables the issuing of messages when rules fire.