Results 1 to 2 of 2

Thread: TSQL - Syntax for READ ONLY??

  1. #1
    Join Date
    May 2005
    Posts
    111

    TSQL - Syntax for READ ONLY??

    Is it possible to put a database into READ ONLY mode from MULTI USERS mode? I know that the following script will bring a database out of READ ONLY---


    ALTER DATABASE foo SET SINGLE_USER WITH ROLLBACK IMMEDIATE

    restore database foo
    with recovery

    ALTER DATABASE foo SET MULTI_USER

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Yes, just replace 'single_user' with 'read_only'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •