Stored Procedure Accelerator Guide for Microsoft SQL Server

Stored Procedure Accelerator Guide for Microsoft SQL Server

Creating the Cleanup Procedure

Creating the Cleanup Procedure

Create the CLEANUP_TEMP_OBJECTS procedure.
  1. Open the following file in a text editor such as Notepad:
    <Dynamic Data Masking installation>\Accelerators\StoredProcedureMasking\sql\SQLServer\CLEANUP_TEMP_OBJECTS_TEMPLATE.sql
  2. Edit the following attributes in the CLEANUP_TEMP_OBJECTS_TEMPLATE.sql file:
    DDM_Database_name
    The name of the database in the user environment in which you want to create the stored procedure.
    ddmadmin_schema
    The name of the schema in the user environment in which you want to create the stored procedure.
  3. Log in to the database as an administrator.
  4. Run the edited CLEANUP_TEMP_OBJECTS_TEMPLATE.sql file to create the CLEANUP_TEMP_OBJECTS procedure.
After you create the cleanup procedure, you can schedule a job to run the procedure. If you want to run the procedure manually, you must grant the user that runs the procedure the required permissions. You must map the user to the TEMPDB database and grant the ALTER dbo schema privilege. Grant the user the following permissions:
use tempdb go CREATE USER <user name> FOR LOGIN <user name> WITH DEFAULT_SCHEMA=dbo go GRANT ALTER ON Schema :: dbo to <user name> go

0 COMMENTS

We’d like to hear from you!