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 |
slihp
Yak Posting Veteran
61 Posts |
Posted - 2014-05-21 : 11:36:19
|
We use telerik reporting controls embedded or aspx pages, i have now hooked these up to sp's.unlike ssrs they do not store any execution info, so my thinking is simply create an insert statement at the end of each reports sp that inserts a record into an audit table recording info like the parameters passed, who used it and when.I Googled this and got back a whole lot of solutions that seemed over complicated i.e. running agent jobs every 5 minutes and interrogating the system views.am i missing something? for recording who ran which report when and with what parameters isn't this relatively simple.. |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2014-05-21 : 11:40:43
|
quote: Originally posted by slihp We use telerik reporting controls embedded or aspx pages, i have now hooked these up to sp's.unlike ssrs they do not store any execution info, so my thinking is simply create an insert statement at the end of each reports sp that inserts a record into an audit table recording info like the parameters passed, who used it and when.I Googled this and got back a whole lot of solutions that seemed over complicated i.e. running agent jobs every 5 minutes and interrogating the system views.am i missing something? for recording who ran which report when and with what parameters isn't this relatively simple..
Most of those solutions that you see assume that you don't have the ability to modify the stored procedures. If you are able to modify the stored procedures, what you proposed is probably the most straightforward. Might be tedious if you have a lot of stored procs). You can simplify the task a little bit by making the audit info from all stored procedures have the same columns, and getting the stored proc name etc. via queries (e.g. OBJECT_NAME(@@PROCID) gives you the name of the stored proc) |
|
|
slihp
Yak Posting Veteran
61 Posts |
Posted - 2014-05-22 : 04:09:34
|
Great exactly what i was thinking.yes illl standardize the info being stored, so that's its just a case of building a parameter string and then a one-liner to call the audit proc and pass the same parameters from whatever i want to audit.thanks |
|
|
|
|
|