Contents Diagrams Roles Schemas Tables Views Procedures Functions

Change Tracking Framework
for Microsoft SQL Server

Procedures

ProcedureDescription
logs.usp_translationsThis procedure is an Excel form to select and edit translations in all languages.
logs.usp_translations_changeThis procedure updates a database on cell changes of logs.usp_translations.
logs.xl_actions_clear_logsThis procedure clears change tracking records of the specified target table.
logs.xl_actions_create_change_tracking_triggersThis procedure creates change tracking triggers of the specified target table.
logs.xl_actions_drop_all_change_tracking_triggersThis procedure drops all change tracking triggers and clears all logs.
logs.xl_actions_drop_change_tracking_triggersThis procedure drops change tracking triggers of the specified target table.
logs.xl_actions_restore_current_recordThis procedure restores the current version of the changelog record.
logs.xl_actions_restore_previous_recordThis procedure restores the previous version of the changelog record.
logs.xl_actions_restore_recordThis procedure restores a row from the changelog record.
logs.xl_actions_select_lookup_idThis procedure selects rows from tables referenced by foreign keys.
logs.xl_actions_select_recordThis procedure selects change details of a changelog record.
logs.xl_actions_select_recordsThis procedure selects changelog records.
logs.xl_actions_set_role_permissionsThis procedure sets permissions for the log_administrators and log_users roles.
logs.xl_export_settingsThis procedure exports Change Tracking Framework settings.
logs.xl_import_handlersThis procedure imports Change Tracking Framework settings into logs.handlers.

logs.usp_translations

This procedure is an Excel form to select and edit translations in all languages.

ParameterDataTypeModeComment
@fieldnvarchar(128)INThe source field of the logs.translations table: TRANSLATED_NAME, TRANSLATED_DESC, or TRANSLATED_COMMENT.

Editing data requires the SaveToDB Enterprise edition.

logs.usp_translations_change

This procedure updates a database on cell changes of logs.usp_translations.

ParameterDataTypeModeComment
@column_namenvarchar(128)INThe column name of the edited cell (expected logs.translations.LANGUAGE_NAME).
@cell_valuenvarchar(max)INA new value of the edited cell used to update for the source field.
@TABLE_SCHEMAnvarchar(128)INlogs.translations.TABLE_SCHEMA
@TABLE_NAMEnvarchar(128)INlogs.translations.TABLE_NAME
@COLUMNnvarchar(128)INlogs.translations.COLUMN_NAME
@fieldnvarchar(128)INThe source field of the xls.translations table: TRANSLATED_NAME, TRANSLATED_DESC, or TRANSLATED_COMMENT.

logs.xl_actions_clear_logs

This procedure clears change tracking records of the specified target table.

ParameterDataTypeModeComment
@schemanvarchar(128)INTarget table schema
@namenvarchar(128)INTarget table name
@confirmbitIN1 - Clear logs
0 - Cancel
@data_languagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.

A user must also have the UPDATE permission on the target table.

You may run it from the context menu of the logs.view_objects view.

See Creating Change Tracking Triggers.

logs.xl_actions_create_change_tracking_triggers

This procedure creates change tracking triggers of the specified target table.

ParameterDataTypeModeComment
@schemanvarchar(128)INTarget table schema
@namenvarchar(128)INTarget table name
@execute_scriptbitIN1 - Execute scripts to create triggers
@data_languagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.

A user must also have the ALTER permission on the target table.

You may run it from the context menu of the logs.view_objects view.

See Creating Change Tracking Triggers and Triggers.

logs.xl_actions_drop_all_change_tracking_triggers

This procedure drops all change tracking triggers and clears all logs.

ParameterDataTypeModeComment
@schemanvarchar(max)INTarget schema to drop all change tracking triggers or NULL to drop in all schemas
@execute_scriptbitIN1 - Execute scripts to drop triggers

A user must also have the ALTER permission on altered tables.

You may run it from the Actions menu of the logs.view_objects view.

See Useful Operations.

logs.xl_actions_drop_change_tracking_triggers

This procedure drops change tracking triggers of the specified target table.

ParameterDataTypeModeComment
@schemanvarchar(128)INTarget table schema
@namenvarchar(128)INTarget table name
@execute_scriptbitIN1 - Execute scripts to drop triggers
@data_languagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.

A user must also have the ALTER permission on the target table.

You may run it from the context menu of the logs.view_objects view.

See Creating Change Tracking Triggers.

logs.xl_actions_restore_current_record

This procedure restores the current version of the changelog record.

ParameterDataTypeModeComment
@change_idintINChange record ID
@confirmbitIN1 - Restore the record
0 - Print SQL to restore the record

See Restoring Records.

The procedure executes the logs.usp_restore_record procedure with the predefined parameter.

logs.xl_actions_restore_previous_record

This procedure restores the previous version of the changelog record.

ParameterDataTypeModeComment
@change_idintINChange record ID
@confirmbitIN1 - Restore the record
0 - Print SQL to restore the record

See Restoring Records.

The procedure executes the logs.usp_restore_record procedure with the predefined parameter.

logs.xl_actions_restore_record

This procedure restores a row from the changelog record.

ParameterDataTypeModeComment
@change_idintINChange record ID
@restore_previousbitIN1 - Restore the previous record
0 - Restore the current record
@confirmbitIN1 - Restore the record
0 - Print SQL to restore the record
@data_languagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.

A user must have the UPDATE permission on the captured table.

logs.xl_actions_select_lookup_id

This procedure selects rows from tables referenced by foreign keys.

ParameterDataTypeModeComment
@change_idintINChange record ID
@column_namenvarchar(128)INThe column name of the active cell
@namenvarchar(128)INThe name column value
@data_languagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.

See ID Lookup.

A user must have the SELECT permission on the captured and referenced tables.

logs.xl_actions_select_record

This procedure selects change details of a changelog record.

ParameterDataTypeModeComment
@change_idintINChange record ID
@data_languagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.

See Task Panes.

A user must have the SELECT permission on the captured table.

logs.xl_actions_select_records

This procedure selects changelog records.

ParameterDataTypeModeComment
@schemanvarchar(128)INTarget table schema
@namenvarchar(128)INTarget table name
@idintINThe value of the identity column if exists
@keysnvarchar(445)INThe string value of the key columns
@change_typetinyintINNULL - all changes
1 - INSERT
2 - DELETE
3 - UPDATE
@data_languagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.

Generated procedures like dbo25.xl_log_members execute this procedure to select changes.

See Creating Change Tracking Triggers and Task Panes.

A user must have the SELECT permission on the captured table.

logs.xl_actions_set_role_permissions

This procedure sets permissions for the log_administrators and log_users roles.

See Administrator Permissions and See User Permissions.

logs.xl_export_settings

This procedure exports Change Tracking Framework settings.

ParameterDataTypeModeComment
@parttinyintINNULL - all
2 - logs.handlers
3 - logs.translations
4 - logs.formats
5 - logs.workbooks
6 - create triggers
7 - logs.base_tables
@sort_by_namesbitIN1 - sort by names
0 - sort by id (default)
@schemanvarchar(128)INTarget schema to export settings or NULL to export all settings.

Use 'x' to export help for all schemas except doc, logs, and xls.
@languagechar(2)INlogs.translations.LANGUAGE_NAME

Use the 'x' value for the schema to export your database settings only, skipping the framework settings.

logs.xl_import_handlers

This procedure imports Change Tracking Framework settings into logs.handlers.

ParameterDataTypeModeComment
@TABLE_SCHEMAnvarchar(20)INlogs.handlers.TABLE_SCHEMA
@TABLE_NAMEnvarchar(128)INlogs.handlers.TABLE_NAME
@COLUMN_NAMEnvarchar(128)INlogs.handlers.COLUMN_NAME
@EVENT_NAMEvarchar(25)INlogs.handlers.EVENT_NAME
@HANDLER_SCHEMAnvarchar(20)INlogs.handlers.HANDLER_SCHEMA
@HANDLER_NAMEnvarchar(128)INlogs.handlers.HANDLER_NAME
@HANDLER_TYPEnvarchar(25)INlogs.handlers.HANDLER_TYPE
@HANDLER_CODEnvarchar(max)INlogs.handlers.HANDLER_CODE
@TARGET_WORKSHEETnvarchar(128)INlogs.handlers.TARGET_WORKSHEET
@MENU_ORDERintINlogs.handlers.MENU_ORDER
@EDIT_PARAMETERSbitINlogs.handlers.EDIT_PARAMETERS

The procedure is used in the scripts generated by the logs.xl_export_settings procedure.

The procedure tries to update the record first. If the update fails, it inserts a new record.

Contents

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.