Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error Executing SQL DTS  package through a Batch File

Posted on 2007-03-28
6
Medium Priority
?
350 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 1500 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

705 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