473,387 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Using OSQL and DTSRUN

I have a question. I am doing some work for someone and I have a batch
file that they can run that will execute an OSQL line and a DTSRUN
line. In both lines I run them using the /S /U /P switches and of
course the /N or /i switch to tell it what to run. I have also tried
replacing the /U /P switches with the /E switch.

My problem is that as long as I specify the users password on the OSQL
line (either with /U & /P or with /E & /P) it will run. If I try and
just use the /E it will say password failed for DOMAIN/USER . Ok, I
don't really care I can specify the password and the script will run.

However no matter what I do the DTSRUN line will not run, it gives me
this same password error.

I can run this line just fine on my PC on my network and my domain
using just the /S /E switches.

Any ideas as to why it will work for OSQL but not DTSRUN?
Thanks in advance.

Mar 21 '06 #1
5 5787
mike (mi********@gmail.com) writes:
I have a question. I am doing some work for someone and I have a batch
file that they can run that will execute an OSQL line and a DTSRUN
line. In both lines I run them using the /S /U /P switches and of
course the /N or /i switch to tell it what to run. I have also tried
replacing the /U /P switches with the /E switch.

My problem is that as long as I specify the users password on the OSQL
line (either with /U & /P or with /E & /P) it will run. If I try and
just use the /E it will say password failed for DOMAIN/USER . Ok, I
don't really care I can specify the password and the script will run.
When I try /E and /P with OSQL, I get "Error: Conflicting switches : -E and
-P"

And the message with /E only, would not really be a about password, but
something like "not associated with a trusted connection".
However no matter what I do the DTSRUN line will not run, it gives me
this same password error.

I can run this line just fine on my PC on my network and my domain
using just the /S /E switches.

Any ideas as to why it will work for OSQL but not DTSRUN?


Apparently trusted connection does not work to your customer's domain.
In that case you need to use SQL authentication, but that is not on
the form DOMAIN/USER.

It could help little if you posted the exact command lines you are
using, and the error you get with each line.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 21 '06 #2
Yea to me using the /E /P switches did not make sense either, but using
the /E switch by itself gave the error and using both worked for me as
dud using the /U /P which is more standard.
Here is what I am using

dtsrun /S server /U username /P password /N dtspackage
Here is what it is returning

Step 'Copy Data from xxxxxxxx to [xxxx].[dbo].[xxxxxxxxxxxx] Step'
failed

Step Error Source: Microsoft OLE DB Provider for SQL Server
Step Error Description:Login failed for user 'domain\username'.
Step Error code: 80040E4D
Step Error Help File:
Step Error Help Context ID:0
But like I said if I use the OSQL lines they run fine like this

osql /S server /U username /P password /i c:\live_scripts\script.sql

So why would login work for the script and not for the dts package?

Mar 23 '06 #3
mike (mi********@gmail.com) writes:
Yea to me using the /E /P switches did not make sense either, but using
the /E switch by itself gave the error and using both worked for me as
dud using the /U /P which is more standard.
Here is what I am using

dtsrun /S server /U username /P password /N dtspackage
Here is what it is returning

Step 'Copy Data from xxxxxxxx to [xxxx].[dbo].[xxxxxxxxxxxx] Step'
failed

Step Error Source: Microsoft OLE DB Provider for SQL Server
Step Error Description:Login failed for user 'domain\username'.
Step Error code: 80040E4D
Step Error Help File:
Step Error Help Context ID:0
But like I said if I use the OSQL lines they run fine like this

osql /S server /U username /P password /i c:\live_scripts\script.sql

So why would login work for the script and not for the dts package?


One cannot accuse me for knowing too much about DTS, but what does
the DTS package do? Does it access the server you connect to only?
/S /U and /P serves to find the package as such, but does not the
package itself log in somewhere? Looks llike this login fails.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 23 '06 #4
Good question, something I will have to look into. It is taking data
from some access tables and pulls them into SQL However these access
tables are on a different machine, not on the SQL server. Maybe the
failure is on the machine that has the access tables.
By the way it runs just fine if I run it from the SQL server. We just
want to be able to run it from an individual workstation.

Mar 24 '06 #5
mike (mi********@gmail.com) writes:
Good question, something I will have to look into. It is taking data
from some access tables and pulls them into SQL However these access
tables are on a different machine, not on the SQL server. Maybe the
failure is on the machine that has the access tables.
By the way it runs just fine if I run it from the SQL server. We just
want to be able to run it from an individual workstation.


The error message comes from the SQL Server OLE DB Provider, so the
problem is not likely to be with the access to the Access databases.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 24 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Adam Augusta | last post by:
In a Multi Server Job under SQL Server Agent (MSX), we have a series of steps like: DTSRun /~Z0x8E8635E6BBA... The ~Z means it's an encrypted hexidecimal string. The person who created this...
1
by: JimA | last post by:
I have an application that needs to execute dtsrun from a remote machine. Basically I have a batch file on the remote box, which handles the execute. This works fine on a machine with client tools...
2
by: Bob | last post by:
Everybody, I've been doing a lot of on-line research and cannot find any reference to the exact problem I'm having. Let me preface this question with the fact that I'm coming from an Oracle...
1
by: KR | last post by:
The DTS package runs fine through Enterprise manager successfully. However, when scheduled through a job that runs the dts through the following code: DECLARE @findfile int Exec @findfile =...
5
by: Brian Peasland | last post by:
I am trying to get a DTS package to be run from the command line with the dtsrun utility. The DTS package is stored in the database. The user I supply is a user in the database. I get an error...
0
by: shark | last post by:
Hi All, i am getting the error as posted below while executing Transfer logins using Dts package - sql server 2000 standard edition Can any body help? Microsoft Windows (C) Copyright...
0
by: blueblueblue | last post by:
Hi, I am trying to execute my dts package from sql using command shell as exec master..xp_cmdshell 'dtsrun /Sfiutopiadb /Usa /P /NBulktest' The package works perfectly in enterprise...
1
by: tezza98 | last post by:
I need some help. Im using a dtsrun command to import 9 tables into an Access database, most of the tables have about 1000 rows, but one has 20000+ rows and grows everyday. Im Using Access 2003...
0
by: David Greenberg | last post by:
Hi We use Sql 2000. I have a user that I want to be able to run a bat file with the DTSRUN command in it on a remote computer. What happens now is that she runs the bat file , reads the DTSRUN...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.