October 8, 2012 at 6:54 am
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.
October 8, 2012 at 7:27 am
bitbucket-25253 (10/8/2012)
L' Eomot Inversé and Hugo KornelisMay 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.
October 8, 2012 at 7:34 am
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?
October 8, 2012 at 7:43 am
Good question +1:-)
Best,
Naseer Ahmad
SQL Server DBA
October 8, 2012 at 8:04 am
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.
October 8, 2012 at 8:34 am
Nice question. Thanks Ron.
October 8, 2012 at 8:46 am
bitbucket-25253 (10/8/2012)
L' Eomot Inversé and Hugo KornelisMay 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.
October 8, 2012 at 9:17 am
This was removed by the editor as SPAM
October 8, 2012 at 12:27 pm
Great warmup for a Monday! +1
Not all gray hairs are Dinosaurs!
October 9, 2012 at 3:34 am
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.
October 9, 2012 at 4:23 am
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
October 9, 2012 at 5:23 am
Great question. Thanks.
October 9, 2012 at 8:51 am
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
October 10, 2012 at 5:35 pm
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
October 24, 2012 at 8:28 pm
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