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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I avoid entering a SQL Server password for MS Query

Status
Not open for further replies.

niallo32

IS-IT--Management
Apr 29, 2004
404
IE
I have an Excel 2000 query through MS Query which connects to SQL Server 2000.

when I run the query, it throws up the error below and but and asks for a username & password. When I select 'trusted connection' or enter in their ERP login, it returns the following error:

Connection failed: SQLState: '28000'. SQL Server error : 18456 - login failed for user Domainname\username

When I go to SQL Enterprise Mgr/Properties/Security/Authentication = SQL Server & Windows

Is there a way that I can enter in the SQL Server authentication details once and 'hardcode' them as such, so that they are cached and the user doesnt have to reenter them each time they run the query?

Clients connecting are on a Windows 2000 Terminal Server SP4

Thanks
 
Is this for clients on the same domain? If so, consider making their SQL Server accounts - Windows Authentication. Then they shouldn't need to enter a password.

-SQLBill

Posting advice: FAQ481-4875
 
The Windows authentication field is greyed out here and I dont appear to be able to change it - do you know how I can 'ungrey' this?

Thanks
 
You would have to drop their current (SQL Server Authentication login) and recreate it as a Windows Authentication.

BUT for Trusted Accounts to work, they must authenticate with the same domain controller(s) as SQL Server uses.

-SQLBill

Posting advice: FAQ481-4875
 
I assume you mean delete when you say drop?

If so, can I just leave the existing SQL account in place and create a new trusted account ?

Thanks
 
Only if you give the user a new login name.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top