Default db is 'master' but default db showing up as another db in SSMS

  • Anyone ever had this issue?

    My login is set to 'master' for its default and yet, when opening a new query editor window it defaults to a different database on the server.

    I've examined security but cannot see anything out of the norm. I also re-started SQL Server (this is a dev environment), to no avail.

    Any ideas are much appreciated!

    Sandy - HawkeyeDBA

    Just a Midwest DBA Doing the Best I Can

  • Hi,

    There are two things of settings for default database option.

    1. Right click on your login. Check "Default database" on general page.

    2. On connect to a new database engine, click on options. Check default database.

    In case of a conflict of default databases, Step # 2 will precede over Step # 1.

    I guess this could be your issue.

    Thanks

    Satyen

  • Satyen has what I'd suggest. The connection dialog in SSMS may not default to master.

  • I apologize, where do I find option #2?

    Other logins with their default database as master work fine but even when I drop and recreate the login in question I continue to get this other database as my default when I open a new query window.

  • 1. Open SSMS,

    2. On Object Explorer, click Connect and database engine.

    3. On the connect pane, you can see, server type, servername, authentication...If you go down you can see options checkbox.

    Regards

    Satyen

  • Thanks! I checked this (I have to admit I never paid much attention to that window), it was set to <default>

    But, I figured out my problem.

    The problem was that deny select to sysobject was set for 'public' which was causing my issues.

    Thank you for your help!

    Sandy

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply