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
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.