Creating schemas

  • Comments posted to this topic are about the item Creating schemas

  • Nice Question.Thanks Steve

    Pramod
    SQL Server DBA | MCSE SQL Server 2012/2014

    in.linkedin.com/in/pramodsingla/
    http://pramodsingla.wordpress.com/

  • Thank you for the post, Steve, really good one.

    (never tried this and was tempted to test it, so I created the user and was seeing what he can do now and I logged in as the user and tried creating objects - but failed, tried creating schema - failed; tried granting permission on schema - also failed. then opted the 4th choice and clicked submit. then all of a sudden, I recalled I was granting the permission to self and not in the admin mode, and that's how I lost the today's point :crying:)

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • I guessed correctly, however, how does this prevent the user from creating in other schemas? Is it because he has not been given permission explicitly to them?

  • djj (3/3/2015)


    I guessed correctly, however, how does this prevent the user from creating in other schemas? Is it because he has not been given permission explicitly to them?

    In a way, Yes. In this case the user is just authorized on a specific schema. On the other hand if GRANT is executed on CREATE SCHEMA, then that user can create procedure objects under any schema.

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • djj (3/3/2015)


    I guessed correctly, however, how does this prevent the user from creating in other schemas? Is it because he has not been given permission explicitly to them?

    Correct. Steve has not been granted "Authorization" to any other schema other than the schema "Steve".

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Nice Cute question. Scored 2 marks.

    Thanks.

  • Gr8 question, guessed it correctly by logical thinking,

    Thanx Steve.

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Interesting question, thanks.

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

  • Thanks for the question.

  • Raghavendra Mudugal (3/3/2015)


    djj (3/3/2015)


    I guessed correctly, however, how does this prevent the user from creating in other schemas? Is it because he has not been given permission explicitly to them?

    In a way, Yes. In this case the user is just authorized on a specific schema. On the other hand if GRANT is executed on CREATE SCHEMA, then that user can create procedure objects under any schema.

    No he can't; he can only create procedures in schemas he creates, not in any others.

    Tom

Viewing 11 posts - 1 through 10 (of 10 total)

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