real value of default db

Posted on 2014-08-20
Last Modified: 2014-09-08
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?
Question by:25112
    LVL 21

    Assisted Solution

    by:Randy Poole
    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
    LVL 23

    Accepted Solution

    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.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
    In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now