stored procedure pro

  • Hi Everybody,

    In my database one big table 19000 rows is there

    In this table have so many stored procedures is there

    one stored procedure purpose is to inserting rows but that is not working good

    how can i find which stored procedures is inserting

    i dont have permissions to write new procedure also how can i find out which procedure that one.

    Thanks

  • if you have access to the application source code which is using this database, then you can debug the application and find out when the records are inserted.

    You could also use profiler to see which stored procedures are being called in the application process.

    It would be really great if you could throw some more light on your requirement.

    🙂

  • [font="Verdana"]SQL Profiler will capture exactly what is going on, and you can limit it down to just capturing what is happening with that table. It does take a little while to learn how to use it.

    Without more details, I can't suggest much more.[/font]

  • You could try this:

    SELECT *

    FROM sysobjects so

    JOIN syscomments sc ON sc.[id]=so.[id]

    WHERE so.type = 'P'

    and sc.text like '%INSERT INTO yourtable%'

    It isn't 100% reliable (you can miss some procedure because of split into two rows, or because dynamic SQL is used), but it could help you to locate the procedure.

    Other than that, Profiler is the best way to go, because it will monitor anything... and there is always a possibility that some rows are not inserted by the procedure but in some other way - and that's probably what you need to know.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply