Посмотреть индексы в базе — различия между версиями
Материал из wiki.standart-n.ru
Aleksnick (обсуждение | вклад) (Новая страница: «Процедура <pre> SET TERM ^ ; create or alter procedure PR_GET_COUNT_TABLE_RECORDS returns ( TABLE_NAME DM_TEXT, NAME DM_TEXT, INACTIVE_STATU…») |
Aleksnick (обсуждение | вклад) |
||
Строка 3: | Строка 3: | ||
SET TERM ^ ; | SET TERM ^ ; | ||
− | create or alter procedure | + | create or alter procedure PR_GET_INDICES_LIST |
returns ( | returns ( | ||
TABLE_NAME DM_TEXT, | TABLE_NAME DM_TEXT, | ||
Строка 39: | Строка 39: | ||
/* Existing privileges on this procedure */ | /* Existing privileges on this procedure */ | ||
− | GRANT EXECUTE ON PROCEDURE | + | GRANT EXECUTE ON PROCEDURE PR_GET_INDICES_LIST TO SYSDBA; |
</pre> | </pre> |
Версия 17:53, 18 мая 2016
Процедура
SET TERM ^ ; create or alter procedure PR_GET_INDICES_LIST returns ( TABLE_NAME DM_TEXT, NAME DM_TEXT, INACTIVE_STATUS DM_ID_NULL) as begin for select R.RDB$RELATION_NAME from RDB$RELATIONS R where 1 = 1 and R.RDB$RELATION_NAME not starting with 'VW_' and R.RDB$RELATION_NAME not starting with 'RDB$' and R.RDB$RELATION_NAME not starting with 'MON$' order by R.RDB$RELATION_NAME asc into :table_name do begin for select I.RDB$INDEX_NAME, I.RDB$INDEX_INACTIVE from RDB$INDICES I where 1 = 1 and I.RDB$RELATION_NAME = :table_name order by I.RDB$INDEX_NAME asc into :NAME, :inactive_status do suspend; end end^ SET TERM ; ^ /* Existing privileges on this procedure */ GRANT EXECUTE ON PROCEDURE PR_GET_INDICES_LIST TO SYSDBA;