Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Server - login failed from script

Status
Not open for further replies.

mungdrool

Programmer
Jun 20, 2001
24
0
0
US
I am trying to figure out why i can execute a sql script inside management studio, but cannot execute the same script from a dos command prompt, using sqlcmd to execute the script. I have SQL Server 2008 standard on my local machine, using mixed authentication (I've also tried with Windows Auth). The remote server has SQL Server 2000 with mixed authentication. They are both in the same domain. I can log into either server with my credentials from the dos command prompt.

The really strange thing is that if i go into management studio and test the linked server connection, the script will work from the command prompt for a little while (maybe 15 minutes, i haven't timed it). If i don't first test the connection, it fails with "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."

Any ideas?
Thanks for any advice
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top