I. debug SQL Server 2000
1. Set an account.
<1> Find MSSQLServer in Windows Service and double-click the pop-up dialog box.
<2> select the "login" tab, select "this account", and enter an administrator account and password.
<3> restart the service.
2. Perform one-step debugging on the query analyzer.
<1> in the query analyzer, right-click the stored procedure and choose debug ".
Ii. vs2005 local debugging of SQL Server 2005
1. Open vs2005 and click View to Open Server Resource Manager.
2. Right-click data connection and choose add connection from the shortcut menu.
3. In the pop-up "add connection" dialog box,
<1> enter the IP address of the database server in the server name text box, for example, 127.0.0.1.
<2> In login to server, use the default option "Use Window authentication", which is very important.
<3> select or enter a database name from the drop-down list.
<4> Click OK to complete the configuration.
4. In server resource manager, find the stored procedure to be debugged in the database.
<1> right-click the stored procedure and choose one-step execution stored procedure.
5. In the displayed "Run stored procedure" dialog box, enter the parameter values and click "OK" to enter the debugging status.
6. Conclusion: The key lies in the use of window authentication.
Iii. vs2005 remote debugging of SQL Server 2005
1. Remote debugging of SQL Server 2005 is a little more troublesome than local debugging, and there may be frequent prompts of insufficient permissions. Use the following method to set it.
2. on the database server machine,
<1> Add a Windows account, such as A, and add the user to the administrators permission group.
<2> Find the SQL Server 2005 service in Windows service, and double-click the pop-up dialog box.
(1) Select the "login" tab, select "this account", and enter the new Administrator account and password.
(2) restart the service.
3. On the debugged machine, that is, on the local machine,
<1> Add a Windows Account. The account and the new account on the database server must have the same password and be added to the administrators permission group.
<2> debug SQL Server 2005 locally.
<3> note:
(1) If the IP address of the database server is entered in the "server name" text box and the drop-down list of "select or enter a database name" is blank, the window is
Verification Failed, please follow the method below.
(2) view the account and password used to log on to the database server, and create this account on the local machine. The password must be the same and be added to the administrators permission group.
(3) the local machine also uses this account to log in. It is absolutely OK.