Saturday, February 25, 2012

certification question

I am reading Administering SQL Server, a study guide for 70-228
on page 27, it says:
"INSTEAD OF triggers are useful when a DML operation is unsuccessful."
I think this is nonsense. Any comments?Ford Desperado (ford_desperado@.yahoo.com) writes:
> I am reading Administering SQL Server, a study guide for 70-228
> on page 27, it says:
> "INSTEAD OF triggers are useful when a DML operation is unsuccessful."
> I think this is nonsense. Any comments?

Without any context at all, the sentence certainly looks funny. It reminds
of what I once read in a manual from DEC: "Frequently, unexpected errors are
entirely unpredictable."

I guess what they are trying to say is that when you cannot insert, update
or delete directly on a view, because the view does not live up to the
rules, then you can achieve this with an INSTEAD OF trigger.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||>Without any context at all, the sentence certainly looks funny.

well there isn't any more context.
Thanks Erland|||It's certainly a strange comment in the absence of any context, as
Erland says. Another possible explanation might be that if you have to
INSERT data into a table where you know that some data will violate
constraints, an INSTEAD OF trigger could be used to INSERT only the
good data, and flag or log the bad data; if you did a single INSERT,
then it would all be rolled back.

Simon|||One more nonsense:

the book claims that db_denydatawriter " Can deny the write permissions
on any object"

According to BOL, db_denydatawriter Cannot modify any data in any user
table in the database, and BOL seems to be correct

I think the author, Joyjit Mukherjee, screwed it up|||It sounds like he took a guess based on the group name, rather than
look it up in BOL, which would make me wonder about the quality of the
rest of the book. I've seen the official MS Press MCDBA study guides,
and they seem to be quite good, but then I suppose they should be.

Incidentally, sp_dbfixedrolepermission gives quite a detailed (and
accurate) list of each role's permissions - it's a bit clearer than the
comments in BOL.

Simon

No comments:

Post a Comment