Solved

Error Executing SQL DTS  package through a Batch File

Posted on 2007-03-28
6
348 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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.

630 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