change readonly and readwrite

  • Can a user of db owner role of a database change the databse option to read only and read-write?

    If not what permission I need to grant to the user?

    Thanks

  • create database test

    go

    use test

    create login test with password = 'test'

    create user test

    alter role db_owner add member test

    setuser 'test'

    alter database test set read_only

    /*

    setuser

    use master

    drop database test

    drop login test

    */

    Command(s) completed successfully.

Viewing 2 posts - 1 through 1 (of 1 total)

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