Auto logoff of users

  • Is there a nifty way to log all users off at a certain time? And ensure they stay out for X amount of time?

    Thanks

    Jay

  • Not directly. The only way to keep them out would be to set the db to either dbo only or single user mode, or you could temporarily change their permissions (maybe add them to a deny all role). Are you trying to get them out of one db, or the entire server?

    Andy

  • We have a data warehouse with olap cubes. We update the data nightly starting at 7pm-?. I would like to block the users during the update time. The DW consists of several individual dbs, so server wide blocking would be best.

    Thanks

    Jay

  • quote:


    We have a data warehouse with olap cubes. We update the data nightly starting at 7pm-?. I would like to block the users during the update time. The DW consists of several individual dbs, so server wide blocking would be best.


    You could place the entire SQL Server in Single-User mode but then you risk another user coming in. The way I would implement this is either to place each database in read only mode or DBO mode. You can do this to each database by using the sp_msforeachdatabase stored procedure. I have an article on that hosted in my area of the website if you need the syntax.

    Brian Knight

    bknight@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/bknight

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply