Wednesday, March 7, 2012

Login Times

Yes there is.
Have a couple of jobs running.
Start the job at a specific time
In the first job put in EXEC sp_denylogin '<usr_name>'
Then if you need to kill any of the processes for that
user still in there.
in the second login put EXEC sp_grantlogin '<usr_name>'.
So you start the first job at say 7pm
And the second job at say 8.30am
Peter
"I may be drunk, Miss, but in the morning I will be sober
and you will still be ugly."
Winston Churchill

>--Original Message--
>Helo,
>Is there any way I could grant or deny a user login based
on the time of
>day?
>I'm running mad with this issue, since not everybody is a
full time
>employee, and for security reasons I would want to block
their logins when
>they are supposed to be out of the office.
>Thanks in advance.
>
>.
>Thanks!
I wasn't thinking about jobs at all... I was running mad trying to pull in
triggers, and even thinking about changing the network configuration... but
my head wasn't thinking on jobs at all and it's a really nice answer.
Thank you Peter.
"Peter The Spate" <anonymous@.discussions.microsoft.com> escribi en el
mensaje news:19dd01c4bb6a$f99c8b10$a301280a@.phx.gbl...[vbcol=seagreen]
> Yes there is.
> Have a couple of jobs running.
> Start the job at a specific time
> In the first job put in EXEC sp_denylogin '<usr_name>'
> Then if you need to kill any of the processes for that
> user still in there.
> in the second login put EXEC sp_grantlogin '<usr_name>'.
> So you start the first job at say 7pm
> And the second job at say 8.30am
> Peter
> "I may be drunk, Miss, but in the morning I will be sober
> and you will still be ugly."
> Winston Churchill
>
> on the time of
> full time
> their logins when

No comments:

Post a Comment