Sql Server Debugger

11 April 2009

Transact-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 of the sysadmin role.

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, in Windows Firewall, specify the following information:

  • Add TCP port 135 to the exceptions list.

Debugging21 - Firewall

Debugging22 - Add Port

  • 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, where InstanceName is MSSQLSERVER for the default instance, and the instance name for any named instance.

Debugging23 - Add Program

Debugging24 - Add Server 

  • 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.

 Debugging25 - Done with server

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, in Windows 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 of the sysadmin fixed 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.

转载于:https://www.cnblogs.com/lilycnblogs/archive/2010/04/19/1715478.html

SQLDebug是八九软件开发的一个免费的智能查询分析器,它支持Access、MSSQL、MYSQL和ORACLE数据库,它的特性有: SQL语法快速自动完成 能根据数据库类型自动补全数据库保留字、表名、字段名、函数等。 强大的脚本编辑器 强大的SQL代码编辑功能,类似VS、Delphi、Java的快捷方式,如果你熟悉以上编写,编辑将会使用很顺手。 可中断的数据查询 查询数据可以随时中断,避免一查100多万条数据,程序长久没有反应。 强大的数据库结构分析 可以查看用户表、系统表、视图、存储过程、函数、用户自定义数据类型,而且表和视图可以查看:表结构、主键、外键、索引;视图和存储过程还可以查看创建SQL脚本。 强大的二次数据分析功能 对查询出来的数据进行二次分析,提供过滤,排序、查找、编辑、导出。特点:支持把字段置为null,显示每个字段的属性(完全和数据库数据类型对应),对长文本的查看,大多SQL查询器在显示很长文本,会耗尽系统资源,对空字段显示,不可编辑字段用红色字体显示,给用户显示更直观。对BLOB字段支持导入导出。 强大的数据导出功能 数据可以导出为:TXT、CSV、HTML、RTF、XLS,而且还用鼠标支持选择一部分数据导出。还支持选择表导出成Access文件,方便携带数据。 很好用的数据库结构比较和数据比较 对同种数据库之间比较表结构不同,特别适合维护几个版本的数据库,而且还可以比较两个表之间的数据。 支持同时查询几个数据库 软件采用独特的界面技术和数据库链接池技术,实现可以同时查询几个不同/相同类别的数据库。 软件界面简洁、美观、大方,而且软件还是免费的,无任何使用和升级的限制。作者保留版权。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值