SQL user and AD Group - Blank out the "Default Schema"

  • A previous DBA managed this before me.

    An application had a requirement to blank out the "Default Schema". See pic.

    Does anyone know how this was done?

    Every time I do it in SSMS the default schema reverts back the the previous schema.

    T-SQL, I couldn't get to do it either.

     

    Attachments:
    You must be logged in to view attached files.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • For AD-groups, it no default is used.(as an ad-account may have access through multiple ad-groups)

    For SQLusers, the engine sets it to "dbo" by default.

    I have noticed this works ! ( even tough no such schema exists )

    ALTER USER [thedbuseraccount] WITH DEFAULT_SCHEMA=[ ]

    However, I wonder what would be the disadvantage of having a default specified?

    Best practice is always specifying the schema for any object used.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Johan Bijnens wrote:

    Best practice is always specifying the schema for any object used.

    Preach it brother!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 3 (of 3 total)

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