SQL Server Debug Stored procedures

Source: Internet
Author: User

I. Debugging SQL Server 2000

1. Set up your account.
<1> locate MSSQLServer in the Windows service, 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 single-step debugging in Query Analyzer.
<1> in Query Analyzer, right-click the stored procedure and select Debug.

Two. VS2005 local debug SQL Server 2005

1. Open VS2005, click View, and open Server Explorer.

2. Right click on "Data Connection" and select "Add Connection" in the pop-up menu.

3. In the "Add Connection" dialog box that pops up,
<1> in the Server Name text box, fill in the IP address of the database server, such as 127.0.0.1.
<2> in the "Login to Server" section, it is important to use the default option, which is "use Window Authentication".
<3> Select the database you want to debug in the Select or enter a database name drop-down list.
<4> Click the OK button to complete the configuration of this section.

4. In Server Explorer, locate the stored procedure in the database that you want to debug.
<1> Right-click the stored procedure and select Step Into stored procedure.

5. Enter the values for each parameter in the Run Stored Procedure dialog box that pops up, and click the OK button to enter the debug state.

6. Summary: The key is "use Window Authentication".

Three. VS2005 remote debugging SQL Server 2005

1. Remote Debugging SQL Server 2005 is more troublesome than local debugging, and may often have insufficient permissions, use the following method to set.

2. On the machine of the database server,
<1> add a Windows account, such as a, and add the user to the Administrators permission group.
<2> Locate the SQL Server 2005 service in the Windows service, double-click the Pop-up dialog box.
(1) Select "Login" tab, select "This Account", enter the administrator account and password that you just created.
(2) Restart the service.

3. On the machine that is being debugged, on this machine,
<1> add a Windows account that is the same as the new account on the database server, the same password, and join the Administrators permission group.
<2> other steps with local debug SQL Server 2005.
<3> Note:
(1) If the "Select or enter a database name" drop-down list is empty when the server name text box fills in the IP address of the database server, the window body
Verification fails, please follow the procedure below.
(2) View the login database server account and password, and then set up this account on this computer, the password must be the same, and join to the Administrators permission group.
(3) The machine also uses this account to log on, absolutely OK.

SQL Server Debug Stored procedures

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.