View - 8

  • L' Eomot Inversé and Hugo Kornelis

    May I thank both of you for the discussion which developed. For myself the main purpose of any one's QOD is to teach those who do not know the correct answer, and for those that do, affirm their knowledge.

    In the spirit of community, which binds us together on SSC, you and others like you contribute significantly to the knowledge / understanding of all members.

    I believe I speak for a vast majority of our members when I say THANK YOU for your contributions.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • bitbucket-25253 (10/8/2012)


    L' Eomot Inversé and Hugo Kornelis

    May I thank both of you for the discussion which developed. For myself the main purpose of any one's QOD is to teach those who do not know the correct answer, and for those that do, affirm their knowledge.

    In the spirit of community, which binds us together on SSC, you and others like you contribute significantly to the knowledge / understanding of all members.

    I believe I speak for a vast majority of our members when I say THANK YOU for your contributions.

    Absolutely!!!

    I learn much more from reading the discussions than I do from the QotD or by reading BOL. All have their value but I get the most value from the discussions.

  • Hugo Kornelis (10/8/2012)


    ...You may use SSMS, but not everyone does...

    Just to let you know that also some people reading the QotD might never use anything else then the SSMS because... well... not every one is a professionnal in SQL server. What seems obvious for most of you can be a revelation for some people. An exemple would be that Analyst-Programmer who has to admin SQL server because his working group is so small and depends on you to learn the basics because the company is so badly structured (and also depends on you to remember all the things you need to remember if you want to be an "OK" SQL server administrator).

    Thanks for the question. Still learning...

    p.s. by the way, with what do you work if you don't use SSMS?

  • Good question +1:-)

    Best,
    Naseer Ahmad
    SQL Server DBA

  • tilew-948340 (10/8/2012)Just to let you know that also some people reading the QotD might never use anything else then the SSMS because... well... not every one is a professionnal in SQL server.

    For the record: I never intended my message to imply that I don't use SSMS, just that some people don't. For most SQL Server professionals, SSMS is the tool of their trade.

    p.s. by the way, with what do you work if you don't use SSMS?

    I use SSMS for most of my interactive work (querying, checking results, changing query, etc).

    But I also save scripts to my filesystem and then execute them using sqlcmd.exe (I have an icon on my desktop that I can just drag&drop a script on - it will automatically fire sqlcmd.exe, execute the script, save the results in a file, then open Notepad when the results). Most people will not create objects in such scripts, but since my main job is to write a T-SQL code generator, my scripts usually contain lots of code to create, drop, or alter database objects.

    Other tools that are not used by me (but may be frequently used by others) are SSIS (to create tables to hold imported data), and homebrewn .Net applications.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Nice question. Thanks Ron.

  • bitbucket-25253 (10/8/2012)


    L' Eomot Inversé and Hugo Kornelis

    May I thank both of you for the discussion which developed. For myself the main purpose of any one's QOD is to teach those who do not know the correct answer, and for those that do, affirm their knowledge.

    In the spirit of community, which binds us together on SSC, you and others like you contribute significantly to the knowledge / understanding of all members.

    I believe I speak for a vast majority of our members when I say THANK YOU for your contributions.

    +1

    Good question Ron. It made me stop and think for a bit on Monday.

  • This was removed by the editor as SPAM

  • Great warmup for a Monday! +1

    Not all gray hairs are Dinosaurs!

  • L' Eomot Inversé (10/8/2012)


    kent_secher (10/8/2012)


    I think the question is not very good, since the correct answer can be deduced without knowledge of indexed views. The successful creation of this unique index would depend on the data in the two columns actually being unique. Since no such assumption is mentioned, it follows that the statement must fail 😉

    No, it doesn't have to fail on uniqueness. If it's declared with schemabinding it may fail (it will if there are duplicates in the column set concerned), or it may work (it will if there are no duplicates - for example if the table is empty, which must be a very common case) and when it works will, until it is dropped, enforce uniqueness on these two columns in the table.

    I didn't say it has to fail on uniqueness, but that it could. Since failure is a possibility, success cannot be the correct answer - if it was, the question should have included the assumption that the values are unique when the create index statement is run.

  • kent_secher (10/9/2012)


    L' Eomot Inversé (10/8/2012)


    kent_secher (10/8/2012)


    I think the question is not very good, since the correct answer can be deduced without knowledge of indexed views. The successful creation of this unique index would depend on the data in the two columns actually being unique. Since no such assumption is mentioned, it follows that the statement must fail 😉

    No, it doesn't have to fail on uniqueness. If it's declared with schemabinding it may fail (it will if there are duplicates in the column set concerned), or it may work (it will if there are no duplicates - for example if the table is empty, which must be a very common case) and when it works will, until it is dropped, enforce uniqueness on these two columns in the table.

    I didn't say it has to fail on uniqueness, but that it could. Since failure is a possibility, success cannot be the correct answer - if it was, the question should have included the assumption that the values are unique when the create index statement is run.

    Your logic seems somewhat bizarre. Using exactly the same argument I could say that if success were a possibility, failure could not be the correct answer. So using that logic leads to a contradiction unless you can show, independently of that logic, either that success is not a possibility or are willing to accept that both success and failure are a possibility, and in the latter case you don't have an answer while in the former case you know your logic is broken. In other words, in order to reach an answer you have to show not mereley that failure is a possibility, but that success is not a possibility. The only way you can do that is by reasoning that because the view is not schema bound it cannot be indexed, since all the other conditions for indexing it are either satisfied or unknown.

    Tom

  • Great question. Thanks.

  • Good question Ron. Made me think about those settings and how they apply.

    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

  • Good Question Ron.

    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

  • Good question. Thanks for submitting.

    http://brittcluff.blogspot.com/

Viewing 15 posts - 16 through 30 (of 30 total)

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