In my MS SQL 2005 i have given "Windows Authentication". Now how to connect with NETBEANS?? I means wat to give in User Name and Password fields?? I tried to give my User name and password while login into Windows. But not working. I am getting this error "the user is not associated with a trusted sql connection"

Recommended Answers

All 5 Replies

You really need to have a long look through Books On Line for this one.

MS SQL Server authentication works, as you know, in two ways. Windows authentication or Mixed mode (Windows authentication and SQL authentication.)

SQL authentication requires a username and password, registered in the SQL Server, to be passed in the connection string.

Windows authentication is a wholly different collection of badgers.
WA ignores any username / password pair sent in the connection string. Instead it uses the Windows authentication token provided during a login to a Windows domain. This token is used to interrogate the Domain security system and positively identify the account accessing the SQL server. This is then used to match the access rights granted that user account within the SQL server.

So your way forward depends on a number of things, are your servers in a Windows Domain?

No - Then switch the MS SQL Server 2005 security mode to MIXED, generate a SQL Login and database user. Pass the login name & password in your connection string.

Yes - Identify the account that your Java server is running under. Ensure that this account is a domain level name rather than a local name. Set that account name as a login in SQL Server and allocate that login as a datyabase user.

OR Switch to MIXED security mode and continue as in 'NO'.

You really need to have a long look through Books On Line for this one.

MS SQL Server authentication works, as you know, in two ways. Windows authentication or Mixed mode (Windows authentication and SQL authentication.)

SQL authentication requires a username and password, registered in the SQL Server, to be passed in the connection string.

Windows authentication is a wholly different collection of badgers.
WA ignores any username / password pair sent in the connection string. Instead it uses the Windows authentication token provided during a login to a Windows domain. This token is used to interrogate the Domain security system and positively identify the account accessing the SQL server. This is then used to match the access rights granted that user account within the SQL server.

So your way forward depends on a number of things, are your servers in a Windows Domain?

No - Then switch the MS SQL Server 2005 security mode to MIXED, generate a SQL Login and database user. Pass the login name & password in your connection string.

Yes - Identify the account that your Java server is running under. Ensure that this account is a domain level name rather than a local name. Set that account name as a login in SQL Server and allocate that login as a datyabase user.

OR Switch to MIXED security mode and continue as in 'NO'.

I tried with all modes but still not working, my windows domain username is "hakoo" and password is "a".

What version of SQL is it, Express or het "full"

What version of SQL is it, Express or het "full"

Its full version, tats SQL Server 2005. I installed it. N in windows authentications, HAKOO-PC comes.

This is starting to get a bit tricky to solve. There are just so many thinks that can be wrong or setup incorrectly with MS SQL.

Try installing the client tools onto a separate computer. Then can you attach to the SQL server from the tools machine?

Is the MS SQL Server process running under a LOCAL SYSTEM account or NETWORK account. Is Port 1433 open?

Books on line or microsofts own website might be your best bet.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.