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 开发者_StackOverflowsql 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?
Please post your connection string or have a look at http://www.connectionstrings.com/
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.
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?
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
精彩评论