Stored Procedure Accelerator Guide for Sybase

Stored Procedure Accelerator Guide for Sybase

Create the Cleanup Task on Windows

Create the Cleanup Task on Windows

Use the Windows Task Scheduler to create the cleanup task on Windows.
To use the cleanup script on Windows, you must have the Sybase isql command line tool installed on the machine where you run the batch file. The batch file uses the isql command line tool to run the cleanup script.
  1. In the Windows Control Panel, open the
    Schedule tasks
    administrative tool. To find the
    Schedule tasks
    option, you can search for
    task
    in the search bar.
    The following image shows the
    Schedule tasks
    administrative tool:
    The Schedule Tasks option is under the Administrative Tools heading.
  2. In the
    Task Scheduler
    window, click
    Create Task
    in the right pane.
    The following image shows the location of the
    Create Task
    option:
    The Create Task option is in the left pane of the Task Scheduler window, under the Actions heading.
    The
    Create Task
    window opens.
  3. In the General tab of the
    Create Task
    window, edit the following parameters:
    Name
    The name of the task. For example, you might enter DDMSybaseSPACleanupTask.
    Run whether user is logged on or not
    Enable the
    Run whether user is logged on or not
    option.
    The following image shows the General tab properties:
    The task name is DDMSybaseSPACleanupTask and the "Run whether user is logged on or not" option is selected.
  4. In the
    Create Task
    window, open the Triggers tab.
  5. Click
    New
    to add a new trigger.
    The
    New Trigger
    window opens.
  6. In the
    New Trigger
    window, edit the following properties based on your requirements:
    Begin the task
    Select an option. For example, you might select
    At startup
    .
    Repeat task every
    Select an option. For example, you might select
    5 minutes
    .
    for a duration of
    Select an option. For example, you might select
    Indefinitely
    .
    The following image shows the
    New Trigger
    window properties:
    The "Begin the task" parameter is "At startup." The "Repeat task every" parameter is "5 minutes." The "for a duration of" parameter is "Indefinitely."
  7. Click
    OK
    to close the window and add the trigger to the triggers list.
  8. In the
    Create Task
    window, open the Actions tab.
  9. Click
    New
    to add a new action.
    The
    New Action
    window opens.
  10. In the
    New Action
    window, edit the following properties based on your requirements:
    Action
    Select
    Start a program
    .
    Program/script
    Click
    Browse
    and navigate to the directory that contains the CLEANUP_TEMP_OBJECTS.bat file. You can find the file in the following location:
    <Dynamic Data Masking installation>\Accelerators\StoredProcedureMasking\sql\Sybase\CLEANUP_TEMP_OBJECTS.bat
    Add arguments
    Add the following arguments separated by a space:
    • CREATED_BEFORE_SECONDS. Objects that have a creation time that is before the value of the created_before_seconds attribute are considered for deletion. Specify the time in seconds.
    • DATABASE_NAME. The name of the database where Dynamic Data Masking creates the temporary tables.
    • SCHEMA_NAME. The name of the schema where Dynamic Data Masking creates the temporary tables.
    • DATABASE_SERVER_HOST. The host name of the Sybase database server where Dynamic Data Masking creates the temporary tables and stored procedures.
    • DATABASE_USERNAME. The user name of the Sybase database user that Dynamic Data Masking uses to create the temporary tables and stored procedures.
    • DATABASE_PASSWORD. The password of the Sybase database user that Dynamic Data Masking uses to create the temporary tables and stored procedures.
    For example, you might enter the following text:
    10 tempdb dbo SYBASESERVER ddmadmin infa@123
    Start in
    Enter the file path of a directory in which the user has permissions to create, delete, and modify a file. Informatica recommends that you enter the file path of the directory that contains the CLEANUP_TEMP_OBJECTS.bat file.
    For example, you might enter the following file path:
    <Dynamic Data Masking installation>\Accelerators\StoredProcedureMasking\sql\Sybase
    The following image shows the
    New Action
    window properties:
    The New Action window has Action, Program/script, Add arguments, and Start in options.
  11. Click
    OK
    to close the window and add the action to the actions list.
  12. In the
    Create Task
    window, open the Settings tab.
  13. In the Settings tab, edit the following properties based on your requirements:
    Run task as soon as possible after a scheduled start is missed
    For example, you might enable the option.
    Stop the task if it runs longer than
    For example, you might disable the option.
    If the task is already running, then the following rule applies
    Select
    Do not start a new instance
    .
    The following image shows the Settings properties:
    "Run task as soon as possible after a scheudled start is missed" is selected. "Stop the task if it runs longer than" is unselected. "If the task is already running, then the following rule applies" is set to "Do not start a new instance."
  14. Click
    OK
    .
    The
    Task Scheduler
    confirmation window opens.
  15. Click
    Yes
    in the
    Task Scheduler
    confirmation window.
    The task is created successfully.

0 COMMENTS

We’d like to hear from you!