Sunteți pe pagina 1din 5

Execute a SQL Server 2000 DTS Package vs a SQL Server 2005 Integrati...

http://www.mssqltips.com/tip.asp?tip=1059

Today's Site Sponsor Try SQL Backup Pro for smaller, more robust backups: SQL Backup achieved almost 90% data compression! Andy Hughes, Senior SQL Server DBA.
COMMUNI TY TOOLS TUTORI ALS W EBCASTS W HI TEPAPERS SEARCH ABOUT US

join the MSSQLTips community


HOME TI PS MEDIA CENTER

Get Our Tips Newsletter We keep 56,000+ SQL Server professionals informed.

The industry standard database comparison and synchronization tool.

Execute a SQL Server 2000 DTS Package vs a SQL Server 2005 Integration Services Package SSIS
Written By: Edgewood Solutions Engineers -- 10/5/2006 -- read/post comments -- print -Rating: Rate Win FREE SQL Server Books from Apress

Idera - SQL comparison toolset Idera SQL comparison toolset is a set of products that perform object and data comparison, as well as synchronization. No need to purchase two separate productsget both in a single toolset! The tools are easy-to-use and can save hours of development time and make object and data comparison and synchronization quick and easy. Download now!

Problem With the many changes from SQL Server 2000 to 2005, the Extraction, Transform, and Load process in many respects has changed the most. Even the name changed from Data Transformation Services in SQL 2000 to SQL Server Integration Services in SQL 2005. Not only did the product change, but so did the method for executing packages. Solution In SQL Server 2000 and 2005 there are a number of ways to execute a package outside of Enterprise Manager and Query Analyzer: SQL Server 2000 1. DTSRUNUI Type dtsrunui from either a command prompt or Run dialog box, which opens the following GUI interface:

This interface gives you the option of executing a package from a SQL Server stored file (in msdb), a Meta Data Services file, or a Structured Storage File (*.dts stored in the File System). If you choose SQL Server or Meta Data Services as the source of the package and have a named instance, replace (local) with the <server_name>\<instance_name>. You can also obtain the DTS command-line statement by clicking on the "Advanced" button next to the package name:

More SQL Server Tools SQL secure SQL Compare SQL doctor SQL diagnostic manager SQL compliance manager

1 de 5

20/11/2010 14:34

Execute a SQL Server 2000 DTS Package vs a SQL Server 2005 Integrati...

http://www.mssqltips.com/tip.asp?tip=1059

Then click "Generate" on the bottom right of the window to generate the DTS command. This can then be used to execute the DTS package from a command line.

2. DTSRUN Type dtsrun from a Command Prompt (can be run from any command prompt without having to navigate to a particular folder). A series of switches are available: /S Server Name /U User Name /P Password /E <Use trusted connection instead of /U /P> /N Package Name /M Package Password /G Package GUID String /V Package Version GUID String /F Structured Storage UNC filename (overwritten if /S also specified) /R Repository Database Name <uses default if blank; loads package from repository database> Package operation (overrides stored Package settings): /A Global Variable Name:typeid=Value <may quote entire string (including name:typeid)> /L Log file name /W Write Completion Status to Windows Event Log <True or False> DTSRun action (default is to execute Package):

2 de 5

20/11/2010 14:34

Execute a SQL Server 2000 DTS Package vs a SQL Server 2005 Integrati...

http://www.mssqltips.com/tip.asp?tip=1059

/!X <Do not execute; retrieves Package to /F filename> /!D <Do not execute; drop package from SQL Server (cannot drop from Storage File)> /!Y <Do not execute; output encrypted command line> /!C <Copies command line to Windows clipboard (may be used with /!Y and /!X)

Here is what is seen in the command prompt window when running a package using DTSRUN

SQL Server 2005 In SQL Server 2005 the GUI and command-line options for package execution are still available, but the syntax and switches have changed somewhat.

1. DTSEXECUI Type dtexecui from either a command prompt or Run dialog box, which opens the Execute Package GUI interface:

Note that there are many more options in this GUI compared with the one for SQL 2000. If you wish to copy the command-line statement to use in dtexec, click on Command Line section:

3 de 5

20/11/2010 14:34

Execute a SQL Server 2000 DTS Package vs a SQL Server 2005 Integrati...

http://www.mssqltips.com/tip.asp?tip=1059

2. DTEXEC Use dtexec from the Command Prompt by typing in dtsexec (can be run from any command prompt with having to navigate to a particular folder). A series of switches are available (the following information was obtained by typing dtexec /? in the command prompt): /CheckF[ile] [Filespec] /Checkp[ointing] [{On | Off}] (On is the default) /Com[mandFile] Filespec /Conf[igFile] Filespec /Conn[ection] IDOrName;ConnectionString /Cons[oleLog] [[DispOpts];[{E | I};List]] DispOpts = any one or more of N, C, O, S, G, X, M, or T. List = {EventName | SrcName | SrcGuid}[;List] /De[crypt] Password /DT[S] PackagePath /F[ile] Filespec /H[elp] [Option] /L[ogger] ClassIDOrProgID;ConfigString /M[axConcurrent] ConcurrentExecutables /P[assword] Password /Rem[ark] [Text] /Rep[orting] Level[;EventGUIDOrName[;EventGUIDOrName[...]] Level = N or V or any one or more of E, W, I, C, D, or P. /Res[tart] [{Deny | Force | IfPossible}] (Force is the default) /Set PropertyPath;Value /Ser[ver] ServerInstance /SQ[L] PackagePath /Su[m] /U[ser] User name /Va[lidate] /VerifyB[uild] Major[;Minor[;Build]] /VerifyP[ackageid] PackageID /VerifyS[igned] /VerifyV[ersionid] VersionID /W[arnAsError]

Here is what you will see when you run dtexec:

4 de 5

20/11/2010 14:34

Execute a SQL Server 2000 DTS Package vs a SQL Server 2005 Integrati...

http://www.mssqltips.com/tip.asp?tip=1059

Next Steps Review your current method for executing DTS/SSIS packages Work with these two tools to gain a better understanding of the differences in GUI options and syntax for command-line execution Refer to SQL Server Books On Line for SQL Server 2000 and 2005 for additional information on these tools Review these other DTS and SSIS related tips SQL Server 2000's DTS Authentication Alternative = UDL Files SQL Server DTS command line utility SQL Server Crosswalk - Deploying a SQL 2000 DTS vs. a SQL 2005 SSIS package SQL Server 2000 to 2005 Crosswalk - Database Maintenance Plan Wizard to SQL Server Integration Services (SSIS) Readers Who Read This Tip Also Read SQL Server 2000 to SQL Server 2008 DTS Package Conversion Runtime Issue Capturing and Logging Data Load Errors for an SSIS Package Commonly made mistakes with SSIS Conditional Split Transform Using xp_cmdshell to run SSIS packages from within a SQL Server stored procedure Intelligent Conditional Split in an SSIS Package More... Free Live Webcast SQL Server Myths DebunkedOr Are They? Comment or Ask Questions About This Tip Discuss this tip, post comments and feedback

Sponsor Information Free SQL Server performance monitoring dashboard Idera SQL check Try Red Gate SQL Backup Pro for smaller, more robust SQL Server backups. Download a free trial now! SQL Server Issues? Not sure where to turn for answers? Innovative SQL DBA consultants In this free e-Book, get expert advice to ensure SQL Server quality, performance and availability. Follow MSSQLTips on Twitter! MSSQLTips is giving away a Kindle loaded with 5 SQL Server eBooks Free whitepaper - Managing Complex Database Changes

Copyright (c) 2006-2010 Edgewood Solutions, LLC All rights reserved privacy statement | disclaimer | copyright | advertise | write for mssqltips | feedback | about
Some names and products listed are the registered trademarks of their respective owners.

CareerQandA.com | MSSharePointTips.com | MSSQLTips.com

5 de 5

20/11/2010 14:34