|
|
|
date: Sun, 20 Jul 2008 17:59:47 -0300,
group: microsoft.public.sqlserver.security
back
Re: Master database must never be the default database for any login
Carlos Felipe França da Fonseca (carlosfelipefranca@gmail.com) writes:
> By default, MASTER is the default database for any login created, unless
> we change it.
> Is it possible I configure SQL Server to set a default database other than
> MASTER to any logins created automatically?
You can change for existing logins, see my other post. You could handle
new logins with a server-wide DDL trigger if you are on SQL 2005.
> For example, I would like to have all my logins pointing to MODEL database
> by default, unless we change it.
I understand the sentiment, and I agree that tempdb is a much better choice
as a default database. Model, on the other hand is not. Generally, you
cannot create new databases, if there are active users in model. And the
problem with master as default database for a login with sysadmin privs,
is that he can create objects in master by mistake. Well, you don't want
objects created in model by mistake either.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
date: Sun, 20 Jul 2008 15:00:27 -0700
author: Erland Sommarskog
Re: Master database must never be the default database for any login
Thanks for your answer, Erland.
I mentioned MODEL only as an example.
So, let's say that I want TEMPDB as my default database for all logins
created in SQL Server 2000.
Is it possible?
Thanks again,
Felipe
"Erland Sommarskog" wrote in message
news:Xns9AE2144842FYazorman@127.0.0.1...
> Carlos Felipe França da Fonseca (carlosfelipefranca@gmail.com) writes:
>> By default, MASTER is the default database for any login created, unless
>> we change it.
>> Is it possible I configure SQL Server to set a default database other
>> than
>> MASTER to any logins created automatically?
>
> You can change for existing logins, see my other post. You could handle
> new logins with a server-wide DDL trigger if you are on SQL 2005.
>
>> For example, I would like to have all my logins pointing to MODEL
>> database
>> by default, unless we change it.
>
> I understand the sentiment, and I agree that tempdb is a much better
> choice
> as a default database. Model, on the other hand is not. Generally, you
> cannot create new databases, if there are active users in model. And the
> problem with master as default database for a login with sysadmin privs,
> is that he can create objects in master by mistake. Well, you don't want
> objects created in model by mistake either.
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
date: Sun, 20 Jul 2008 19:46:00 -0300
author: Carlos Felipe Fran?a da Fonseca
|
|