in

Pragmatic Works

Enabling your business intelligence enterprise.

DTS xChange Help

  • DTS xChange Rules: NULL Handling

    Coming in version 1.6.

  • DTS xChange Rules: Logging to SQL Sever

    DTS xChange has a series of enterprise-ready rules to help you migrate your DTS packages to SSIS quickly and easily. After you select the packages that you wish to migrate, you then specify the rules on the Specify Rules screen in the wizard.  

    Package logging is turned off by default in SSIS. By checking this option, you can log to a database table, which will be called sysdtslogs90 or sysdtslogs100 (based on your version of SQL Server). Every time a task, container or package start, stops, or has an error or warning, a line will be written to this file. Alternatively, you can log to a text file or enable the advanced logging through event handlers.

     

    Logging to SQL Server Options

    After enabling the rule, you will need to specify where you want the log table and stored procedures to be located. A connection manager will be created in each of the converted packages that will point to this database.

     

    • Select Event(s) you want to log - Check the events that you wish to log to the log file. It is recommended that you do the OnPreExecute, OnPostExecute, OnError and OnWarning. These first two will log anytime a package, container or task starts and finishes.

     

  • DTS xChange Rules: Logging to Text

    DTS xChange has a series of enterprise-ready rules to help you migrate your DTS packages to SSIS quickly and easily. After you select the packages that you wish to migrate, you then specify the rules on the Specify Rules screen in the wizard.  

    Package logging is turned off by default in SSIS. By checking this option, you can log to a text file which will be stamped with the package name, date and time. Every time a task, container or package start, stops, or has an error or warning, a line will be written to this file.Alternatively, you can also log to a SQL Server table.

    Logging to Text Options

    After enabling this option, you will need tp specify where you wish the log files to be written to and what types of events you wish to log.

     

    • Select Log File Path - The path where the log files will be written. The log files will be named PackageName<Date>.Log.
    • Select Event(s) you want to log - Check the events that you wish to log to the log file. It is recommended that you do the OnPreExecute, OnPostExecute, OnError and OnWarning. These first two will log anytime a package, container or task starts and finishes.
  • DTS xChange Rules: Wrap the Package in Transaction

    DTS xChange has a series of enterprise-ready rules to help you migrate your DTS packages to SSIS quickly and easily. After you select the packages that you wish to migrate, you then specify the rules on the Specify Rules screen in the wizard.   

    By enabling this rule, all converted packages will be wrapped in a MSDTC transaction. Wrapping a package in a transaction ensures that data events are protected by a transaction. If a data problem occurs all actions that have occurred in the data are rolled back. Enabling this feature will require that the Microsoft Distributed Transaction Coordinator (MSDTC) service is enabled on each server participating in the package.

    Transaction Options

    By enabling this rule, you can then specify what type of transactions you wish to use. The default option is Serializable, which is one of the most protective option. Other options are:

    • ReadUncommitted - Allows reading of uncommitted data by another process in the same transaction.
    • ReadCommitted - A protective setting which allows the process to only view another processes' data once it's committed.
    • Snapshot - A SQL Server 2005 feature that allows you to take a snapshot of the data and changes are tracked in the tempdb.
    • Serializable - The default option and the most restrictive. An update lock is placed on the data and is not released until the transaction commits.
    • Chaos - The least resetrictive of the settings. Similar to the ReadUncommitted setting but does not hold an update lock on the data.
    • RepeatableRead - Locks data being read by the transaction until the transaction is committed.
       
  • DTS xChange Rules: Add Checkpoints

    DTS xChange has a series of enterprise-ready rules to help you migrate your DTS packages to SSIS quickly and easily. After you select the packages that you wish to migrate, you then specify the rules on the Specify Rules screen in the wizard.  

    By enabling this option, your packages will be have the checkpoint feature turned on each package. If a package fails, checkpoints will enable you to start where the package failed. The checkpoint file will be written to the folder you specify above and be called <PackageName>.chk.

    Add Checkpoints Options

    • Select Path - The path where the checkpoint files will be located.
  • DTS xChange Rules: Consolidate Connection Managers

    DTS xChange has a series of enterprise-ready rules to help you migrate your DTS packages to SSIS quickly and easily. After you select the packages that you wish to migrate, you then specify the rules on the Specify Rules screen in the wizard.

    By enabling this rule, duplicate connections will be consolidated into a single connection manager. If two connections in DTS contain the same information (server name, database name and user information) and they’re not being set dynamically through a Dynamic Properties Task, then they will be consolidated into a single connection manager with the name of the first connection.

  • DTS xChange Rules: Event Handler Logging

    DTS xChange has a series of enterprise-ready rules to help you migrate your DTS packages to SSIS quickly and easily. After you select the packages that you wish to migrate, you then specify the rules on the Specify Rules screen in the wizard.

    The Event Handler Logging rule enables logging into a descriptive table through event handlers for all of your packages. The enterprise logging database (SSISODS) creates a central database for your SSIS packages to log. It provides a much more robust logging interface than the default logs and is done through event handlers. After you select the database you wish to log to, the SSISEntperiseLog table will be created in the database (if it doesn’t exist). After your packages log to this table, you are also provided a data warehouse to move these log records to for trending and an Analysis Services cube for fast access.

    Event Handler Logging Options

    The Event Handler Logging rule tab configures where the logging table and stored procedure will be written.

    • Server - The server name where your SSIS packages will log to
    • Database - The database name where the log files and stored procedures will be created. If the table is already there, the Log Table text box will populate. If not, click the Create Log Table button to create the table.
  • DTS xChange Rules: Convert Child DTS Packages to SSIS Packages

    DTS xChange has a series of enterprise-ready rules to help you migrate your DTS packages to SSIS quickly and easily. After you select the packages that you wish to migrate, you then specify the rules on the Specify Rules screen in the wizard.  

    If this rule is enabled, DTS xChange determines if you have Execute Package Task inside a DTS package, and automatically converts the children packages to SSIS as well and stores them in the location of your choice. The Execute Package Task will be converted to its SSIS equivalent. By not enabling this feature, we will keep the package as a DTS package and convert the Execute Package Task to an Execute DTS 2000 Package Task.

    Convert Child Packages Options

    The rule tab configures where to output the children packages once they are migrated.

    • Default - outputs the children packages to the same location as the parent packages.
      • Server - The SQL Server that contains the msdb database where you want to store the packages
      • Packages Path - The folder in the package store where the packages will be stored.
    • Store SSIS Packages on SQL Server - Outputs the children packages to a specific SQL Server.
    • Store SSIS Packages on File System - Outputs the children packages to a specific folder.
      • File location - The location where the packages will be stored.
  • Converting the ActiveX Script Task

    One of the most difficult tasks to convert in DTS to SSIS is the ActiveX Script Task. DTS xChange converts this to a similar task inside of SSIS, the ActiveX Script Task but the task may not work. DTS xChange can also profile your packages to determine what types of obejcts you're using to see how much of an effort there will be with the conversion and help you do a project plan.

    The main reason that the task may not work is that you may be referencing the DTS object model in the script. After the conversion, you will want to review each of the ActiveX Script Tasks in SSIS to ensure that you're not using the old DTS object model. ActiveX Script tasks that try to access the package object model by using the Parent property of the GlobalVariables collection will fail after package migration. The former functionality must be replaced by using different script code or new SQL Server 2005 features.The code snippet to look for will look like the following:

    DTSGlobalVariables("StartDate").value = "NewValue"

    This would read the DTS global variable called StartDate. You would want to convert this same functionality to a Script Task or an Expression on the variable. To do a Script Task in SSIS, simply use the following this code snippet to replace the functionality:

    DTS.Variables("StartDate").value = "NewValue"

    One of the most common objects that will work in SSIS is the FileSystemObject (shown below). This object will reference the Windows file system for copying files, renaming files or reading properties of the files among other things. The following snippet will show you how to look for in the ActiveX Script Task to indiicate that you are using this function:

    CreateObject("Scripting.FileSystemObject")

    This functionality can easily be replaced by using a File System Task typically or a ForEach Loop Container with a ForEach File Enumerator. After replacing the code with one of those two tasks, the ActiveX script can be removed potentially. 

    The last common one that we see often is when a developer references a data connection in the ActiveX Script task as shown below:

    CreateObject("ADODB.Connection")

    This is done to typically run a query that can be done easily with an Execute SQL Task. Doing this inside an ActiveX Script Task is never a best practice and should be removed and replaced with either a Data Flow or Execute SQL Task.

More Posts
Copyright Pragmatic Works
Powered by Community Server (Non-Commercial Edition), by Telligent Systems