Link to home
Start Free TrialLog in
Avatar of dantheanswerman
dantheanswermanFlag for United States of America

asked on

TOAD With SQL SERVER -- How do I Debug Stored Procedures

Experts -- Please help --

I finally got TOAD on my machine (after 2 years!) and now am trying to configure it to debug TSQL I can see all the data in my tables and all related info, but can't seem to debug TSQL.

When I hit the play button, I get the following error:

__________________________________________________
Unable to register with Server.
Please contact your server administrator to configure the server permissions.
Exception from HRESULT: 0x80070005 (E_ACCESSDENIED).
__________________________________________________

How do I run a debug script in TOAD for SQL Server?? Please Help!

Thanks,
 User generated image
Avatar of ralmada
ralmada
Flag of Canada image

Avatar of lcohan
Why use TOAD when SQL Server has its own SQL Server Management Studio tool?
Anyway, you should ask your SQL DBA to add the account you are using to connect/run your TOAD to the SQL database security.
Avatar of dantheanswerman

ASKER

Lcohan -- Can SQL Server Management Studio be used to step into a stored procedure? (and add breakpoints?) that is really what I am after. (also -- the TOAD interface is far more advanced (from what I can see already) than the SQL Server Management Studio -- It's very impressive!)

Ralmada -- still working thru this link ... what settings /permissions do I need within SQL Server to allow for stepping into a stored procedure within TOAD

Here are the permissions you need:
http://msdn.microsoft.com/en-us/library/w1bhybwz(v=vs.80).aspx

Also, you can debug a Stored procedure following Ms walkthrough here:
http://msdn.microsoft.com/en-us/library/yet1b7by%28VS.80%29.aspx

Sure you can do it all with SQL SSMS 2008.
Just see attached picture and look under the Debug menu:

 User generated image
We're still on SQL Server 2005. Can a stored procedure be stepped into on SQL Server 2005?
ASKER CERTIFIED SOLUTION
Avatar of ralmada
ralmada
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
so basically not with SSMS, but with Visual Studio
Sorry - you listed the question under SQL 2008/2005 and thought you have 2008 as well. Anyway, I suggest you use it after you move on to SQL 2008 and until then you could use VS as ralmada suggested.
Thanks so much everybody -- You guys are great! Busy on another project today (Friday 13th)-- hoping to get time to look at this today, but more likely Monday... and sorry for the snafu on the SQL Server 2008 categorization. I was just trying to cast as wide a net as possible to get answers.

FYI -- TOAD doesn't do temp tables (at least the older version I have now -- not sure if the latest handles them or not?) and I have a sproc with 1600 lines and about 15 temp tables... Beginning to think I'm supposed to debug this the hard way .... grrrr. Gotta work on improving my charma maybe?

And Yes -- I can't wait for SQL Server 2008 ... wait ... what year is it again?!?

Again -- Thanks to ALL!!! I'll follow up Monday.
Thanks for all the time and effort!
Avatar of spiral2007
spiral2007

Did you find a final solution for this error? I have the same problem for a few days now and i don't know how to resolve it.
I never did find a solution ... sorry. Good luck..if you want to post your T-SQL thou, I did get real good at bug fixing on the fly... I'd be happy to take a look (if it's feasable)?
Here's another option that might work... download the latest free version of SQL Server (they give you 180 day free trial) on your personal machine and debug your TSQL there... it's awesome!!!! Kind of tricky to setup (but no where near as tricky as it was to try getting that TOAD working ... and debugging is a breeze in the latest version...

Luck to you my friend... let me know if I can help ... or post you question .. people here are smart! ;-)
When i connect on my local database it works fine. The problem comes when i try to connect to the server where all the  databases reside. So it has to do something i thing with the access rights on the server. I though that i need to connect using Windows authentication and not using SQL Server authentication. This might fix the problem.
Open up a new question with that query and see if you get a solid answer... you can't be the first to hit that problem. Good luck... I don't have an answer for that one.