mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 00:16:00 +00:00
oracle analyser per schema
This commit is contained in:
@@ -10,6 +10,6 @@ select
|
||||
data_scale as "numeric_scale",
|
||||
data_default as "default_value"
|
||||
FROM all_tab_columns av
|
||||
where TABLE_NAME =OBJECT_ID_CONDITION
|
||||
where OWNER='$owner' AND TABLE_NAME =OBJECT_ID_CONDITION
|
||||
order by column_id
|
||||
`;
|
||||
@@ -10,7 +10,7 @@ select fk.constraint_name as "constraint_name",
|
||||
basecol.column_name as "column_name",
|
||||
refcol.column_name as "ref_column_name"
|
||||
from all_cons_columns refcol, all_cons_columns basecol, all_constraints ref, all_constraints fk
|
||||
where fk.constraint_type = 'R'
|
||||
where fk.OWNER = '$owner' AND fk.constraint_type = 'R'
|
||||
and ref.owner = fk.r_owner
|
||||
and ref.constraint_name = fk.r_constraint_name
|
||||
and basecol.owner = fk.owner
|
||||
|
||||
@@ -8,7 +8,7 @@ select i.table_name as "tableName",
|
||||
ic.column_position as "postion",
|
||||
ic.descend as "descending"
|
||||
from all_ind_columns ic, all_indexes i
|
||||
where ic.index_owner = i.owner
|
||||
where INDEX_OWNER = '$owner' AND ic.index_owner = i.owner
|
||||
and ic.index_name = i.index_name
|
||||
and i.index_name =OBJECT_ID_CONDITION
|
||||
order by i.table_owner,
|
||||
|
||||
@@ -4,6 +4,6 @@ SELECT owner "schema_name"
|
||||
, column_name "column_name"
|
||||
, data_type "data_type"
|
||||
FROM all_tab_columns av
|
||||
where table_name =OBJECT_ID_CONDITION
|
||||
where OWNER = '$owner' AND table_name =OBJECT_ID_CONDITION
|
||||
order by column_id
|
||||
`;
|
||||
|
||||
@@ -14,6 +14,6 @@ SELECT owner as schema_name,
|
||||
'//text()'
|
||||
)) definition
|
||||
FROM all_mviews
|
||||
where mview_name=OBJECT_ID_CONDITION
|
||||
where OWNER = '$owner' AND mview_name=OBJECT_ID_CONDITION
|
||||
order by owner, mview_name
|
||||
`;
|
||||
@@ -32,6 +32,7 @@ from (select
|
||||
all_procedures ap,
|
||||
all_objects ao
|
||||
where
|
||||
ap.owner = '$owner' and
|
||||
ap.owner = ao.owner and
|
||||
ap.object_name = ao.object_name and
|
||||
ao.object_type in ('PACKAGE', 'PROCEDURE', 'FUNCTION')
|
||||
|
||||
@@ -4,6 +4,6 @@ select
|
||||
table_name "pure_name"
|
||||
from
|
||||
all_tables
|
||||
where TABLE_NAME =OBJECT_ID_CONDITION
|
||||
where OWNER='$owner' AND TABLE_NAME =OBJECT_ID_CONDITION
|
||||
`;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports = `
|
||||
select constraint_name
|
||||
from all_constraints
|
||||
where constraint_type = 'U'
|
||||
where OWNER='$owner' and constraint_type = 'U'
|
||||
and constraint_name =OBJECT_ID_CONDITION
|
||||
`;
|
||||
|
||||
@@ -6,7 +6,7 @@ from (select
|
||||
owner as "schema_name",
|
||||
SUBSTR(text_vc, 1, 3900) AS "create_sql"
|
||||
from all_views av
|
||||
where text_vc is not null
|
||||
where owner = '$owner' and text_vc is not null
|
||||
) avv
|
||||
where "pure_name" =OBJECT_ID_CONDITION
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user