It has been a long time since I installed sqlserver 2005. I used to log on and select 'windows authentication '. There is no problem! You can use 'sqlserver Authentication' to log on some time ago, and the problem arises. No matter what method is used, it is a result error! The cause of the error is: 'user 'sa 'Logon Failed. This user is not associated with a trusted SQL server connection '.
I have been online for a long time today, but I am still not sure about it. I finally got it done through the summary on the Internet and books! The specific method is: 1: Open the SQL Server Manager! On the left side, right-click 'security' and choose 'new'. In the "Logon" dialog box, enter your login number in the login name, select 'sqlserver Authentication', and enter the password, you can cancel 'user password must be changed upon next logon. Click User ing. On the right, select the database to be mapped and check the database! In the following column, check 'db-owner' and 'public. Click 'status' and select "authorize" and "enable" in the right pane. These two items are generally default, but if they are not by default, they must be changed, otherwise, it cannot be connected! Click confirm '.
2: Find the SQL Server, right-click it on the left bar, and select the "attribute" command in the pop-up menu. In the displayed dialog box, click "security" and select "SQL Server and Windows Authentication Mode" under "Server Authentication". Check the preceding figure! Remember that this step is very important. If you do not have this step, you do not want to log on successfully! Click OK! 3: restart the service and select SQL Server Authentication Mode to log on! Enter your username and password to log on successfully!