You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/extensions/db2i/index.mdx
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,41 @@ The Db2 for i extension adds a view called Schema Browser which allows the user
80
80
81
81
If you are using the Schema Browser to browse objects, you are able to use the 'View contents' icon when hovering over a table, view, or alias to cause a basic SQL select statement to be generated and executed.
82
82
83
+
## SQL Error Logging Facility (SELF)
84
+
85
+
SQL Error Logging Facility (SELF) offers a comprehensive view that can help users understand specific SQL errors or warnings. The SELF view can be accessed through the IBM i panel next to the Results View.
86
+
87
+
Additional documentation of SELF can be found [here](https://www.ibm.com/docs/en/i/7.5?topic=tools-sql-error-logging-facility-self)
88
+
89
+

90
+
91
+
Each item in the SELF view is for a specific `SQLCODE` which is displayed in parenthesis. The `SQLCODE` tracks the actual error or warning triggered by a given SQL statement.
92
+
93
+
- An error SQLCODE must be preceded by a single minus sign ('-').
94
+
- A warning SQLCODE can be preceded by an optional plus sign ('+').
95
+
96
+
When an item is expanded or hovered over, information about the `SQLCODE` is displayed such as the Job Name, Call Stack, Additional Details, and the SQL statement. The counter on the right of each item denotes the number of occurrences(🔥) of the specific `SQLCODE` . Once the number of occurrences for a given code is greater than 100, we display 💯.
97
+
98
+
### Enabling SELF in VSCode
99
+
100
+
To capture SQL errors or warnings, enable the SELF Default in your VSCode settings. This will be the Default `SYSIBMADM.SELFCODES` global variable for all jobs. By default, the `SELFCODES` level is set to *NONE.
101
+
102
+
-*ERROR specifies all SQLCODEs that are error conditions (negative values).
103
+
-*WARN specifies all SQLCODEs that are warning conditions (positive
104
+
values).
105
+
-*ALL specifies all SQLCODEs that are error or warning conditions.
106
+
-*NONE turns off SELF processing.
107
+
108
+

109
+
110
+
The SELF Level can also be set on a per job basis by right clicking on the active job in the [SQL Job Manager](#sql-job-manager)
111
+
112
+
### Auto Refresh
113
+
114
+

115
+
116
+
We added the option for users to configure `Auto Refresh` on the SELF view. When enabled, the SELF view will update on a constant interval (every 30 seconds). The SELF view can be cleared by clicking the trash icon.
117
+
83
118
## Visual Explain
84
119
85
120
We have added Visual Explain into the database extension with a more lightweight approach of explain data. The typically run button on the document now has options to either run, run and explain or explain without running, which will show the explain nodes and node details in the same result set view.
0 commit comments