Simulation Question You work as a database administrator at your company. Users report that insert statement against the view name Production.ExpiredProduct do not succeed. You confirm that the insert statements that are being used are valid. The only table that the view uses is named Production.ExpiredProduct. The table has the following definition: CREATE TABLE Production.ExpiredProduct {ExpiredProductID INT IDENTITY CONSTRAINT PKEXPIREProduct PRIMARY KEY Name NVARCHAR(50) NOT NULL ListPrice MONEY NULL} You need to ensure that the insert statements can be complete successfully. You need to apply the fewest possible changes, and you must use SQL Server Management Studio(SSMS). What is the possible solution for that? I go to delete the only Trigger in the Triggers folder, is it correct? Or should I disbale it? Or is it any other Solution? Please help.
Do not succeed means what, do you get any error. If so check if that is violating any primary key or unique constraints in this case. Satya SKJ Microsoft SQL Server MVP Writer, Contributing Editor & Moderator http://www.SQL-Server-Performance.Com This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
This is the question in the exam. It only given us this scenario, just say that did not succeed but the insert statement is valid. It open the SQL Server Management Studio (SSMS) with some functions available only. Based on the question, what you suspect? Anything to do with view? Table Key or Triggers? Kindly advice. Thanks.
The suggestion is to find it yourself by referring to the books & available resources on your lab, it is best to discourage give the answers for the exam here, dont' get me wrong but by experience you will be at best by researching it. Satya SKJ Microsoft SQL Server MVP Writer, Contributing Editor & Moderator http://www.SQL-Server-Performance.Com This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
What "exam" are you talking about? -- Frank Kalis Moderator Microsoft SQL Server MVP Webmaster:http://www.insidesql.de
What was the answer by your teacher? Satya SKJ Microsoft SQL Server MVP Writer, Contributing Editor & Moderator http://www.SQL-Server-Performance.Com This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
He didnt give out the answer yet...but I suspect is due to the Trigger that block the insert statement not work, FYI, only 1 trigger in the table. So I proceed to delete the trigger. Not sure correct or not. In this case, normally we disable or delete trigger? Which one better or also depend?