Need to take DB offline

  • I need to take a db offline after db has been updated. anyone know what the syntax is to do this??

    Steve Johnson

    Edited by - steve johnson on 11/26/2001 12:50:47 PM


    Steve Johnson

  • Do you need to script this? Sorry, don't have BOL handy now, but search for "database status". You can right click in EM and select properties, then choose your action.

    Steve Jones

    steve@dkranch.net

  • need to script it, we are having problems with people getting to the data before we have finished validation.

    So actually what I need to do is disable the users ability to connect to the db. I am guessing that if I take the db offline that I wont be able to finish my validation either....

    Steve Johnson


    Steve Johnson

  • Steve,

    Use sp_dboption 'dbname','option_name','option_value'

    ie

    sp_dboption 'somedbname','dbo use only','true'

    You can use it to also set it to read_only, single_user.

    Hope this helps.

    Tom Goltl

  • Thanks.....

    Steve Johnson


    Steve Johnson

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

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