Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to run DTSRUN or call a DTS package from another PC?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00926329
Message ID:
00926755
Vues:
525
This message has been marked as the solution to the initial question of the thread.
Luis,

DTSRUN will only execute on the pc if the SQL Client tools is installed. A better approach is to have the SQL server execute the DTS package. That way the procedure is portable regardless of the pc. You need to make sure that whatever tasks that are performed in the DTS package, the server has access to those folders, COM objects, etc. One way to test this is to go into enterprise manager and schedule the DTS package by right clicking on the DTS package and select 'Schedule Package'. Schedule it to run within the next couple of minutes. If the package executes correctly, you can create a stored procedure to run the DTS similiar to how you did it in the batch file.
CREATE PROCEDURE ExecDts AS

EXEC master.dbo.xp_cmdshell 'DTSRUN /S MainServer /U MyUser /P MyPwd /N MyDtsPackage'
Now the only thing to do is to have some way to execute the stored procedure. You can use either SPT or ADO to execute stored procedures. Unfortunatly there is no way of executing this via a batch file unless you want to install the SQL client tools.

Hope this helps.
Kurt






>Hi friends,
>
>I've had a DOS batch file (.BAT) that called DTSRUN with some parameters from a second server not the main server itself like this:
>
>
>DTSRUN /S MainServer /U MyUser /P MyPwd /N MyDtsPackage
>
>
>It worked because SQL Server was also installed in the second server. But now I want to change all my batchs (.BAT) to another PC which doesn't have SQL Server installed, so when I run the above line DOS gives me the following error:
>
>
>'DTSRUN' is not recognized as an internal or external command, operable program or batch file.
>
>
>Then I tried to call DTSRUN from its location on the main server like this:
>
>
>"\\MainServer\C$\PROGRAM FILES\MICROSOFT SQL SERVER\80\TOOLS\BINN\DTSRUN"
>
>And it gives me the following error:
>
>DTSRun:  Cannot create COM Server to load and execute DTS Package.  Error -2147221164 (80040154):  Class not registered
>
>
>From what I see I'd need to install some COM Server that DTSRUN calls, or something like that. Is there another way to run a DTS package from a PC which doesn't have SQL Server installed? Any help would be very appreciated.
>
>TIA
>
>Luis
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform