Default schema

  • Anoo S Pillai

    Mr or Mrs. 500

    Points: 547

    Comments posted to this topic are about the item Default schema

  • Uwe Ricken

    Hall of Fame

    Points: 3108

    Hi,

    the question and it's given answer is nonsence. You talk in your "solution" about the sysadmin role!

    But in your script you add the user to the db_owner role.

    If the user is member of the db_owner role the default schema will be used!

    Microsoft Certified Master: SQL Server 2008
    MVP - Data Platform (2013 - ...)
    my blog: http://www.sqlmaster.de (german only!)

  • Matthew Holloway

    Old Hand

    Points: 336

    +1 to the above.

    How are you able to infer a relationship that is neither stated nor implied?

  • free_mascot

    One Orange Chip

    Points: 27168

    Nowhere in the question it is mention that login 'king_login' is part of sysadmin fixed server role?

    Neither in the script login 'king_login' had been added to the fixed server role 'sysadmin'?

    It is impossible to read the mind of the people what is the exemption!

    Anoop, it would be good if you state all your assumptions so that people can answer correctly and retain interest in QotD.

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • twin.devil

    SSC-Insane

    Points: 22208

    Wowwww !!!! ... MAY Be ... :hehe:

  • Koen Verbeeck

    SSC Guru

    Points: 258965

    WTH?

    The script doesn't mention sysadmin but database owner.

    The created user doesn't have sysadmin permissions, so the table will be created using the default schema.

    Points back please!

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Louis Hillebrand

    SSCarpal Tunnel

    Points: 4245

    +1 to the above

    points back please..

  • Igor Micev

    SSC-Dedicated

    Points: 33109

    Note a quite low percentage of correct answers so far.

    Igor Micev,
    My blog: www.igormicev.com

  • SQLDoubleG

    Hall of Fame

    Points: 3090

    Louis Hillebrand (3/31/2014)


    +1 to the above

    points back please..

    +1...

    Crystal balls are not working Monday morning...

  • Stuart Davies

    SSCoach

    Points: 18878

    Koen Verbeeck (3/31/2014)


    WTH?

    The script doesn't mention sysadmin but database owner.

    The created user doesn't have sysadmin permissions, so the table will be created using the default schema.

    Points back please!

    What Koen said !

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a questionThere are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan I would never join a club that would allow me as a member - Groucho Marx

  • lankymart

    SSC Veteran

    Points: 207

    Who came up with this rot? Duped!!

  • victoria_e_wood

    SSC Enthusiast

    Points: 156

    I also answered that the table would be created in the King-schema as there was no mention about the user being in the sysadmin role.

    I have to be honest that i do not agree with the 'correct' answer...

  • James Lean

    SSCertifiable

    Points: 5697

    Along with most others, I fell into this trap and answered "king_schema". However I do NOT think it's a bad question.

    The script doesn't mention anything about the creation of king_login, so it is implied that this login already exists. In that case, we cannot assume that it either is or isn't already a member of any server roles, including sysadmin.

    The fact that the user was created and added to the db_owner database role is just a red herring.

    Thanks for the question Anoo.

    -----
    JL

  • Uwe Ricken

    Hall of Fame

    Points: 3108

    James Lean (3/31/2014)The script doesn't mention anything about the creation of king_login, so it is implied that this login already exists. In that case, we cannot assume that it either is or isn't already a member of any server roles, including sysadmin.

    The fact that the user was created and added to the db_owner database role is just a red herring.

    Thanks for the question Anoo.

    Hmm - in a real scenario I have the chance to check an account. If I don't get the correct information my "reaction" suffers because of missing IMPORTANT information. That's not the way a dba should do his work and that's not the way the "correct" answer for this question should be!

    This question is by the given reason for right or wrong absolute nonsence because the most important information (the login is sysadmin) is missing.

    If I would ask you whether a INSERT INTO ... WITH (TABLOCK) is bulk logged or not you need to know what recovery model is your database running. If you don't have this information you have a chance of 33% for the correct doing 😛

    Microsoft Certified Master: SQL Server 2008
    MVP - Data Platform (2013 - ...)
    my blog: http://www.sqlmaster.de (german only!)

  • This was removed by the editor as SPAM

Viewing 15 posts - 1 through 15 (of 61 total)

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