Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2009-05-05 : 17:36:20
|
I have proc in MSDB. That gets called from many user databases. I need to find out from which DB this proc has been called (Inside proc). Is there an easy option?------------------------I think, therefore I am - Rene Descartes |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-06-04 : 05:18:26
|
You can use SQL Profiler or server side trace to do this. E 12°55'05.63"N 56°04'39.26" |
 |
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2009-06-04 : 13:05:07
|
quote: Originally posted by Peso You can use SQL Profiler or server side trace to do this.
I need to capture the information INSIDE the proc. Code behaves depending on the name.------------------------I think, therefore I am - Rene Descartes |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-06-04 : 13:10:08
|
You might be able to solve this by using Service Broker.There is no way I know of right now that can "trace" the calling code, within a SP. E 12°55'05.63"N 56°04'39.26" |
 |
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2009-06-04 : 13:15:00
|
ok. Thank you Peso.------------------------I think, therefore I am - Rene Descartes |
 |
|
|
|
|