Change Tracking Framework Views

Change Tracking Framework Views

ViewDescription
logs.view_administrator_handlersThis view selects the handler configuration for the Actions menu.
logs.view_captured_objectsThis view selects database objects and related change tracking framework information.
logs.view_query_listThis view selects framework objects for the SaveToDB Connection Wizard and SaveToDB Query List.
logs.view_translationsThis view selects the translation configuration for the SaveToDB add-in.
logs.view_user_handlersThis view selects the handler configuration for the context menu.

logs.view_administrator_handlers

This view selects the handler configuration for the Actions menu.

ColumnDataTypeComment
TABLE_SCHEMAnvarchar(128)INFORMATION_SCHEMA.TABLES.TABLE_SCHEMA
TABLE_NAMEnvarchar(128)INFORMATION_SCHEMA.TABLES.TABLE_NAME
COLUMN_NAMEnvarchar(128)NULL
EVENT_NAMEvarchar(7)Actions
HANDLER_SCHEMAvarchar(4)logs
HANDLER_NAMEvarchar(31)Handler object name:
- Create Change Tracking Triggers
- Drop Change Tracking Triggers
HANDLER_TYPEvarchar(13)CODE or MENUSEPARATOR
HANDLER_CODEnvarchar(max)SQL code of the handler object
TARGET_WORKSHEETnvarchar(128)NULL
MENU_ORDERintHandler order in the context menu (190, 191, 192)
EDIT_PARAMETERSbit1 - Always show the Edit Parameters dialog box

This view generates the event handler configuration for every table and adds the following items to the Actions menu:
- Create Change Tracking Triggers
- Drop Change Tracking Triggers

Use DENY SELECT on this view to disable the feature.

logs.view_captured_objects

This view selects database objects and related change tracking framework information.

ColumnDataTypeComment
object_idintsys.objects.object_id
schemanvarchar(128)sys.schemas.name
namenvarchar(128)sys.objects.name
insert_triggernvarchar(128)sys.triggers.name with the 'trigger_<name>_log_insert' name
update_triggernvarchar(128)sys.triggers.name with the 'trigger_<name>_log_update' name
delete_triggernvarchar(128)sys.triggers.name with the 'trigger_<name>_log_delete' name
select_handlernvarchar(128)sys.procedures.name with the 'xl_log_<schema>.<name>' name
has_log_triggersint1 - has triggers
0 - has no triggers

Use this view to configure and check change tracking triggers.

Here is an example of the Excel form:

Context Menu for Configuring Change Tracking

logs.view_query_list

This view selects framework objects for the SaveToDB Connection Wizard and SaveToDB Query List.

ColumnDataTypeComment
TABLE_SCHEMAnvarchar(128)sys.schemas.name
TABLE_NAMEnvarchar(128)sys.objects.name
TABLE_TYPEnvarchar(60)sys.objects.type
TABLE_CODEnvarchar(max)NULL
INSERT_PROCEDUREnvarchar(max)NULL
UPDATE_PROCEDUREnvarchar(max)NULL
DELETE_PROCEDUREnvarchar(max)NULL
PROCEDURE_TYPEnvarchar(50)NULL

The view selects framework objects used to connect in Excel, logs.base_tables and logs.view_objects.

See also Configuring Query Lists.

logs.view_translations

This view selects the translation configuration for the SaveToDB add-in.

Source tables: logs.handlers, logs.translations

ColumnDataTypeComment
TABLE_SCHEMAnvarchar(20)logs.handlers.HANDLER_SCHEMA
TABLE_NAMEnvarchar(128)logs.handlers.HANDLER_NAME
COLUMN_NAMEnvarchar(128)logs.handlers.COLUMN_NAME
LANGUAGE_NAMEchar(2)logs.translations.LANGUAGE_NAME
TRANSLATED_NAMEnvarchar(128)logs.translations.TRANSLATED_NAME
TRANSLATED_DESCnvarchar(255)logs.translations.TRANSLATED_DESC
TRANSLATED_COMMENTnvarchar(4000)logs.translations.TRANSLATED_COMMENT

This view generates the translation of the logs.view_handlers handlers for the SaveToDB add-in.

See also Configuring Data Translation.

logs.view_user_handlers

This view selects the handler configuration for the context menu.

Source tables: logs.base_tables, logs.handlers

ColumnDataTypeComment
TABLE_SCHEMAnvarchar(128)Configured object schema
TABLE_NAMEnvarchar(128)Configured object name
COLUMN_NAMEnvarchar(128)Column or parameter name of the configured object
EVENT_NAMEvarchar(25)ContextMenu or SelectionChange
HANDLER_SCHEMAnvarchar(30)Handler object schema
HANDLER_NAMEnvarchar(128)Handler object name
HANDLER_TYPEnvarchar(25)Handler object type
HANDLER_CODEnvarchar(max)SQL code of the handler object
TARGET_WORKSHEETnvarchar(128)Handler output target
MENU_ORDERintHandler order in the context menu (20, 21, 30, 31, 32, 100, 110, 111, 112, 113, 114)
EDIT_PARAMETERSbit1 - Always show the Edit Parameters dialog box
0 - Always suppress the Edit parameters dialog box
NULL - show Edit Parameteres for the Actions menu and suppress for the context menu

This view generates the event handler configuration for captured tables and derived objects configured in the logs.base_tables table.

Such handlers allow using the context menu to check and revert changes.

See also Configuring Event Handlers.