Solved

Error Executing SQL DTS  package through a Batch File

Posted on 2007-03-28
6
337 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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now