Link to home
Create AccountLog in
Microsoft SQL Server

Microsoft SQL Server

--

Questions

--

Followers

Top Experts

Avatar of isaacr25
isaacr25

Running a DTS package remotely
I have a .bat file on Server1. I need to execute the file from a remote server, let's say Server2. How would I modify this code, which currently works perfectly from the local server? I'm using MS SQL Server 2000 on Windows 2003 servers. Thanks.
@echo off
REM
dtsrun /server1 /Uuserhere /Ppasswordhere /NDTSpackagehere

Open in new window

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of DimitrisDimitris🇬🇷

dtsrun /S Server2 /U UserName /P Password /N DTSPackageName

Avatar of isaacr25isaacr25

ASKER

Let me make sure I explain more clearly:

file.bat is on Server1
SQL Server and DTS Package are on Server1
file.bat is being run remotely from Server2

Sorry if my initial post wasn't very clear.

Thanks.

Avatar of DimitrisDimitris🇬🇷

If server2 that runs the bat file can "see" server1 then probably you will not need any change.
The bat file should be able to be run from any pc within the network that has the SQL Client Tools installed.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


SOLUTION
Avatar of folderolfolderol

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Both servers are behind the same firewall. I don't understand why mssql tools must be installed on server2 if that server is only being used to trigger the bat file (which runs the DTS job) on server1.

Avatar of DimitrisDimitris🇬🇷

The server2 calls the bat file.
But the bat file is executed locally on server2
So the DTSRUN.exe must exists on server2 in order to be able to run.

It's like having on server1 installed the Visual Studio, and you have created a bat file that opens the Visual Studio.
When you call the bat from the server2 the code of the bat file is executed locally on server2
So the OS tries to locate the Visual studio on server2.

You have to understand that the call of the BAT file is not a RPC (Remote Procedure Call) is actually a local call on the server2

I see... Server2 does not have mssql tools installed. So is there any other way to do what I'm trying to do?

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of DimitrisDimitris🇬🇷

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of DimitrisDimitris🇬🇷

*On server1

Because the DTS needs to run as a result of another process.

SOLUTION
Avatar of DimitrisDimitris🇬🇷

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Microsoft SQL Server

Microsoft SQL Server

--

Questions

--

Followers

Top Experts

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.