November 11, 2017 at 9:25 pm
Is there a trigger that is activated when a table/row is read?
November 12, 2017 at 1:50 am
No. Insert, update and delete only.
What are you trying to do?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 12, 2017 at 3:06 am
jayg359 - Saturday, November 11, 2017 9:25 PMIs there a trigger that is activated when a table/row is read?
Are you trying to audit the select statements?
😎
November 13, 2017 at 7:06 am
Thanks for your replies.
I was looking at running a stored procedure each time certain data was being read.
November 13, 2017 at 10:21 am
jayg359 - Monday, November 13, 2017 7:06 AMThanks for your replies.
I was looking at running a stored procedure each time certain data was being read.
Maybe you could have the report or application call the stored procedure to read the data instead of querying the table directly?
November 13, 2017 at 8:32 pm
Chris Harshman - Monday, November 13, 2017 10:21 AMjayg359 - Monday, November 13, 2017 7:06 AMThanks for your replies.
I was looking at running a stored procedure each time certain data was being read.Maybe you could have the report or application call the stored procedure to read the data instead of querying the table directly?
Yes, this is an option. But I was looking to try to have it run on the server entirely.
November 13, 2017 at 10:53 pm
jayg359 - Monday, November 13, 2017 8:32 PMChris Harshman - Monday, November 13, 2017 10:21 AMjayg359 - Monday, November 13, 2017 7:06 AMThanks for your replies.
I was looking at running a stored procedure each time certain data was being read.Maybe you could have the report or application call the stored procedure to read the data instead of querying the table directly?
Yes, this is an option. But I was looking to try to have it run on the server entirely.
What will the stored procedure do? There is a trick or two that can help in the area of when a table is read but we have to know what it is that you're trying to accomplish with the stored procedure.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2017 at 6:28 am
Jeff Moden - Monday, November 13, 2017 10:53 PMjayg359 - Monday, November 13, 2017 8:32 PMChris Harshman - Monday, November 13, 2017 10:21 AMjayg359 - Monday, November 13, 2017 7:06 AMThanks for your replies.
I was looking at running a stored procedure each time certain data was being read.Maybe you could have the report or application call the stored procedure to read the data instead of querying the table directly?
Yes, this is an option. But I was looking to try to have it run on the server entirely.
What will the stored procedure do? There is a trick or two that can help in the area of when a table is read but we have to know what it is that you're trying to accomplish with the stored procedure.
I would be searching for new data and make some update based on it.
November 14, 2017 at 7:01 am
jayg359 - Tuesday, November 14, 2017 6:28 AMJeff Moden - Monday, November 13, 2017 10:53 PMjayg359 - Monday, November 13, 2017 8:32 PMChris Harshman - Monday, November 13, 2017 10:21 AMjayg359 - Monday, November 13, 2017 7:06 AMThanks for your replies.
I was looking at running a stored procedure each time certain data was being read.Maybe you could have the report or application call the stored procedure to read the data instead of querying the table directly?
Yes, this is an option. But I was looking to try to have it run on the server entirely.
What will the stored procedure do? There is a trick or two that can help in the area of when a table is read but we have to know what it is that you're trying to accomplish with the stored procedure.
I would be searching for new data and make some update based on it.
I don't understand how that has anything to do with your original thought of running a proc when a table was read. What are you trying to do? Audit access/usage of the table? You need to be specific because it does make a difference in how to accomplish such a thing.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2017 at 7:17 am
I'd be interested in Auditing read/access/usage of a table 🙂
Far away is close at hand in the images of elsewhere.
Anon.
November 20, 2017 at 10:40 am
Jeff Moden - Tuesday, November 14, 2017 7:01 AMjayg359 - Tuesday, November 14, 2017 6:28 AMJeff Moden - Monday, November 13, 2017 10:53 PMjayg359 - Monday, November 13, 2017 8:32 PMChris Harshman - Monday, November 13, 2017 10:21 AMjayg359 - Monday, November 13, 2017 7:06 AMThanks for your replies.
I was looking at running a stored procedure each time certain data was being read.Maybe you could have the report or application call the stored procedure to read the data instead of querying the table directly?
Yes, this is an option. But I was looking to try to have it run on the server entirely.
What will the stored procedure do? There is a trick or two that can help in the area of when a table is read but we have to know what it is that you're trying to accomplish with the stored procedure.
I would be searching for new data and make some update based on it.
I don't understand how that has anything to do with your original thought of running a proc when a table was read. What are you trying to do? Audit access/usage of the table? You need to be specific because it does make a difference in how to accomplish such a thing.
each time credentials of a user is read, i know that he is accessing the system, I want to record this. I don't have access to the front end program so I want to do this on the back-end in the db.
November 20, 2017 at 3:56 pm
jayg359 - Monday, November 20, 2017 10:40 AMJeff Moden - Tuesday, November 14, 2017 7:01 AMjayg359 - Tuesday, November 14, 2017 6:28 AMJeff Moden - Monday, November 13, 2017 10:53 PMjayg359 - Monday, November 13, 2017 8:32 PMChris Harshman - Monday, November 13, 2017 10:21 AMjayg359 - Monday, November 13, 2017 7:06 AMThanks for your replies.
I was looking at running a stored procedure each time certain data was being read.Maybe you could have the report or application call the stored procedure to read the data instead of querying the table directly?
Yes, this is an option. But I was looking to try to have it run on the server entirely.
What will the stored procedure do? There is a trick or two that can help in the area of when a table is read but we have to know what it is that you're trying to accomplish with the stored procedure.
I would be searching for new data and make some update based on it.
I don't understand how that has anything to do with your original thought of running a proc when a table was read. What are you trying to do? Audit access/usage of the table? You need to be specific because it does make a difference in how to accomplish such a thing.
each time credentials of a user is read, i know that he is accessing the system, I want to record this. I don't have access to the front end program so I want to do this on the back-end in the db.
Ah... OK. Now I get it. Would a login trigger do it for you? Or are you really just interested if the user hits a certain table?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply