• malleswarareddy_m (6/9/2010)


    I put it newreadonly but still it allows to create a table. which is not possible with setting with tool. (database properties----readonly---true.)

    then create new db with wizard. It automatically creates new database with Readonly.

    Here with the script newreadonly database will not create with read only.It create database as normal database.It does not inherit the properties from model.

    Interesting.

    If I understand correctly, you:

    1) Set the Model DB to readonly

    2) Use the wizard to create a new database

    3) Switch context to the new database

    4) execute a create table statement - which fails

    What version and SP of SQL server? When I do those steps I see the same results as the script (sql 2005 and 2008).

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events