You need to include ProductId in the primary key

You maintain a SQL Server 2008 instance that contains a database named
AdventureWorks.
The AdventureWorks database contains a table named OrderSpecs. The OrderSpecs table
has a clustered primary key named OrderId on the OrderId column. The OrderSpecs table
has a single XML column named ProductSpecs that stores XML data, and there is an XML
index on the same XML column.
You add a new column named ProductId to the OrderSpecs table.
You need to include ProductId in the primary key.
What should you do?

You maintain a SQL Server 2008 instance that contains a database named
AdventureWorks.
The AdventureWorks database contains a table named OrderSpecs. The OrderSpecs table
has a clustered primary key named OrderId on the OrderId column. The OrderSpecs table
has a single XML column named ProductSpecs that stores XML data, and there is an XML
index on the same XML column.
You add a new column named ProductId to the OrderSpecs table.
You need to include ProductId in the primary key.
What should you do?

A.
Alter the XML index and set the ALLOW_ROW_LOCKS = OFF option. Alter the primary
key and set the ALLOW_ROW_LOCKS = ON option.

B.
Drop the XML index on the table. Modify the primary key. Recreate the XML index.

C.
Disable the XML index on the ProductSpecs column. Modify the primary key. Enable the
XML index on the ProductSpecs column.

D.
Move the XML data to a temporary table. Clear the XML data from the original table by
setting the ProductSpecs column to NULL. Modify the primary key. Repopulate the
ProductSpecs column.



Leave a Reply 0

Your email address will not be published. Required fields are marked *