February 16, 2014 at 3:47 pm
Is there a way to restrict a specific login for a specific amount of time from connecting to a user db?
Thank you
February 16, 2014 at 7:04 pm
There are a few ways to do that.
1 would be a server logon trigger.
Another (better imho) method is to use an AD account. Then place login restrictions at the domain level for the account (http://technet.microsoft.com/en-us/library/cc781861(v=ws.10).aspx).
Another method would be via firewall rules (do you have your databases segmented from the rest of the network via firewall??).
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
February 17, 2014 at 7:30 am
I think Jason's approach is better, but you could just disable the login from a SQL Agent job and then have another at the scheduled interval to disable the login. Not as good or as sophisticated as Jason's, but functional.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 17, 2014 at 7:34 am
Grant Fritchey (2/17/2014)
I think Jason's approach is better, but you could just disable the login from a SQL Agent job and then have another at the scheduled interval to disable the login. Not as good or as sophisticated as Jason's, but functional.
Hadn't thought of that approach but that is perfectly viable too.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
February 17, 2014 at 12:37 pm
N/A.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
February 17, 2014 at 7:19 pm
Thanks for all the replies. Disabling the account is definitely simple and perfect for my scenario. Thanks again.
February 17, 2014 at 8:12 pm
paulaalkz 9229 (2/17/2014)
Thanks for all the replies. Disabling the account is definitely simple and perfect for my scenario. Thanks again.
Good to hear and glad you have a solution.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply