Re: Master database must never be the default database for any login
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Mon, 21 Jul 2008 01:44:56 -0700
Carlos Felipe França da Fonseca (carlosfelipefranca@xxxxxxxxx) writes:
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?
To deal with current logins, this is the query I posted for SQL 2000:
SELECT 'EXEC sp_defaultdb ' + quotename(name) + ', 'thedbofyourchocie'
FROM syslogins
Copy and paste result into a query window.
For new logins, you will have to be observant and fix it yourself.
--
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
.
- 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
- Re: 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: MS08-040 won't install on Windows Vista SP1
- Next by Date: RE: Using trusted database connection across domains
- Previous by thread: Re: Master database must never be the default database for any login
- Next by thread: Modify default database of all logins
- Index(es):
Relevant Pages
|