real value of default db

when you create a default db, what is the real value of carefully choosing a specific db?

it could be any system db or user db? how would you decide which is the best for that login?

is keeping system database as default always safe? what may be cons of not keeping system db as default?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Randy PooleCommented:
If your talking about the default db for a new user, you would normally set it for the database the user was created for.  Administrators would normally be set to the master system db.  If the user was created for a specific database, there really is no reason for them to have access to the system databases
nemws1Database AdministratorCommented:
The only thing assigning a default database does is that it allows the user to skip issuing a "USE <database>" command when they connect.  Which, IMO is lazy anyways.  It's useful if you have per-application users (which you do, don't you?  If not, you should) which only ever connect to one database.  When they connect to the server, they'll automatically connect to the default database, even if they don't specify connecting to that database when they establish the connection.

Otherwise, it means nothing.  You can set 'master' as the default database for all users without any security worries.  If the user doesn't have permission to do anything in 'master', they won't be able to issue an SQL commands to that database.

I think you think it means more than it does.  Assigning a default database to a user does NOT give them any permissions to that database - you still need to do that separately.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.