SQL Server Debugger

Source: Internet
Author: User
Tags management studio sql server management sql server management studio
11 10000l 2009transact-sql Debugger for SQL Server 2008-Part 2

This blog will go over what you need to know for setting up your environment for remote debugging along with best practices and other things to consider when using the debugger in SSMs.

This 3 part series covers:

    1. Basic Debugging
    2. Configure remote debugging & best practices
    3. Debugging triggers and stored procedures with breakpoints

The debugger consists of 2 components. the server component is installed with the sqlservr.exe. the client component is installed as part of SSMs. when SSMs and the instance you want to debug are on the same system, there is nothing configure. you do however need to login to the instance as a member ofSysAdminRole.

If you need to debug a remote instance, You need to enable the program and port exceptions using the Windows Firewall Control Panel application on both computers.

On the computer that is running the instance of the database engine, inWindows Firewall, Specify the following information:

    • Add TCP port 135 to the exceptions list.

    • Add the program sqlservr.exe to the exceptions list. By default, sqlservr.exe is installed in c: \ Program Files \ Microsoft SQL Server \ mssql10.InstanceName\ MSSQL \ binn, whereInstanceNameIs MSSQLServer for the default instance, and the Instance name for any named instance.

 

    • If the Domain Policy requires network communications to be done through IPSec, you must also add UDP port 4500 and UDP port 500 to the exception list.

With the server instance taken care of, you now need to take care of SSMs on the client.

On the computer that is running SQL Server Management studio, inWindows Firewall, Specify the following information:

    • Add TCP port 135 to the exceptions list.
    • Add program ssms.exe (SQL Server Management studio) to the exceptions list. by default, ssms.exe is installed in c: \ Program Files \ Microsoft SQL Server \ 100 \ tools \ binn \ vsshell \ common7 \ IDE.

You are now ready to launch SSMs for remote debugging.

It is highly recommended that Transact-SQL code be debugged on a test server, not a production server, for the following reasons:

    • Debugging is a highly privileged operation. Therefore, only members ofSysAdminFixed server role are allowed to debug in SQL Server.
    • Debugging sessions often run for long periods of time while you investigate the operations of several Transact-SQL statements. locks, such as update locks, that are acquired by the session might be held for extended periods, until the session is ended or the transaction committed or rolled back.

 

 

 

 

 

That's it for Part 2.

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.