|
74 | 74 | "PGPASSWORD": "{password}"
|
75 | 75 | },
|
76 | 76 | "queries": {
|
77 |
| - "exec": { |
| 77 | + "execute": { |
78 | 78 | "options": []
|
79 | 79 | },
|
80 | 80 | "desc": {
|
|
109 | 109 | },
|
110 | 110 | "oracle": {
|
111 | 111 | "options": ["-S"],
|
112 |
| - "before": [ |
113 |
| - "SET AUTO OFF", |
114 |
| - "SET COLSEP '|'", |
115 |
| - "SET FEED ON", |
116 |
| - "SET FEEDBACK ON", |
117 |
| - "SET HEADING ON", |
118 |
| - "SET LINESIZE 32767", |
119 |
| - "SET LONG 100", |
120 |
| - "SET NULL @", |
121 |
| - "SET PAGESIZE 0 EMBEDDED ON", |
122 |
| - "SET SERVEROUTPUT ON", |
123 |
| - "SET SQLBLANKLINES ON", |
124 |
| - "SET SQLPROMPT ''", |
125 |
| - "SET TAB OFF", |
126 |
| - "SET TI ON", |
127 |
| - "SET TIMI OFF", |
128 |
| - "SET TRIMSPOOL OFF", |
129 |
| - "SET UND '-'", |
130 |
| - "SET VERIFY OFF ", |
131 |
| - "SET WRAP OFF" |
132 |
| - ], |
| 112 | + "before": [], |
133 | 113 | "after": [],
|
| 114 | + "env_optional": { |
| 115 | + "NLS_LANG": "{nls_lang}" |
| 116 | + }, |
134 | 117 | "args": "{username}/{password}@\"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={host})(PORT={port})))(CONNECT_DATA=(SERVICE_NAME={service})))\"",
|
135 | 118 | "queries": {
|
136 |
| - "exec": { |
137 |
| - "options": [] |
| 119 | + "execute": { |
| 120 | + "options": [], |
| 121 | + "before": [ |
| 122 | + // "SET TIMING ON", |
| 123 | + "SET LINESIZE 32767", |
| 124 | + "SET PAGESIZE 0", |
| 125 | + "SET EMBEDDED ON", |
| 126 | + "SET WRAP OFF", |
| 127 | + "SET TAB OFF", |
| 128 | + "SET TRIMOUT ON", |
| 129 | + "SET TRIMSPOOL ON", |
| 130 | + "SET NULL '@'", |
| 131 | + "SET COLSEP '|'", |
| 132 | + "SET FEEDBACK ON", |
| 133 | + "SET SERVEROUT ON", |
| 134 | + "SET SQLBLANKLINES ON" |
| 135 | + ] |
138 | 136 | },
|
139 | 137 | "desc" : {
|
140 |
| - "query": "select concat(concat(concat(concat('|', owner), '.'), table_name), '|') as tbls from all_tables UNION ALL select concat(concat(concat(concat('|', owner), '.'), view_name), '|') as tbls from all_views;", |
141 |
| - "options": [] |
| 138 | + "query": "select owner || '.' || name as obj from (select owner, table_name as name from all_tables union all select owner, view_name as name from all_views) o where owner not in ('ANONYMOUS','APPQOSSYS','CTXSYS','DBSNMP','EXFSYS', 'LBACSYS', 'MDSYS','MGMT_VIEW','OLAPSYS','OWBSYS','ORDPLUGINS', 'ORDSYS','OUTLN', 'SI_INFORMTN_SCHEMA','SYS','SYSMAN','SYSTEM', 'TSMSYS','WK_TEST','WKSYS', 'WKPROXY','WMSYS','XDB','APEX_040000', 'APEX_PUBLIC_USER','DIP', 'FLOWS_30000','FLOWS_FILES','MDDATA', 'ORACLE_OCM','SPATIAL_CSW_ADMIN_USR', 'SPATIAL_WFS_ADMIN_USR', 'XS$NULL','PUBLIC');", |
| 139 | + "options": [], |
| 140 | + "before": [ |
| 141 | + "SET LINESIZE 32767", |
| 142 | + "SET PAGESIZE 0", |
| 143 | + "SET EMBEDDED ON", |
| 144 | + "SET WRAP OFF", |
| 145 | + "SET HEADING OFF", |
| 146 | + "SET FEEDBACK OFF", |
| 147 | + "SET TRIMOUT ON" |
| 148 | + ] |
142 | 149 | },
|
143 | 150 | "columns": {
|
144 |
| - "query": "SELECT concat(concat(concat(concat('|', c.table_name), '.'), c.column_name), '|') AS cols FROM all_tab_columns c INNER JOIN all_tables t ON c.owner = t.owner AND c.table_name = t.table_name UNION ALL SELECT concat(concat(concat(concat('|', c.table_name), '.'), c.column_name), '|') AS cols FROM all_tab_columns c INNER JOIN all_views t ON c.owner = t.owner AND c.table_name = t.view_name;", |
145 |
| - "options": [] |
| 151 | + "query": "select table_name || '.' || column_name as obj from (select c.table_name, c.column_name, t.owner from all_tab_columns c inner join all_tables t on c.owner = t.owner and c.table_name = t.table_name union all select c.table_name, c.column_name, t.owner from all_tab_columns c inner join all_views t on c.owner = t.owner and c.table_name = t.view_name) o where owner not in ('ANONYMOUS','APPQOSSYS','CTXSYS','DBSNMP','EXFSYS', 'LBACSYS', 'MDSYS','MGMT_VIEW','OLAPSYS','OWBSYS','ORDPLUGINS', 'ORDSYS','OUTLN', 'SI_INFORMTN_SCHEMA','SYS','SYSMAN','SYSTEM', 'TSMSYS','WK_TEST','WKSYS', 'WKPROXY','WMSYS','XDB','APEX_040000', 'APEX_PUBLIC_USER','DIP', 'FLOWS_30000','FLOWS_FILES','MDDATA', 'ORACLE_OCM','SPATIAL_CSW_ADMIN_USR', 'SPATIAL_WFS_ADMIN_USR', 'XS$NULL','PUBLIC');", |
| 152 | + "options": [], |
| 153 | + "before": [ |
| 154 | + "SET LINESIZE 32767", |
| 155 | + "SET PAGESIZE 0", |
| 156 | + "SET EMBEDDED ON", |
| 157 | + "SET WRAP OFF", |
| 158 | + "SET HEADING OFF", |
| 159 | + "SET FEEDBACK OFF", |
| 160 | + "SET TRIMOUT ON" |
| 161 | + ] |
| 162 | + }, |
| 163 | + "functions": { |
| 164 | + "query": "select case when object_type = 'PACKAGE' then object_name||'.'||procedure_name else owner || '.' || object_name end || '()' as obj from all_procedures where object_type in ('FUNCTION','PROCEDURE','PACKAGE') and owner = sys_context('USERENV', 'CURRENT_SCHEMA');", |
| 165 | + "options": [], |
| 166 | + "before": [ |
| 167 | + "SET LINESIZE 32767", |
| 168 | + "SET PAGESIZE 0", |
| 169 | + "SET EMBEDDED ON", |
| 170 | + "SET WRAP OFF", |
| 171 | + "SET HEADING OFF", |
| 172 | + "SET FEEDBACK OFF", |
| 173 | + "SET TRIMOUT ON" |
| 174 | + ] |
146 | 175 | },
|
147 | 176 | "desc table": {
|
148 | 177 | "query": "desc {0};",
|
149 |
| - "options": [] |
| 178 | + "options": [], |
| 179 | + "before": [ |
| 180 | + "SET LINESIZE 80", // altered for readability |
| 181 | + "SET PAGESIZE 0", |
| 182 | + "SET EMBEDDED ON", |
| 183 | + "SET WRAP OFF", |
| 184 | + "SET TAB OFF", |
| 185 | + "SET TRIMOUT ON", |
| 186 | + "SET TRIMSPOOL ON", |
| 187 | + "SET NULL '@'", |
| 188 | + "SET COLSEP '|'", |
| 189 | + "SET FEEDBACK ON", |
| 190 | + "SET SERVEROUT ON", |
| 191 | + "SET SQLBLANKLINES ON" |
| 192 | + ] |
150 | 193 | },
|
151 | 194 | "show records": {
|
152 | 195 | "query": "select * from {0} WHERE ROWNUM <= {1};",
|
153 |
| - "options": [] |
| 196 | + "options": [], |
| 197 | + "before": [ |
| 198 | + "SET LINESIZE 32767", |
| 199 | + "SET PAGESIZE 0", |
| 200 | + "SET EMBEDDED ON", |
| 201 | + "SET WRAP OFF", |
| 202 | + "SET TAB OFF", |
| 203 | + "SET TRIMOUT ON", |
| 204 | + "SET TRIMSPOOL ON", |
| 205 | + "SET NULL '@'", |
| 206 | + "SET COLSEP '|'", |
| 207 | + "SET FEEDBACK ON", |
| 208 | + "SET SERVEROUT ON", |
| 209 | + "SET SQLBLANKLINES ON" |
| 210 | + ] |
154 | 211 | },
|
155 | 212 | "explain plan": {
|
156 | 213 | "query": "explain plan for {0};\nselect plan_table_output from table(dbms_xplan.display());",
|
157 |
| - "options": [] |
| 214 | + "options": [], |
| 215 | + "before": [ |
| 216 | + "SET LINESIZE 32767", |
| 217 | + "SET PAGESIZE 0", |
| 218 | + "SET EMBEDDED ON", |
| 219 | + "SET WRAP OFF", |
| 220 | + "SET TAB OFF", |
| 221 | + "SET TRIMOUT ON", |
| 222 | + "SET TRIMSPOOL ON", |
| 223 | + "SET NULL '@'", |
| 224 | + "SET COLSEP '|'", |
| 225 | + "SET FEEDBACK ON", |
| 226 | + "SET SERVEROUT ON", |
| 227 | + "SET SQLBLANKLINES ON" |
| 228 | + ] |
158 | 229 | }
|
159 | 230 | }
|
160 | 231 | },
|
|
165 | 236 | "args": "-h{host} -P{port} -u\"{username}\" -D\"{database}\"",
|
166 | 237 | "args_optional": ["--login-path=\"{login-path}\"", "--defaults-extra-file=\"{defaults-extra-file}\"", "-p\"{password}\""],
|
167 | 238 | "queries": {
|
168 |
| - "exec": { |
| 239 | + "execute": { |
169 | 240 | "options": ["--table", "-f"]
|
170 | 241 | },
|
171 | 242 | "desc" : {
|
|
201 | 272 | "mssql": {
|
202 | 273 | "options": [],
|
203 | 274 | "before": [],
|
204 |
| - "after": ["GO", "QUIT"], |
| 275 | + "after": ["go", "quit"], |
205 | 276 | "args": "-d \"{database}\"",
|
206 | 277 | "args_optional": ["-S \"{host},{port}\"", "-S \"{host}\\{instance}\"", "-U \"{username}\"", "-P \"{password}\""],
|
207 | 278 | "queries": {
|
208 |
| - "exec": { |
| 279 | + "execute": { |
| 280 | + "options": ["-k"] |
| 281 | + }, |
| 282 | + "show records": { |
| 283 | + "query": "select top {1} * from {0};", |
209 | 284 | "options": []
|
210 | 285 | },
|
| 286 | + "desc table": { |
| 287 | + "query": "exec sp_help N'{0}';", |
| 288 | + "options": ["-y30", "-Y30"] |
| 289 | + }, |
| 290 | + "desc function": { |
| 291 | + "query": "exec sp_helptext N'{0}';", |
| 292 | + "options": ["-h-1"] |
| 293 | + }, |
211 | 294 | "desc": {
|
212 |
| - "query": "set nocount on; select concat(table_schema, '.', table_name) from information_schema.tables order by table_name;", |
213 |
| - "options": ["-h", "-1"] |
| 295 | + "query": "set nocount on; select concat(table_schema, '.', table_name) as obj from information_schema.tables order by table_schema, table_name;", |
| 296 | + "options": ["-h-1"] |
214 | 297 | },
|
215 | 298 | "columns": {
|
216 |
| - "query": "set nocount on; select concat(table_name, '.', column_name) from information_schema.columns order by table_name, ordinal_position;", |
217 |
| - "options": ["-h", "-1"] |
218 |
| - }, |
219 |
| - "desc table": { |
220 |
| - "query": "exec sp_help \"{0}\";", |
221 |
| - "options": [] |
| 299 | + "query": "set nocount on; select distinct concat(table_name, '.', column_name) as obj from information_schema.columns;", |
| 300 | + "options": ["-h-1"] |
222 | 301 | },
|
223 |
| - "show records": { |
224 |
| - "query": "select top {1} * from {0};", |
225 |
| - "options": [] |
| 302 | + "functions": { |
| 303 | + "query": "set nocount on; select concat(routine_schema, '.', routine_name) as obj from information_schema.routines order by routine_schema, routine_name;", |
| 304 | + "options": ["-h-1"] |
| 305 | + }, |
| 306 | + "explain plan": { |
| 307 | + "query": "{0};", |
| 308 | + "options": ["-k"], |
| 309 | + "before": [ |
| 310 | + "SET STATISTICS PROFILE ON", |
| 311 | + "SET STATISTICS IO ON", |
| 312 | + "SET STATISTICS TIME ON" |
| 313 | + ] |
226 | 314 | }
|
227 | 315 | }
|
228 | 316 | },
|
|
232 | 320 | "after": [],
|
233 | 321 | "args": "-h {host} -p {port} -U \"{username}\" -w \"{password}\" -d \"{database}\"",
|
234 | 322 | "queries": {
|
235 |
| - "exec": { |
| 323 | + "execute": { |
236 | 324 | "options": []
|
237 | 325 | },
|
238 | 326 | "desc" : {
|
|
263 | 351 | "after": [],
|
264 | 352 | "args": "-S {host}:{port} -U\"{username}\" -P\"{password}\" -D{database}",
|
265 | 353 | "queries": {
|
266 |
| - "exec": { |
| 354 | + "execute": { |
267 | 355 | "options": [],
|
268 | 356 | "before": ["\\set semicolon_cmd=\"\\go -mpretty -l\""]
|
269 | 357 | },
|
|
295 | 383 | "after": [],
|
296 | 384 | "args": "\"{database}\"",
|
297 | 385 | "queries": {
|
298 |
| - "exec": { |
| 386 | + "execute": { |
299 | 387 | "options": ["-column", "-header"]
|
300 | 388 | },
|
301 | 389 | "desc" : {
|
|
322 | 410 | "after": [],
|
323 | 411 | "args": "-u \"{username}\" -p \"{password}\" \"{host}/{port}:{database}\"",
|
324 | 412 | "queries": {
|
325 |
| - "exec": { |
| 413 | + "execute": { |
326 | 414 | "options": []
|
327 | 415 | },
|
328 | 416 | "desc" : {
|
|
0 commit comments