Re: Master database must never be the default database for any login
- From: "Carlos Felipe França da Fonseca" <carlosfelipefranca@xxxxxxxxx>
- Date: Sun, 20 Jul 2008 19:46:00 -0300
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" <esquel@xxxxxxxxxxxxx> wrote in message
news:Xns9AE2144842FYazorman@xxxxxxxxxxxx
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: Erland Sommarskog
- 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
- Re: Master database must never be the default database for any login
- From: Erland Sommarskog
- Master database must never be the default database for any login
- Prev by Date: Re: Master database must never be the default database for any login
- Next by Date: Re: MS08-040 won't install on Windows Vista SP1
- Previous by thread: Re: 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
|