November 19, 2009 at 9:10 am
sysrules in option. Good way to Trick.
Never seen object like this.
SQL DBA.
November 19, 2009 at 12:07 pm
Having recently gotten my brains beat out, my integrity questioned, my intelligence derided and other wise vilified (Refer to the QOD 11/17/2009 forum). I am greatly surprised that the little bitty nitpickers are not raging here in this forum, perhaps it is because they do not intimately know enough about SQL Server or since they got the message they so dearly love to see, that is "You got it right".
But let me point out a technicality: The question asked which of these views would you query. The correct answer as given is sysobjects.
Now for the sorry bit of fact the displayed item: sysobjects is a SYSTEM TABLE
The VIEW is sys.sysobjects. Which of course contains essentially the same data as does the system table. To be more specific it is defined as a CATALOG VIEW, but a view nevertheless.
Now this should not be attributed as an effort to denigrate the author of this QOD, knowing how hard it is to compose an "acceptable" QOD.
VM-723206 I congratulate you on your adroit side stepping the nit pickers.
November 19, 2009 at 1:58 pm
bitbucket-25253 (11/19/2009)
Having recently gotten my brains beat out, my integrity questioned, my intelligence derided and other wise vilified (Refer to the QOD 11/17/2009 forum). I am greatly surprised that the little bitty nitpickers are not raging here in this forum, perhaps it is because they do not intimately know enough about SQL Server or since they got the message they so dearly love to see, that is "You got it right".But let me point out a technicality: The question asked which of these views would you query. The correct answer as given is sysobjects.
Now for the sorry bit of fact the displayed item: sysobjects is a SYSTEM TABLE
The VIEW is sys.sysobjects. Which of course contains essentially the same data as does the system table. To be more specific it is defined as a CATALOG VIEW, but a view nevertheless.
If you are going to pick nits, make sure you get your facts right. 😛
In SQL Server 2000 and older versions, sysobjects was indeed a system table. But as of SQL Server 2005, system tables are no longer exposed. They have been replaced by system views, of which sys.objects (that is, the view named objects in the schema named sys) is an example.
To preserve compatibility with older versions, a second set of views, the so-called compatibility views, were introduced. One of those views is sys.sysobjects. And to preserve full compatibility, SQL Server will find this view even if you omit the schema name and shorten it to just sysobjects.
So, unless you assumed the question to be about SQL Server 2000 or before, you picked the wrong nit. For in all current versions of SQL Server, sysobjects is indeed a view, not a table.
The true nitpicker though, would have complained about something else - and that is that the real true answer is not included. Books Online includes a note with all compatibility views that these will be removed in a future version of SQL Server, and that the current SQL Server system views should be used instead. So the only really correct answer would have been to query the sys.objects view.
November 19, 2009 at 4:28 pm
While these are valid arguments about nit-picking of questions, one vital piece of information was overlooked. This question was only worth 1 point.
Bitbucket, your question was worth more points. Had it only been 1 point, there would have been far less picking.
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
November 19, 2009 at 10:00 pm
Hey this was easy one. Hope for more such easy Q's in future! 😀
November 20, 2009 at 7:46 am
You could quibble that the complete rule is not stored in sysobjects, since the rule definition is in syscomments. But sysobjects is the best answer of the choices given.
December 2, 2009 at 2:33 am
Beaten but a leeson learned should never be learned again.
December 5, 2009 at 9:48 pm
Yes, could we please stop asking QotD's that only have correct answers for SQL Server 2000?
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
January 6, 2010 at 7:14 am
RBarryYoung (12/5/2009)
Yes, could we please stop asking QotD's that only have correct answers for SQL Server 2000?
Now that is nit-picking 😛
Far away is close at hand in the images of elsewhere.
Anon.
January 23, 2010 at 7:26 pm
Scott Coleman (11/20/2009)
You could quibble that the complete rule is not stored in sysobjects, since the rule definition is in syscomments. But sysobjects is the best answer of the choices given.
I'm afraid that choosing the least wrong of several wrong answers is too often the only way of getting the "correct" answer to "Today's Question". I wish that would change.
Tom
January 23, 2010 at 7:29 pm
RBarryYoung (12/5/2009)
Yes, could we please stop asking QotD's that only have correct answers for SQL Server 2000?
Perhaps instead we could ensure that all questins specify which resions (7, 2K0, 2K5, or 2K8) the apply to? I seem to recall that people used to do this when it made a difference, but it seems top be done less often now. Or am I just imagining it?
Tom
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply