[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 920
  • Last Modified:

VS.Net Stored Proc debugging

I follow the steps from
http://support.microsoft.com/default.aspx?scid=kb;[LN];316549 to debug stored procedures from VS.Net 2002 Enterprise Architect (with a local SQL Server 2000 SP3 ON XP Pro SP1) .

I follow the steps of Option 1 and it executes exactly like it is written.

I follow the steps of Option 2 and ... it doesn't work!

When I start the application, I can see a white question mark on the breakpoint of the Stored Proc. The tooltip say:
"The breakpoint will not currently be hit. Unable to bind SQL breakpoint at this time. Object containing the breakpoint is not loaded."

Any ideas?
Éric Moreau
Éric Moreau
1 Solution
Éric MoreauSenior .Net ConsultantAuthor Commented:
Your article is too old. It talks of VB6, SQL7, ...

Dianne (the author of the article) as written an update of this article in the Visual Studio Magazine of November 2002 and it doesn't give me more hints.

The strange thing is that I can step through stored proc from the Server Explorer but not from the code!
Maybe this will help

To debug TSQL, the user
should have the permission on the database to execute SP_SDIDEBUG stored
procedure. The default access is for sa only. In addition, mssdi98.dll
should be installed in the Binn directory of the SQL Server.

The followings are the step to grant the permission.
1) Use SQL Enterprise Manager to open the Master database (if you have
permissions to do so)
2) Look for sp_sdidebug under "Extended Stored Procedures"
3) Right click and click Properties and then Permissions
4) Check the Exec box for each account that should have rights to debug SPs.
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Éric MoreauSenior .Net ConsultantAuthor Commented:
I appreciate your help.

-Access have already been granted to SP_SDIDEBUG to the Public role and I am "System Administrator".

-I have 3 versions of mssdi98.dll. I have tried them all without success.
Éric MoreauSenior .Net ConsultantAuthor Commented:
I found it!!!

It is related so SP3 (of SQL Server).

This is stated in "INF: T-SQL Debugger Is Turned Off By Default for Earlier Clients After You Install SQL Server 2000 Service Pack 3" from http://support.microsoft.com/default.aspx?scid=kb;en-us;Q328151 :

Microsoft has disabled T-SQL Debugger for earlier clients for security reasons. To enable T-SQL Debugger for earlier clients, a member of the sysadmins server role, such as sa must explicitly enable debugging by running the following code:
Exec sp_sdidebug 'legacy_on'

You must repeat this procedure whenever you restart the server. Microsoft does not recommend that you use T-SQL Debugger on a production server.

Now I need to find a way of automating this thing! I think I will write a small .sql file and use OSQL to run it every time I start my computer!
Éric MoreauSenior .Net ConsultantAuthor Commented:
I will ask for a refund and send to PAQ. Any objections?
A request for deletion has been made.  If no response or you feel this is in error, comment.  If no objection, I will delete in three days.

E-E Admin
PAQ'd and all 250 points refunded.

Community Support Moderator @Experts Exchange

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now