SQL Server debugging stored procedures

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.