Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 3rd, 2005, 05:15 AM
Registered User
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login Failed. Cant figure out why.


I want to tun a exe that execute a DTS package in another server.
I do not have administrators rights in the remote sql machine and they won't give me, but i can connect to SQL with the SQL Enterprise Manager with sql authentication, and a username and password that is not the same i use to login in the local machine.

This user (SQL) can execute DTS with no problems in SQL Enterprise Manager.

When i run the exe i get the following error:

Login Failed with mydomain\mydomainusername

The code is:

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim oPkg As DTS.Package2
        Dim oStep
        oPkg = New DTS.Package2
        oPkg.LoadFromSQLServer("SERVERNAME", "USER", "PASSWORD", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrus tedConnection, , , , "DTS_NAME", )

        ' Set Exec on Main Thread
        For Each oStep In oPkg.Steps
            oStep.ExecuteInMainThread = True

        oPkg = Nothing

The username and password i use in the code is the same that i use to "log" into the Enterprise manager.

Any idea ?. Can you post some code, to make it.
I'm stuck here.
Thank you.

Old January 3rd, 2005, 08:47 AM
Friend of Wrox
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc

use this link

Jaime E. Maccou
Old January 3rd, 2005, 09:28 AM
Registered User
Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to greenash Send a message via Yahoo to greenash

Try using the following constatnt in the flags parameter to the
LoadFromSQLServer() method

Possible cause :
 DTSSQLStgFlag_UseTrustedConnection is using your Windows Authentication userid/Pwd and I think you want to use the SQl Server UserID/Pwd.

Old January 3rd, 2005, 12:33 PM
Registered User
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


But especialy to GREENASH, only adding that constant make it Work.

It was a B I G HELP because as you probably have notice i´m a begginer.

I want to thank to people like "jemacc" because 440 post it IS a big work too.

This probably has save my job.
Happy New Year.

Similar Threads
Thread Thread Starter Forum Replies Last Post
failed to login with membershipprovider swifty_programmer ASP.NET 2.0 Basics 1 May 3rd, 2007 11:40 AM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.