Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.TextIndexesReBuild ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Description ===== Forces the rebuilding of all manual and auto refresh text indexes ===== Original SQL ===== <code sql> create procedure "pears"."TextIndexesReBuild"() begin for "IndexLoop" as "IndexCursor" no scroll cursor for select "user_name","index_name","table_name","refresh_type" from "SYS"."SYSIDX" as "i" join "sys"."SYSTEXTIDX" as "e" on "e"."index_id" = "i"."object_id" and "e"."sequence" = 1 join "sys"."SYSTAB" as "t" on "t"."table_id" = "i"."table_id" join "sys"."SYSTEXTCONFIG" as "f" on "f"."object_id" = "e"."text_config" join "sys"."SYSUSER" as "u" on "u"."user_id" = "t"."creator" where "refresh_type" in( 1,2 ) for read only do execute immediate("string"('refresh text index [',"index_name",'] on [',"user_name",'].[',"table_name",'] force build')) end for end go COMMENT ON PROCEDURE "pears"."TextIndexesReBuild" IS 'Forces the rebuilding of all manual and auto refresh text indexes' go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."TextIndexesReBuild" IS {create procedure TextIndexesReBuild /* Application Maintained Function / Procedure - DO NOT EDIT*/ () BEGIN for IndexLoop as IndexCursor no scroll cursor for select user_name, index_name, table_name, refresh_type from SYS.SYSIDX as i join sys.SYSTEXTIDX as e on e.index_id = i.object_id and e.[sequence] = 1 join sys.SYSTAB as t on t.table_id = i.table_id join sys.SYSTEXTCONFIG as f on f.object_id = e.text_config join sys.SYSUSER as u on u.user_id = t.creator where refresh_type in (1,2) for read only do execute immediate (string('refresh text index [', index_name, '] on [', user_name, '].[', table_name, '] force build')); end for END } </code> database/procedures/pears_textindexesrebuild.txt Last modified: 2026/08/07 19:24by 127.0.0.1