Посмотреть индексы в базе
Материал из wiki.standart-n.ru
Процедура
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$UNIQUE_FLAG,
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,
:UNIQUE_STATUS,
:INACTIVE_STATUS
do
suspend;
end
end^
SET TERM ; ^
/* Existing privileges on this procedure */
GRANT EXECUTE ON PROCEDURE PR_GET_INDICES_LIST TO SYSDBA;