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

how to debug a T-SQL trigger in visual studio?

I have sql 2014
and a console app

the console app inserts data into a table
Then the trigger fires when any row is added, and adds data to various other tables

the data is never arriving in the other tables, so the trigger is failing
How can I debug and step through the trigger when using the console app? so i can see where its failing?
1 Solution
Vikas GargBusiness Intelligence DeveloperCommented:

Hope the following article will give you some idea for Debugging SQL trigger.


Hope it would help
websssAuthor Commented:
I get the error when opening the trigger in VS2013

Could not retrieve the definition of [dbo].[Trig_Trackin] from the server

Steven KribbeCommented:
Could you post the trigger code? I would definitely check access rights to the tables you are trying to populate in the trigger.  Is the trigger code working if you run it outside the trigger?

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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