推荐优秀的SQL脚本调试工具Embarcadero DBArtisan
推薦優(yōu)秀的SQL腳本調(diào)試工具Embarcadero DBArtisan 可以調(diào)試SQL Server 2000/2005 SQL調(diào)試工具匯總
調(diào)試SQL語句是經(jīng)常會碰到的需求,常常為了查找報表的數(shù)據(jù)是否正確,SQL腳本為什么取不到預(yù)想中的數(shù)據(jù),一般都可以通過調(diào)試SQL語句來解決問題,找到原因。問題不一定是系統(tǒng)的Bug,可能是設(shè)置不正確,可能是數(shù)據(jù)之間沒有關(guān)聯(lián)。
看到園子里的一篇文章"介紹一款替代SSMS的sqlserver管理工具 toad for sqlserver5.7”,這個工具我最喜歡的功能當(dāng)屬SQL語句調(diào)試,其它的功能,SSMS可以做到。SSMS對于SQL Server 2000/2005,無法進(jìn)行腳本調(diào)試。
除了Toad for SQLServer可以解決問題外,我這里推薦Embarcadero DBArtisan,界面如下圖所示
界面中看到的,是在修復(fù)ERP的報表數(shù)據(jù),更新當(dāng)前正在驗貨的數(shù)據(jù)(采購驗貨,抽查驗貨,生產(chǎn)驗貨)到物料主文件中。
程序安裝完成后,打開它,它會枚舉當(dāng)前局域網(wǎng)中的SQL Server實例,選擇需要的實例,打開一個腳本窗口,復(fù)制SQL語句片段到窗口中,再按Debgu窗口,即可開始調(diào)試。
調(diào)試問題時,可以在Watch窗口中看到被監(jiān)視的變量的值,也可以把鼠標(biāo)旋停在變量上查看它當(dāng)前的值。
寫到這里,突然想到找一下市面上能看到的所有的SQL Debugger,以方便查找。經(jīng)過努力的查找,又發(fā)現(xiàn)了工具
Aqua Data Studio可以Step Into,Step Over存儲過程和腳本片段。官網(wǎng)上有一段文字介紹,我把它復(fù)制到下面來
Debug AquaScripts within the Editor: Just like Aqua Data Studio's DB2, MS SQL Server, Oracle and Sybase SQL debuggers, AquaScripts can be stepped through during execution to examine results and debug errors. Functions can be evaluated and parameters entered as the debugging process continues. Breakpoints can be set and used to pause execution to examine values and parameters. The debugger highlights the breakpoints, indicates which one currently pauses the execution and sets bookmarks in the navigation bar so that they can be viewed quickly when there are multiple pages worth of lines to debug.
Toggle a break point in the script body. A user can set a break point at any line in the source code in order to run it up to this line.
Running the script until the break point with parameters provided by the user. The execution can be stopped at any time using the stop button. Output messages for the execution can be viewed in the Console tab.
"Step Into","Step Over" and "Step Return" buttons allow the user to move through and execute functional blocks of the code.
Stack, Global Scope and Local Scope can be viewed in the Debug tab.
The user can enter variables and view their values during the execution in the Variables tab.
The user can enter expressions and see their values in the Watches tab.
Debug AquaScripts within a Web Browser: When debugging in browser, the built-in HTTP server will provide an interface in a tab document within ADStudio. The interface will display the HTTP requests processed. The HTTP requests include which scripts that are executed, with the parameter name value pairs that are passed to the executing script.
片段語句functional blocks of the code,可以通過此工具調(diào)試。非常抱歉,至今沒有在網(wǎng)內(nèi)的網(wǎng)站上找到相關(guān)的下載和破解工具,無法截圖以證實它所說的功能。
再來看看每天編程用到的Visual Studio 2010。在VS2003時,它就可以做到連接到SQL Server中,調(diào)試存儲過程。對于片段SQL語句,可以簡單的封裝成存儲過程,再通過VS2003的強(qiáng)大調(diào)試功能實現(xiàn)腳本追蹤。
時間一下子就來到了2013年,10年前(2012)的技術(shù)到今天已經(jīng)有了質(zhì)的提升。SQL Server 2005引入了CLR,可以用熟悉的.NET語言編寫SQL Server Object,通常是Function,Procedure,也可以定義類型,比如緯度,貨幣(數(shù)量和幣種),復(fù)數(shù)。打開服務(wù)器管理器,選擇SQL實例,勾選Application Debugging,然后選中需要調(diào)試的存儲過程,填入值,即可開始追蹤過程。要注意使用Windows信任連接方式,否則會報錯
好了,這一下子又多出了5個同系列的SQL調(diào)試工具。從VS2003到VS2012,一共是五個出自微軟的SQL調(diào)試工具。
如果把SQL Server Management Studio 也算上,從SQL Server 2008, SQL Server 2008 R2, SQL Server 2012,一共有三個同系列的SQL調(diào)試工具。這樣一算,就有8個出自微軟的SQL工具,可以用來調(diào)試SQL腳本。
總結(jié)一下可以調(diào)試SQL語句的工具
Toad for SQLServer
Embarcadero DBArtisan
Microsoft Visual Studio 2003-2012
SQL Server Management Studio 2008-2012
分類:.NET Solution
作者:Leo_wl
出處:http://www.cnblogs.com/Leo_wl/
本文版權(quán)歸作者和博客園共有,歡迎轉(zhuǎn)載,但未經(jīng)作者同意必須保留此段聲明,且在文章頁面明顯位置給出原文連接,否則保留追究法律責(zé)任的權(quán)利。
版權(quán)信息
總結(jié)
以上是生活随笔為你收集整理的推荐优秀的SQL脚本调试工具Embarcadero DBArtisan的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: charles代理手机调试_Mac 上使
- 下一篇: 怎么创建具有真实纹理的CG场景岩石?