![]() You can control how the Transact-SQL debugger operates by using the following menu commands, toolbars, and shortcuts: You can also stop debug mode and allow for the remaining Transact-SQL statements to finish executing by clicking Detach All on the Debug menu. On the Query toolbar, click the Cancel Executing Query button. On the Query menu, click Cancel Executing Query. On the Debug toolbar, click the Stop Debugging button. You can stop debug mode and statement execution by using any one of the following methods: The Query Editor window stays in debug mode until either the last statement in the Query Editor window finishes or you stop debug mode. You can start the debugger by either clicking the Debug button on the Query toolbar or by clicking Start Debugging on the Debug menu. You can then step through the code, pause the execution on specific Transact-SQL statements, and use the debugger windows to view the current execution state. When the Query Editor window enters debug mode, the debugger pauses at the first line of code. Starting the Transact-SQL debugger puts the Query Editor window into debug mode. 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. Therefore, only members of the sysadmin fixed server role are allowed to debug in SQL Server.ĭebugging sessions often run for long periods of time while you investigate the operations of several Transact-SQL statements. We recommend that Transact-SQL code be debugged on a test server, not a production server, for the following reasons:ĭebugging is a highly privileged operation. You cannot run the debugger when the Query Editor window is connected to an instance that is in single-user mode. The Database Engine Query Editor window must be connected to an instance of the Database Engine from SQL Server 2005 (9.x) Service Pack 2 (SP2) or later. The Database Engine Query Editor window must be connected by using either a Windows Authentication or SQL Server Authentication login that is a member of the sysadmin fixed server role. SQL Server Management Studio must be running under a Windows account that is a member of the sysadmin fixed server roll. For more information, see Configure firewall rules before running the Transact-SQL debugger. If your Database Engine Query Editor is connected to an instance of the Database Engine on another computer, you must have configured the debugger for remote debugging. The requirements to start the Transact-SQL debugger are as follows: This feature works with SSMS version 17.9.1 and earlier. You can set options to customize how the debugger runs. Then, you can run your Transact-SQL code in debug mode until you stop the debugger. ![]() You can start the Transact-SQL debugger after you open a Database Engine Query Editor window.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |