Many of you know that new quiz series for DBAs has started at www.beyondrelational.com. You can find all questions here. I am one of the quiz masters and I have an interesting question for DBAs. Here is the detail of the question that I ask.
Assume that in your database there is a table named test and a user named A. During 10 AM to 1 PM each day, this particular user should be restricted to make any data changes(insert/update/delete) in the table test. You, as a DBA, are asked to implement this restriction. How will you implement this restriction? Do you want to answer to this question? Click here to answer
Tags: t-sql, sql_server, sqlserver, tsql, SQL Server, #TSQL, #SQLServer, dba, Quiz,
Define 2 database roles - one for 10am to 1pm, and the other for other times. Add a SQL Agent job that runs at 10am and 1pm daily that changes the users role membership based on the time of day.