Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to capture a SP embedded in a bespoke app Expand / Collapse
Author
Message
Posted Thursday, August 1, 2013 7:47 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 23, 2014 8:56 AM
Points: 115, Visits: 145
Hi,

I'm looking after an application that runs a stored procedure created within the source code of the app.
I'm guessing that each time you log on to the app the SP gets created somewhere or it creates on the fly.

Is there a way to capture it's source code and see what it's doing?

I don't have access to the app's source code.

Any help welcome.
Thanks,
Eamon
Post #1479950
Posted Thursday, August 1, 2013 8:46 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:38 AM
Points: 13,092, Visits: 12,569
Fire up sql profiler and run the app.

Curious, how do you know it is a stored proc?


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1479981
Posted Thursday, August 1, 2013 10:45 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 23, 2014 8:56 AM
Points: 115, Visits: 145
Thanks for this.

The reason I know is that this is an old app which the vendor isn't supporting anymore.
Sometimes a data issue occurs and we've been told that a hard-coded SP inside the app is the issue.

Yes, SQL profiler is the clear choice indeed but I figured I'd ask if it happened to exist in tempdb, syscomments or other places.

Many thanks,
Eamon
Post #1480032
Posted Thursday, August 1, 2013 10:49 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:38 AM
Points: 13,092, Visits: 12,569
EamonSQL (8/1/2013)
Thanks for this.

The reason I know is that this is an old app which the vendor isn't supporting anymore.
Sometimes a data issue occurs and we've been told that a hard-coded SP inside the app is the issue.

Yes, SQL profiler is the clear choice indeed but I figured I'd ask if it happened to exist in tempdb, syscomments or other places.

Many thanks,
Eamon


I doubt it would exist in tempdb unless they created the proc as a temp proc. I assume also that since you have access to the db the proc is not there after the program closes? I would assume the proc would exist on whatever database the rest of the application is using. Maybe it gets dropped when the application closes? Maybe this is not a proc at all and is instead hard coded pass through sql?


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1480034
Posted Thursday, August 1, 2013 10:53 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:11 AM
Points: 12,905, Visits: 32,176
EamonSQL (8/1/2013)
Thanks for this.

The reason I know is that this is an old app which the vendor isn't supporting anymore.
Sometimes a data issue occurs and we've been told that a hard-coded SP inside the app is the issue.

Yes, SQL profiler is the clear choice indeed but I figured I'd ask if it happened to exist in tempdb, syscomments or other places.

Many thanks,
Eamon


chances are the application is actually just executing TSQL code; going to the trouble of creating a TSQL procedure, executing that TSQL procedure , and then dropping that same TSQL procedure to hide it from view is not something you'd typically see.
the default trace would show it occuring, since it's a DDL action, and any longer term trace you care to create would have it too.

i think it's much more likely "procedure" is referencing a function/procedure/subroutine written in the applications programming code, and not what we think of as a "procedure" in the TSQL world.


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1480035
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse