diff --git a/packages/tools/src/DatabaseAnalyser.ts b/packages/tools/src/DatabaseAnalyser.ts index 0480d0af..0b87fddb 100644 --- a/packages/tools/src/DatabaseAnalyser.ts +++ b/packages/tools/src/DatabaseAnalyser.ts @@ -322,7 +322,7 @@ export class DatabaseAnalyser { this.logger.debug({ rows: res.rows.length, template }, `Loaded analyser query`); return res; } catch (err) { - logger.error({ err }, 'Error running analyser query'); + logger.error({ err, message: err.message, template, sql }, 'Error running analyser query'); return { rows: [], }; diff --git a/plugins/dbgate-plugin-oracle/src/backend/sql/views.js b/plugins/dbgate-plugin-oracle/src/backend/sql/views.js index dfefd893..423a48ea 100644 --- a/plugins/dbgate-plugin-oracle/src/backend/sql/views.js +++ b/plugins/dbgate-plugin-oracle/src/backend/sql/views.js @@ -4,9 +4,10 @@ select avv.*, from (select view_name as "pure_name", -- owner as "schema_name", - SUBSTR(text_vc, 1, 3900) AS "create_sql" + -- SUBSTR(text_vc, 1, 3900) AS "create_sql" + text as "create_sql" from all_views av - where owner = '$owner' and text_vc is not null + where owner = '$owner' and text is not null ) avv where 'views:' || "pure_name" =OBJECT_ID_CONDITION `;