You need to store validated XML data in Schema1.Table1

You have a text file that contains an XML Schema Definition (XSD).
You have a table named Schema1.Table1.
You have a stored procedure named Schema1.Proc1 that accepts an XML parameter
named Param1.
You need to store validated XML data in Schema1.Table1. The solution must ensure that
only valid XML data is accepted by Param1.
What should you do? (Each correct answer presents part of the solution. Choose all that
apply.)

You have a text file that contains an XML Schema Definition (XSD).
You have a table named Schema1.Table1.
You have a stored procedure named Schema1.Proc1 that accepts an XML parameter
named Param1.
You need to store validated XML data in Schema1.Table1. The solution must ensure that
only valid XML data is accepted by Param1.
What should you do? (Each correct answer presents part of the solution. Choose all that
apply.)

A.
Define an XML column in Table1 by using an XML schema collection.

B.
Create an XML schema collection in the database from the text file.

C.
Declare Param1 var1 as type XML and associate the variable to the XML schema
collection.

D.
use the modify method to insert the XML schema into each row of the XML column in
Table1.

Explanation:

http://msdn.microsoft.com/en-us/library/bb510420.aspx
http://msdn.microsoft.com/en-us/library/ms187856.aspx
http://msdn.microsoft.com/en-us/library/ms176009.aspx
http://msdn.microsoft.com/en-us/library/hh403385.aspx
http://msdn.microsoft.com/en-us/library/ms184277.aspx



Leave a Reply 5

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


Grako

Grako

I think B, C is right:

First you create schema collection:

CREATE XML SCHEMA COLLECTION MySchemaCollection AS
N”
GO

And then

ALTER PROCEDURE Schema1.Proc1
@Param1 xml (MySchemaCollection )
AS

Dim

Dim

D is not correct for sure.
A is not necessary is you use only store proc to store xml data in the table.
Looks like B and C.

Vladimir

Vladimir

A – “You need to store validated XML data in Schema1.Table1” (might be inserted by other procedure)
B – It is neccessary to create an XML schema collection
C – “The solution must ensure that only valid XML data is accepted by Param1.”