Solved

Error Executing SQL DTS  package through a Batch File

Posted on 2007-03-28
6
342 Views
Last Modified: 2013-11-30
Error Executing the Batch file.  Please see below error:
DTSRun:  Loading...

Error:  -2147467259 (80004005); Provider Error:  17 (11)
   Error string:  [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exi
st or access denied.
   Error source:  Microsoft OLE DB Provider for SQL Server
   Help file:
   Help context:  0

I am executing a DTS Package from a Batch file which I need to schedule through Task Scheduler.
When I run the package from SQL Server it runs fine but when I execuet it through a batch file I get the following error. Please see bwlow for the Batch File settings:

DTSRUN /S CHAMPION /E /N "ClearNotification"

CHAMPION = Server name
/E = Trusted Connection
/N = DTS Package name

The package contains simple T-SQL statements to delete contents of a table with respect to the time.
The connection for the SQL Server 2000 is WINNT Authentication.

Any help regrading this appeciated. Let me know what is the mistake I am doing?

0
Comment
Question by:hariprasadere
  • 3
  • 3
6 Comments
 
LVL 16

Expert Comment

by:rboyd56
ID: 18809283
Does this command run from the command line?

Also is CHAMPION the name of the machine you are running the job on?

If not, what account is the task scheduler running under. If it is a local account it may not have the necessary permissions on the network to access a remote SQl Server.
0
 

Author Comment

by:hariprasadere
ID: 18809364
I get that error when I ran it from Comand Line

CHAMPION is the Machine name where this job resides and runs from. It should not be a network permission issue because I am not running it over the network I am running it on the Server itself.

I am thinking that it might be SQL Server login problem.
0
 
LVL 16

Accepted Solution

by:
rboyd56 earned 500 total points
ID: 18809980
If it were a SQL Server login problem you would get something like login failed for user....

The error you are getting indicates that the SQL Server cannot be found when the package runs. Is SQL Server a default instance or is it a named instance?
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

Author Comment

by:hariprasadere
ID: 18811053
It is a Default Instance
0
 
LVL 16

Expert Comment

by:rboyd56
ID: 18811699
When you run this from Enterprise Manager and it succeds are you running it on the server itself or on a client machine? If it is a client machine, do this:

On the server machine, open the SQL Server Client Network Utility
Go to the alias tab
See if there is an alias for CHAMPION
If there is rename it and try DTSRUN again
If there is not an alias, create one with these properties:
Server alias: CHAMPION
Server name: IP address of server
Network library: TCP/IP
Leave Dynamically determine port checked.

Click OK and try the DTSRUN command again
0
 

Author Comment

by:hariprasadere
ID: 18812849
tried and Tried and finally I got a solution for myself. Though it is running locally on the machine I still had to enter the domain qualifier. eg

DTSRUN /S machinename.yourdomain.com /E /N "DTS PACKAGE NAME"
I guess I would give  rboyd56: credit for this atleast he made think on this issue.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question