Contained database temporary tables

  • Comments posted to this topic are about the item Contained database temporary tables

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Nice question, thanks.

    The hint (select 2) makes the last answer "None of the above" a bit superfluous 😀

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

  • This was removed by the editor as SPAM

  • This is a tough one really 🙂

    M&M

  • I made the same wrong guesses as the majority. Got the first one right on collation but guessed that metadata would be in the contained database since my understanding was that these contained databases would not have instance dependencies. Sounds like that is not strictly true.

    Gotta read more now!!! 🙂 Great question. I think we need more Denali questions. Any rumors on the actual name of this new version? Is it just SQL Server 2012 (sounds so forboding). I think "Maya" might have been a more interesting code name for 2012 😀

    Peter Trast
    Microsoft Certified ...(insert many literal strings here)
    Microsoft Design Architect with Alexander Open Systems

  • .

    Regards
    Sushant Kumar
    MCTS,MCP

  • Koen Verbeeck (4/14/2011)


    Nice question, thanks.

    The hint (select 2) makes the last answer "None of the above" a bit superfluous 😀

    Same i was too thinking.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • Koen Verbeeck (4/14/2011)


    Nice question, thanks.

    The hint (select 2) makes the last answer "None of the above" a bit superfluous 😀

    I think that hint is applied automatically to all questions with > 1 correct answer. Also, since the question shows up with checkboxes automatically when > 1 answer is correct, that kinda gives it away also. So, I guess that I shouldn't have had that answer as a choice.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Another nice little tidbit of information about temporary tables in Denali: in all prior versions of SQL Server, through 2008R2, all temporary tables are created with positive object_id values. In Denali, local temporary tables are created with negative values (global temporary tables are still positive). I'm not sure of why the change... but if you are checking for existence of a temp table by: IF OBJECT_ID('tempdb..#table') > 0

    then you better start changing it to IF OBJECT_ID('tempdb..#table') IS NOT NULL.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • The metadata answer got me too. Nice question Wayne! I'm sure we will see more questions about contained databases, so I better start reading up!

  • Excellent question.

    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

  • mohammed moinudheen (4/14/2011)


    This is a tough one really 🙂

    I agree, it is hard question and a very good one. Thanks.

  • Cliff Jones (4/14/2011)


    mohammed moinudheen (4/14/2011)


    This is a tough one really 🙂

    I agree, it is hard question and a very good one. Thanks.

    I think what makes this hard is that it works differently than before - which this question was designed to just bring those differences up for people to see.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • No idea what a contained database is, so I had to guess today! I'm sure someone will write an article soon? 😀

  • The bad part is that it appears to be an idea that was not completed. My first impression was that a contained database was completely independent of the instance like Oracle so that it is easier to move. This question seems to contradict that idea. Too bad, it is a great idea.

    Peter Trast
    Microsoft Certified ...(insert many literal strings here)
    Microsoft Design Architect with Alexander Open Systems

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

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