Adding DTS ActiveX Scripts
New Information - SQL Server 2000 SP3.
Microsoft® ActiveX® scripts can be used to add functionality to Data Transformation Services (DTS) packages. Typical supported scripts are Microsoft Visual Basic® Scripting Edition (VBScript), Microsoft JScript®, PerlScript and XMLScript. The following DTS object types require or can use ActiveX scripts:
- The Step2 object can use an ActiveX script. The script runs before the step's task executes.
- The ActiveScriptTask object requires an ActiveX script that performs the functionality of the task.
- The DataPumpTransformScript and DTSTransformScriptProperties2 transformations require ActiveX scripts that perform the transformations.
Security Note Scripts can be the source of security vulnerabilities; they can invoke system functions without user knowledge or intervention and may contain security credentials in plain text. Review the script for security issues before use. For more information, see Security and Scripting.
You assign ActiveX scripts to a property of objects that use scripts as a single text string, which can include embedded carriage return/line feed pairs. Each scripted object also has properties for the script language and the script function name. For example:
- For the Step2 and ActiveScriptTask objects, the script text is assigned to the ActiveXScript property. The ScriptLanguage and FunctionName properties are used to specify the scripting language and function entry point.
- For the DataPumpTransformScript transformation, the script text is assigned to the Text property. The Language and FunctionEntry properties are used for the script language and function name, respectively.
The DTSTransformScriptProperties2 object extends the functionality of DataPumpTransformScript by providing multiple transformation phases. The script specified by the Text property must have a function for each supported phase.
The following table describes the property you use to specify the entry point for each phase the DTSTransformScriptProperties2 object supports.
|Phase||Entry Point Property|
Note To use Microsoft ActiveX scripting in Microsoft SQL Server 2000 after uninstalling SQL Server 7.0, you must re-register the ActiveX scripting library (Axscphst.dll). Use the Regsvr32.exe registration utility and execute the following command (substituting your own drive letter) from a command prompt or the Windows Run command:
regsvr32.exe C:\Program Files\Microsoft SQL Server\80\Tools\Binnaxscphst.dll
If the registration is successful, a message box appears indicating that Axscphst.dll is registered properly.
For more information about including ActiveX scripts in DTS programs, see DTS ActiveX Scripts in Visual Basic.