Article ID: 252987 - Last Review: June 29, 2004 - Revision: 3.3 INF: Execute a SQL Server DTS Package from Active Server PagesThis article was previously published under Q252987 SUMMARY The SQL Server Data Transformation Services (DTS) packages
may need to be executed from remote locations. Using Active Server Pages (ASP),
you can execute from remote locations over the intranet or Internet, because
ASP is an automation client for the Component Object Model (COM) components and
can be executed from the browser. MORE INFORMATION To execute a DTS package from ASP code, create an instance
of a DTS package object and call the appropriate load method. To execute a
local server package, you can use the LoadFromSQLServer method; for example: Using Integrated Windows NT AuthenticationYou can use the integrated Windows NT authentication feature in SQL Server to access the DTS package. To do this, follow these steps:
Possible Permissions IssuesWhen you execute a DTS Package from an ASP page, the package executes in the security context of the Web site visitor, which may be that of the Windows user (if the web site is configured for Basic or NT Authentication) or of the Anonymous account. The package does not execute in the security context of the user ID supplied to load the package from SQL Server. Therefore, it is important to make sure that the account executing the package has appropriate Windows permissions to all resources that the package may use--such as disk files, DLLs, or other drivers (for import/export operations)--especially when the Web site is configured for Anonymous access. If a package works in the DTS designer and works from other client applications, but fails from Web applications, troubleshooting should begin with permissions issues.For additional information about determining which Windows account will be used to execute the DTS package, click the article number below to view the article in the Microsoft Knowledge Base: 269074
(http://support.microsoft.com/kb/269074/EN-US/
)
INF: How to Run a DTS Package as a Scheduled Job
Using DTS EventsIt is not possible to use the events of the DTS package object in the ASP code because noncompiled ASP code does not support events. If you need to use the DTS events, create a compiled ASP component in Microsoft Visual Basic or Microsoft Visual C++, and then invoke the object from an ASP page. The DLL can then be called from the ASP script. This approach also has the advantage of giving access to the GetExecutionErrorInfo method, which is not available in a scripting environment because it uses "by reference" arguments of types other than variant.REFERENCESFor additional information on IIS authentication methods, see the following Microsoft Developer Network (MSDN) Web site:http://msdn.microsoft.com/en-us/library/ms955939.aspx
(http://msdn.microsoft.com/en-us/library/ms955939.aspx)
For additional information, click the article number below to view the article in the Microsoft Knowledge Base: 240221
(http://support.microsoft.com/kb/240221/EN-US/
)
INF: How To Handle Errors in DTS Package and Step Objects
| Article Translations
|
Back to the top
