0 Replies Latest reply: Apr 30, 2011 12:09 PM by Gary1 RSS

    Converting DTSRUN to DTEXEC with SQL Serv 2008 R2?

    Gary1 Community Member

      Not a "direct" CF question, but just upgraded WinXP to Win 7-64bit, SQL Server 2000 to SQL 2008 R2 and CF7 to CF9.  I have about 10 .csv files that are imported daily to a SQL Server 2000 database using DTSRUN, called from within 10 "batch" files. 

       

      I'm re-writing the old DTS programs to use SQL Server 2008 R2's BIDS/SSIS format.  Am creating .DTSX packages that are runing successfully from within BIDS.  But need to be able to run them from command line, in a batch/production process, as I was doing with the SQL Server 2000 programs.

       

      Below is an example of a working SQL Server 2000 batch file, that uses DTSRUN.  For something like this to work with SQL Server 2008 (64-bit), does anyone know what would need to be changed, besides the DTSRUN to DTEXEC?   I read where, on 64-bit, you need to call DTEXEC from the full path, to ensure it calls the 64-bit version of DTEXEC.  Aside from that, anything else need to be changed for this to work in SQL 2008?

       

      IF EXIST c:\updates\empnames.txt GOTO RUNIMP

      GOTO END

      :RUNIMP

      setlocal

      set Server=MYSERVER
      set UserID=MyUserID
      set DataFile=c:\updates\empnames.txt
      set Package=ImportEmployeeNames

      ECHO.
      ECHO.
      ECHO Importing Data....
      dtsrun /S%Server% /U%UserID% /E /N%Package%

      ECHO Deleting Data File....
      DEL %DataFile%

      GOTO END

      :END
      CLS
      popd
      endlocal
      @ECHO OFF
      EXIT

       

      Thanks for any help/advice.  Much appreciated.

       

      Gary