Re: Master database must never be the default database for any login
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Sun, 20 Jul 2008 15:00:27 -0700
Carlos Felipe França da Fonseca (carlosfelipefranca@xxxxxxxxx) 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@xxxxxxxxxxxxx
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
.
- Follow-Ups:
- Re: Master database must never be the default database for any login
- From: Carlos Felipe França da Fonseca
- Re: Master database must never be the default database for any login
- References:
- Master database must never be the default database for any login
- From: Carlos Felipe França da Fonseca
- Master database must never be the default database for any login
- Prev by Date: Re: Modify default database of all logins
- Next by Date: Re: Master database must never be the default database for any login
- Previous by thread: Master database must never be the default database for any login
- Next by thread: Re: Master database must never be the default database for any login
- Index(es):
Relevant Pages
|