Gopal
Gopal

Reputation: 12012

SQL Server connection help

Using SQL Server 2005

I have the server connection name as (server1) in windows authentication mode, I want to change windows authentication mode to sql server authentication mode...

when i try to change sql server authentication mode with username = sa & password = sa, it showing error...

How to change the authentication mode or how to create a new sql connection?

Upvotes: 1

Views: 157

Answers (4)

Thomas
Thomas

Reputation: 64674

Without seeing your connection string, it is difficult to help you, however, judging from what you have said, the problem appears to be in the way you are setting credentials. It should be:

Data Source=<servername>;Initial Catalog=<database name>;User Id=sa;Password=<password>;

Not "username=". Note that I have removed any reference to "Trusted_Connection=yes" or "Integrated Security=SSPI". Btw, did you really need to run your app in the context of sa? If this app really needs to do sysadmin stuff, I would recommend creating a user specifically for that (or an Application Role) so that you can restrict what account can do if necessary.

Upvotes: 1

Ram
Ram

Reputation: 51

User name sa its the default name ..........no need to give username ........I think u r mistaken in the password field(password asks two times) u may need to give the password as "a" (password asking two times ,give the same password) It may work

Upvotes: 0

scherand
scherand

Reputation: 2358

Did you configure your server to allow SQL authentication? Check by opening SQL Server Management Studio (SSMS), right click your server, choose properties -> security and look at the radio buttons under "Server authentication".

Also, are you sure the password for the account sa is sa?

Upvotes: 0

Cade Roux
Cade Roux

Reputation: 89741

Please post your connection string or have a look at http://www.connectionstrings.com/

Upvotes: 4

Related Questions