Tweeted twitter.com/StackDBAs/status/849933000368422916
3 edited tags
source | link

I have a strange behavior that I can't explain...

On a SQL Server 2008 R2 Express instance, I have the "auto Close" option set to "False" on mythe [model] database. When

However, When I doexecute CreateCREATE databaseDATABASE Test[test];, itSQL Server creates the database with the "auto close"auto close option set to truetrue.

I checked in the sys.configurations just to make sure there was nothing pending (not the case).

I also tried to change the config on [model] to true, save, then change it back to false but I still have the same behavior.

If I create itthe database using the GuiSSMS GUI (right click -> new database), it creates itthe database with the auto closeauto close option set to false...false

Any ideaHow can I make CREATE DATABASE create a database with auto close set to false?

Thanks.

I have a strange behavior that I can't explain...

On a SQL instance, I have the "auto Close" option set to "False" on my [model] database. When I do Create database Test, it creates the database with the "auto close" option set to true.

I checked in the sys.configurations just to make sure there was nothing pending (not the case).

I also tried to change the config on [model] to true, save, then change it back to false but I still have the same behavior.

If I create it using the Gui (right click -> new database), it creates it with the auto close option set to false...

Any idea ?

Thanks.

On a SQL Server 2008 R2 Express instance, I have the "auto Close" option set to "False" on the [model] database.

However, When I execute CREATE DATABASE [test];, SQL Server creates the database with the auto close option set to true.

I checked sys.configurations just to make sure there was nothing pending (not the case).

I also tried to change the config on [model] to true, save, then change it back to false but I still have the same behavior.

If I create the database using the SSMS GUI (right click -> new database), it creates the database with the auto close option set to false

How can I make CREATE DATABASE create a database with auto close set to false?

2 Added code sample
source | link

I have a strange behavior that I can't explain...

On a SQL instance, I have the "auto Close" option set to "False" on my [model] database. When I do "Create database Test"Create database Test, it creates the database with the "auto close" option set to true.

I checked in the sys.configurationssys.configurations just to make sure there was nothing pending (not the case).

I also tried to change the config on [model][model] to true, save, then change it back to false but I still have the same behavior.

If I create it using the Gui (right click -> new database), it creates it with the auto close option set to false...

Any idea ?

Thanks.

I have a strange behavior that I can't explain...

On a SQL instance, I have the "auto Close" option set to "False" on my [model] database. When I do "Create database Test", it creates the database with the "auto close" option set to true.

I checked in the sys.configurations just to make sure there was nothing pending (not the case).

I also tried to change the config on [model] to true, save, then change it back to false but I still have the same behavior.

If I create it using the Gui (right click -> new database), it creates it with the auto close option set to false...

Any idea ?

Thanks.

I have a strange behavior that I can't explain...

On a SQL instance, I have the "auto Close" option set to "False" on my [model] database. When I do Create database Test, it creates the database with the "auto close" option set to true.

I checked in the sys.configurations just to make sure there was nothing pending (not the case).

I also tried to change the config on [model] to true, save, then change it back to false but I still have the same behavior.

If I create it using the Gui (right click -> new database), it creates it with the auto close option set to false...

Any idea ?

Thanks.

1
source | link

New database not using the model configuration

I have a strange behavior that I can't explain...

On a SQL instance, I have the "auto Close" option set to "False" on my [model] database. When I do "Create database Test", it creates the database with the "auto close" option set to true.

I checked in the sys.configurations just to make sure there was nothing pending (not the case).

I also tried to change the config on [model] to true, save, then change it back to false but I still have the same behavior.

If I create it using the Gui (right click -> new database), it creates it with the auto close option set to false...

Any idea ?

Thanks.