Vous êtes sur la page 1sur 48

Exam Name: TS: Microsoft SQL Server 2008, Database Development

Exam Type: Microsoft


Exam Code: 70-433 Total Questions 108

Question: 1
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. This morning you
receive an e-mail from your company manager, in the e-mail, the manager asks you to create a
table which is named dbo.Devices. Five rows have to be inserted into the dbo.Devices table. After
this, DeviceID has to be returned for each of the rows. Of the following Transact-SQL batches,
which one should be used?

A. CREATE TABLE dbo.Widgets ( WidgetID UNIQUEIDENTIFIER PRIMARY KEY, WidgetName


VARCHAR(25) );GOINSERT dbo.Widgets (WidgetName)VALUE
('WidgetOne'),('WidgetTwo'),('WidgetThree'),('WidgetFour'),('WidgetFive');SELECT
SCOPE_IDENTITY();
B. CREATE TABLE dbo.Widgets ( WidgetID INT IDENTITY PRIMARY KEY, WidgetName
VARCHAR(25) );GOINSERT dbo.Widgets (WidgetName)VALUES
('WidgetOne'),('WidgetTwo'),('WidgetThree'),('WidgetFour'),('WidgetFive');SELECT
SCOPE_IDENTITY();
C. CREATE TABLE dbo.Widgets ( WidgetID UNIQUEIDENTIFIER PRIMARY KEY, WidgetName
VARCHAR(25));GOINSERT dbo.Widgets (WidgetName)OUTPUT inserted.WidgetID,
inserted.WidgetNameVALUES
('WidgetOne'),('WidgetTwo'),('WidgetThree'),('WidgetFour'),('WidgetFive');
D. CREATE TABLE dbo.Widgets ( WidgetID INT IDENTITY PRIMARY KEY, WidgetName
VARCHAR(25));GOINSERT dbo.Widgets (WidgetName)OUTPUT inserted.WidgetID,
inserted.WidgetNameVALUES
('WidgetOne'),('WidgetTwo'),('WidgetThree'),('WidgetFour'),('WidgetFive');

Answer: D

Question: 2
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. The SQL Server has
identified many missing indexes. Now you have to build CREATE INDEX statements for all the
missing indexes. Which dynamic management view should be used?

A. sys.dm_db_index_usage_stats should be used


B. sys.dm_db_missing_index_group_stats should be used
C. sys.dm_db_missing_index_details should be used
D. sys.dm_db_missing_index_columns should be used

Answer: B

Question: 3
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Look at code
segment below:

DECLARE @RangeStart INT = 0;


DECLARE @RangeEnd INT = 8000;
DECLARE @RangeStep INT = 1;
WITH NumberRange(ItemValue)
AS (SELECT ItemValue
FROM (SELECT @RangeStart AS ItemValue) AS t
UNION ALL

Page 1 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

SELECT ItemValue + @RangeStep


FROM NumberRange
WHERE ItemValue < @RangeEnd)
SELECT ItemValue
FROM NumberRange
OPTION (MAXRECURSION 100)

Do you know the result of executing this code segment? Which result will be returned?

A. 101 rows will be returned with a maximum recursion error.


B. 10,001 rows will be returned with a maximum recursion error
C. 101 rows will be returned with no error
D. 10,001 rows will be returned with no error

Answer: A

Question: 4
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There is a table
named dbo.Sellings in the database. The table contains the following table definition:

CREATE TABLE [dbo].[Selling](


[SellingID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED,
[OrderDate] [datetime] NOT NULL,
[CustomerID] [int] NOT NULL,
[SellingPersonID] [int] NULL,
[CommentDate] [date] NULL);

Since you notice that this query takes a long time to run, you start to examine the data. You find
that only 2% of rows have comment dates and the SellingPersonID is null on 10% of the rows
after the examination. So you have to improve the query performance. You have to create an
index which must save disk space when optimize the query. Of the following index, which one
should you choose?

A. CREATE NONCLUSTERED INDEX idx2 ON dbo.Selling (CommentDate, SellingPersonID)


INCLUDE(CustomerID)WHERE CommentDate IS NOT NULL
B. CREATE NONCLUSTERED INDEX idx2ON dbo.Selling (CustomerID)INCLUDE
(CommentDate,SellingPersonID);
C. CREATE NONCLUSTERED INDEX idx2ON dbo.Selling (SellingPersonID)INCLUDE
(CommentDate,CustomerID);
D. CREATE NONCLUSTERED INDEX idx2ON dbo.Selling
(CustomerID)INCLUDE(CommentDate)WHERE SellingPersonID IS NOT NULL

Answer: A

Question: 5
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database which is named DB1.
There is a table named Bill in DB1. BillID is the primary key of the Bill table. By using the identity
property, it is populated. The Bill table and the BillLineItem are related to each other. In order to
increase load speed, all constraints are removed from the Bill table during a data load. But a row
with BillId = 10 was removed from the database when you removed the constraints. Therefore

Page 2 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

you have to re-insert the row into the Bill table with the same BillId value. Of the following options,
which Transact-SQL statement should be used?

A. INSERT INTO Bill(BillID, ...VALUES (10, ...


B. SET IDENTITY_INSERT BillON;INSERT INTO Bill(BillID, ...VALUES (10, ...SET
IDENTITY_INSERT BillOFF;
C. ALTER TABLEBill;ALTER COLUMN BillID int;INSERT INTO Bill(BillID, ...VALUES (10, ...
D. ALTER DATABASE DB1SET SINGLE_USER;INSERT INTO Bill(BillID, ...VALUES (10,
...ALTER DATABASE DB1SET MULTI_USER;

Answer: B

Question: 6
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There are two tables
in the company database. One table is named Subitems which includes subitems for shoes, hats
and shirts. Another one is named Commodities which includes commodities only from the
Subitems shoes and hats.
Look at the following query:

SELECT s.Name, p.Name AS CommodityName


FROM Subitems s
OUTER APPLY
(SELECT *
FROM Commodities pr
WHERE pr.SubitemID = s.SubitemID) p
WHERE s.Name IS NOT NULL;

Now you have to foretell what results the query produces. So what is the answer?

A. Name CommodityName---------- --------------------Shoes Mountain Bike Shoes,Shoes Mountain


Bike Shoes,Shoes Racing Shoes, MShoes Racing Shoes, LHats ClassicHat, SHats
ClassicHat, MHats ClassicHat, LNULL Mountain Bike Shoes,NULL Mountain Bike
Shoes,NULL Racing Shoes, MNULL Racing Shoes, LNULL ClassicHat, SNULL ClassicHat,
MNULL ClassicHat, LShirts NULLNULL NULL
B. Name CommodityName---------- --------------------Shoes Mountain Bike Shoes,Shoes Mountain
Bike Shoes,Shoes Racing Shoes, MShoes Racing Shoes, LHats ClassicHat, SHats
ClassicHat, MHats ClassicHat, L
C. Name CommodityName---------- --------------------Shoes Mountain Bike Shoes,Shoes Mountain
Bike Shoes,Shoes Racing Shoes, MShoes Racing Shoes, LHats ClassicHat, SHats
ClassicHat, MHats ClassicHat, LShirts NULL
D. Name CommodityName---------- --------------------Shoes Mountain Bike Shoes,Shoes Mountain
Bike Shoes,Shoes Racing Shoes, MShoes Racing Shoes, LHats ClassicHat, SHats
ClassicHat, MHats ClassicHat, LShirts NULLNULL NULL

Answer: C

Question: 7
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There are two tables
in the database of the company. The two tables are respectively named Sellings and
SellingsHistory. Historical selling data is stored in the SellingsHistory table. On the Sellings table,
you perform the configuration of Change Tracking. The minimum valid version of the Sellings

Page 3 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

table is 10. There is selling data that changed since version 10. According to the company
requirement, a query has to be written to export only these data, including the primary key of
deleted rows. Of the following methods, which one should be use?

A. FROM Sellings INNER JOIN CHANGETABLE (CHANGES Sellings, 10) AS C ...


B. FROM Sellings RIGHT JOIN CHANGETABLE (CHANGES Sellings, 10) AS C ...
C. FROM Sellings RIGHT JOIN CHANGETABLE (CHANGES SellingsHistory, 10) AS C ...
D. FROM Sellings INNER JOIN CHANGETABLE (CHANGES SellingsHistory, 10) AS C ...

Answer: B

Question: 8
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There are two tables
in the database of the company. The two tables are respectively named Clients and Bills. Now
you get an e-mail from your company manager, you've been assigned a task that you have to
write a SELECT statement. The statement should output client and bill data as a valid and well-
formed XML document. You have to mix attribute and element based XML within the document.
But you think that it is not proper to use the FOR XML AUTO clause. You have to find the suitable
FOR XML clause. Of the following FOR XML statement, which one should be used? (choose
more than one)

A. FOR XML PATH should be used


B. FOR BROWSE should be used
C. FOR XML EXPLICIT should be used
D. FOR XML RAW should be used

Answer: A, C

Question: 9
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There's a table
named Clients in the database. The Clients table contains an XML column which is named
ClientInfo. At present the Client table contains no indexes. Look at the WHERE clause below:
WHERE ClientInfo.exist ('/ClientDemographic/@Age[.>="21"]') = 1 You use this clause in a query
for which indexes have to be created. Of the following Transact-SQL statements, which one
should be used?

A. CREATE PRIMARY XML INDEX PXML_IDX_ClientON Clients(ClientInfo);CREATE XML


INDEX SXML_IDX_Client ON Client(ClientInfo)USING XML INDEX PXML_IDX_ClientFOR
VALUE;
B. CREATE PRIMARY XML INDEX PXML_IDX_ClientON Clients(ClientInfo);CREATE XML
INDEX SXML_IDX_Client ON Client(ClientInfo)USING XML INDEX PXML_IDX_ClientFOR
PATH;
C. CREATE CLUSTERED INDEX CL_IDX_Client ON Clients(ClientID);CREATE PRIMARY XML
INDEX PXML_IDX_ClientON Clients(ClientInfo);CREATE XML INDEX
SXML_IDX_Client_Property ON Client(ClientInfo)USING XML INDEX PXML_IDX_ClientFOR
VALUE;
D. CREATE CLUSTERED INDEX CL_IDX_Client ON Clients(ClientID);CREATE PRIMARY XML
INDEX PXML_IDX_ClientON Clients(ClientInfo);CREATE XML INDEX SXML_IDX_Client ON
Client(ClientInfo)USING XML INDEX PXML_IDX_ClientFOR PATH;

Answer: D

Page 4 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

Question: 10
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There are two tables
in the company database. The two tables are respectively named Bill and BillData. Bill
information is stored in the two tables. The Bill table relates to the BillData table through the BillID
column of each table. In the Bill table there is a column which is named LatestModifiedDate. If the
related bill in the BillData table is modified, you must make sure that the LatestModifiedDate
column must reflect the data and time of the modification. So you have to create a trigger. Of the
following Transact-SQL statement, which one should be used?

A. CREATE TRIGGER [uModDate] ON [Bill]AFTER UPDATE FOR REPLICATION AS UPDATE


[Bill] SET [LatestModifiedDate] = GETDATE() FROM inserted WHERE inserted.[BillID] =
[Bill].[BillID]
B. CREATE TRIGGER [uModDate] ON [BillDetails]INSTEAD OF UPDATE FOR
REPLICATIONAS UPDATE [Bill] SET [LatestModifiedDate] = GETDATE() FROM inserted
WHERE inserted.[BillID] = [Bill].[BillID];
C. CREATE TRIGGER [uModDate] ON [BillDetails] AFTER UPDATE NOT FOR REPLICATION
AS UPDATE [Bill] SET [LatestModifiedDate] = GETDATE() FROM inserted WHERE
inserted.[BillID] = [Bill].[BillID];
D. CREATE TRIGGER [uModDate] ON [Bill]INSTEAD OF UPDATE NOT FOR REPLICATIONAS
UPDATE [Bill] SET [LatestModifiedDate] = GETDATE() FROM inserted WHERE
inserted.[BillID] = [Bill].[BillID];

Answer: C

Question: 11
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There's a table which
is named Essays. The Essays table contains two columns respectively named EssayHead and
Detail. The two columns all contain a full-text index. The word "technology" may be in column
EssayHead or in column Detail. You have to return row from the Essay table. Of the following
code segments, which one should be used?

A. SELECT * FROM Books WHERE FREETEXT(BookTitle,'computer')


B. SELECT * FROM Books WHERE FREETEXT(*,'computer')
C. SELECT * FROM Books WHERE BookTitle LIKE '%computer%'
D. SELECT * FROM Books WHERE BookTitle = '%computer%' OR Description = '%computer%'

Answer: B

Question: 12
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Look at the following
query.

SELECT AddressId,
AddressLine1,
City,
PostalCode
FROM Person.Address
WHERE City = @city_name

Page 5 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

AND PostalCode = @postal_code

You notice that for a particular set of parameter values, sometimes this query has an unstable
performance, sometimes it runs quickly while sometimes it executes slowly. You also notice that
in the Address table, 92 percent of the rows contain the same value for the city. You have to
improve the query performance. For the particular set of parameter values, you have to identify a
query hint which will optimize the query.
Which query hint should be used?

A. OPTIMIZE FOR should be used


B. FAST should be used
C. PARAMETERIZATION FORCED should be used
D. MAXDOP should be used

Answer: A

Question: 13
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Now you get an order
from the company manger. The company manager assigns a task to you that you have to
perform the configuration on the Service Broker, making it process messages within a single
database. You have completed three steps: CREATE MESSAGE TYPE; CREATE CONTRACT;
CREATE QUEUE. After the above three steps, you have to complete the confifuration. So what is
the next step?

A. CREATE ROUTE is the next step.


B. CREATE SERVICE is the next step
C. CREATE ENDPOINT is the next step
D. CREATE BROKER PRIORITY is the next step.

Answer: B

Question: 14
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. You manage a SQL
Server 2008 database of the company. Now you get an e-mail from your company manager, in
the e-mail, you have been assigned a task. You have to send e-mail from a stored procedure. But
when you start to perform this, you notice that that a MAPI client has not been installed. In the
following options, which system stored procedure should be used?

A. sysmail_start_sp should be used.


B. xp_sendmail should be used
C. xp_startmail should be used.
D. sp_send_dbmail should be used

Answer: D

Question: 15
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Now you get an email
from your company, in the email, you're assigned a task. You have to configure Full-Text Search,

Page 6 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

making it ingnore specific words. So of the following Full-Text Search components, which one
should be used?

A. iFilter should be used


B. Thesaurus file should be used
C. Word breakers should be used.
D. Stoplist should be used.

Answer: D

Question: 16
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There is a table which
is named Item.
Look at the following location:
PS
SQLSERVER:\SQL\CONTOSO\DEFAULT\Databases\ReportServer\Tables\dbo.Inventory\Colum
ns>
At this location, you use the SQL Server Windows PowerShell provider to open a Microsoft
Windows PowerShell session. You have to query all the columns in Item table using the e SQL
Server Windows PowerShell provider. Of the following options, which cmdlet should be used?

A. Get-ChildItem should be used


B. Get-ItemProperty should be used
C. Get-Item should be used
D. Get-Location should be used

Answer: A

Question: 17
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Enterprise Edition
and all the company data is stored in the SQL Server 2008 database. There's a table named
Modifications. The data is the table is frequently modified. According to the company requirement,
you have to maintain a history of all data modifications, the type of modification and the values
modified also have to be kept. Of the following tracking methods, which one should you use?

A. C2 Audit Tracing
B. Change Data Capture
C. Database Audit
D. Change Trackin

Answer: B

Question: 18
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. You insert the
WorkerID of each Worker's manager in the ReportsTo column to document your company's
organizational hierarchy. You have to write a recursive query. The query should produce a list of
Workers and their manager and include the Worker's level in the hierarchy. You write the
following code segment. (Line numbers are used for reference only.)

Page 7 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

1 WITH WorkerList (WorkerID, FullName, ManagerName, Level)


2 AS (
3
4)
5 SELECT WorkerID, FullName, ManagerName, Level
6 FROM WorkerList;
At line 3, which code segment should you insert?

A. SELECT WorkerID, FullName, '' AS [ReportsTo], 1 AS [Level] FROM Worker WHERE


ReportsTo IS NULL UNION ALL SELECT emp.WorkerID, emp.FullNName mgr.FullName, 1 +
1 AS [Level] FROM Worker emp JOIN Worker mgr ON emp.ReportsTo = mgr.WorkerID
B. SELECT WorkerID, FullName, '' AS [ReportsTo], 1 AS [Level] FROM Worker WHERE
ReportsTo IS NULL UNION ALL SELECT emp.WorkerID, emp.FullName, mgr.FullName,
mgr.Level + 1 FROM WorkerList mgr JOIN Worker emp ON emp.ReportsTo = mgr.WorkerId
C. SELECT WorkerID, FullName, '' AS [Reports To], 1 AS [Level] FROM Worker UNION ALL
SELECT emp.WorkerID, emp.FullName, mgr.FullName, 1 + 1 AS [Level] FROM Worker emp
LEFT JOIN Worker mgr ON emp.ReportsTo = mgr.WorkerID
D. SELECT WorkerID, FullName, '' AS [ReportsTo], 1 AS [Level] FROM Worker UNION ALL
SELECT emp.WorkerID, emp.FullName, mgr.FullName, mgr.Level + 1 FROM WorkerList mgr
JOIN Worker emp ON emp.ReportsTo = mgr.WorkerID

Answer: B

Question: 19
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Sales information for
your company orders is stored in this database. According to the company requirement, a
common table expression (CTE) has to be implemented. In the options below, which code
segment should be used?

A. SELECT Year, Region, Total FROM (SELECT Year, Region, SUM(OrderTotal) AS Total
FROM Orders
GROUP BY Year, Region) AS [SalesByYear];
B. SELECT DISTINCT Year, Region, (SELECT SUM(OrderTotal) FROM Orders SalesByYear
WHERE
Orders.Year = SalesByYear.YEAR
AND Orders.Region = SalesByYear.Region) AS [Total] FROM Orders;
C. CREATE VIEW SalesByYear AS SELECT Year, Region, SUM(OrderTotal) FROM Orders
GROUP BY
Year, Region; GO SELECT Year, Region, Total FROM
SalesByYear;
D. WITH SalesByYear(Year,Region,Total) AS (SELECT Year, Region, SUM(OrderTotal) FROM
Orders
GROUP BY Year,Region) SELECT Year, Region, Total FROM
SalesByYear;

Answer: D

Question: 20
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Sales information for
your company orders is stored in this database. According to the requirement for marketing
analysis, your company wants you to identify the orders with the highest average unit price and

Page 8 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

an order total greater than 8,000. There should be less than 30 orders in the list. Of the follow
queries, which one should you use?

A. SELECT TOP (30) o.SalesOrderId, o.OrderDate, o.Total, SUM(od.Qty * od.UnitPrice) /


SUM(od.Qty) AS
[AvgUnitPrice]FROM Sales.SalesOrderHeader o JOIN Sales.SalesOrderDetail
od ON o.SalesOrderId = od.SalesOrderId WHERE o.Total> 8000 GROUP BY o.SalesOrderId,
o.OrderDate,
o.Total ORDER BY Total DESC;
B. SELECT TOP (30) o.SalesOrderId, o.OrderDate, o.Total, (SELECT SUM(od.Qty *
od.UnitPrice) /
SUM(od.Qty) FROM Sales.SalesOrderDetail od WHERE o.SalesOrderId =
od.SalesOrderId) AS [AvgUnitPrice]FROM Sales.SalesOrderHeader oWHERE o.Total > 8000
ORDER BY
o.Total DESC, AvgUnitPrice;
C. SELECT TOP (30) o.SalesOrderId, o.OrderDate, o.Total, SUM(od.QTY * od.UnitPrice) /
SUM(od.Qty)
AS [AvgUnitPrice]FROM Sales.SalesOrderHeader o JOIN
SALES.SalesOrderDetail od ON o.SalesOrderId = od.SalesOrderId WHERE o.Total> 8000
GROUP BY
o.SalesOrderId, o.OrderDate, o.Total ORDER BY AvgUnitPrice;
D. SELECT TOP (30) o.SalesOrderId, o.OrderDate, o.Total, (SELECT SUM(od.Qty *
od.UnitPrice) /
SUM(od.QTY) FROM Sales.SalesOrderDetail od WHERE o.SalesOrderId =
od.SalesOrderId) AS [AvgUnitPrice]FROM Sales.SalesOrderHeader o WHERE o.Total> 8000
ORDER BY
AvgUnitPrice DESC;

Answer: D

Question: 21
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Now you manage a
SQL Server 2008 instance. The instance is configured to use the Latin1_General_CS_AS
collation. You use the statements below to create a database.
CREATE DATABASE TestDB COLLATE Estonian_CS_AS;
GO
USE TestDB;
GO
CREATE TABLE TestPermTab (PrimaryKey int PRIMARY KEY, Col1 nchar );
You implement a temporary table named #TestTempTab that uses the following code.
USE TestDB;
GO
CREATE TABLE #TestTempTab (PrimaryKey int PRIMARY KEY, Col1 nchar );
INSERT INTO #TestTempTab
SELECT * FROM TestPermTab;

You have to decide which collation will be assigned to #TestTempTab. In the options below,
which collation will be assigned?

A. Latin1_General_CS_AS
B. No-collation
C. Estonian_CS_AS
D. The collation selected by the Windows system locale of the server

Page 9 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

Answer: A

Question: 22
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Your company
assigns a task to you that you have to write a query. The query returns the sequential number of
a row within a partition of a result set by using a ranking function, the row starts at1 for the first
row in each partition. In order to accomplish this task, which Transact-SQL statement should you
use?

A. You should use RANK


B. You should use NTILE(10)
C. You should use ROW_NUMBER
D. You should use DENSE_RANK

Answer: C

Question: 23
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There is a table which
is named WorkEmployee in the database. Now you get an order from your company manager, a
row in the WorkEmployee should be deleted. You're assigned this task. A transaction should be
written. The transaction should allow the database to be restored to the exact point the record
was deleted but the time of execution is not needed. Of the following queries, which one should
be used?

A. DECLARE @CandidateName varchar(50) = 'Delete_Candidate'BEGIN TRANSACTION


@CandidateNameDELETE FROMWorkEmployee WHEREWorkEmployeeID = 10; COMMIT
TRANSACTION @CandidateName;
B. BEGIN TRANSACTIONDELETE FROMWorkEmployeeWHEREWorkEmployeeID =
10;COMMIT
TRANSACTION;
C. BEGIN TRANSACTION WITH MARK N'Deleting a Job Candidate';DELETE
FROMWorkEmployee
WHEREWorkEmployeeID = 10; COMMIT TRANSACTION
D. BEGIN TRANSACTION Delete_Candidate WITH MARK DELETE FROMWorkEmployee
WHEREWorkEmployeeID = 10; COMMIT TRANSACTION Delete_Candidate;

Answer: D

Question: 24
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There is a table
named Employee. The table contains a clustered index on EmployeeID and a nvarchar column
named Family name. The Family name column has Russian and Korean characters.
You will use the following code segment to search by Surname.
IF @lang ='Russian'
SELECT PersonID, Surname
FROM Person
WHERE Surname = @SearchName COLLATE Cyrillic_General_CI_AS
IF @lang = 'Japanese'

Page 10 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

SELECT PersonID, Surname


FROM Person
WHERE Surname = @SearchName COLLATE Japanese_CI_AS_KS
Now your company assigns a task to you. According to the company requirement, you have to
enable
SQL Server, making it perform an index seek for these queries.
What action should you perform?

A. An index should be created on the Surname column.


B. For each collation that needs to be searched, a computed column should be created. Then on
the Surname column, an index should be created
C. For each collation that needs to be searched, a computed column should be created. On each
computed column, an index should be created
D. For each collation that needs to be searched, a new column should be created. Then you
should copy the data from the Surname column. Create an index on each new column.

Answer: C

Question: 25
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There're two tables in
the database. The two tables are respectively named CommoditySort and CommoditySubSort.
According to the company requirement, a query should be written. A list of commodity sorts which
contain more than ten sub-sorts should be returned by the query. As the technical support, the
company assigns this task to you. You have to write this query. In the options below, which query
should be used?

A. SELECT [Name] FROM Commodity Sort c WHERE EXISTS (SELECT CommoditySortID


FROM
CommoditySubSort WHERE CommoditySortID= c.CommoditySortID
GROUP BY CommoditySortID HAVING COUNT(*) > 10)
B. SELECT [Name] FROM Commodity Sort c WHERE NOT EXISTS (SELECT CommoditySortID
FROM
CommoditySubSort WHERE CommoditySortID=
c.CommoditySortID GROUP BY CommoditySortID HAVING COUNT(*) > 10)
C. SELECT [Name] FROM CommoditySubSort WHERE CommoditySortIDIN ( SELECT
CommoditySortID
FROM CommoditySort) GROUP BY [Name] HAVING COUNT(*) > 10
D. SELECT [Name] FROM CommoditySubSort WHERE CommoditySortIDNOT IN (SELECT
CommoditySortID FROM CommoditySort) GROUP BY [Name] HAVING
COUNT(*) > 10

Answer: A

Question: 26
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There're two columns
that are used to store data information by your company. The two columns are respectively
named Column1 and Column2. Column1 contains the data in local time, Column2 contains the
difference between local time and UTC time. According to the company requirement, this data
has to be stored in a single column. As the technical support, you have to accomplish this task.
Of the following data types, which one should you choose?

Page 11 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

A. datetime2(5)
B. datetimeoffset
C. time
D. datetime2

Answer: B

Question: 27
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Now you receive an
e-mail from your company manager, in the e-mail, he wants a unique constraint to be created. As
the IT engineer, you are assigned this task. So you have to create a column which allows the
creation of a unique constraint. Of the following column definitions, which one can be used?
(choose more than one)

A. nvarchar(100) NULL
B. nvarchar(100) NOT NULL
C. nvarchar(max) NOT NULL
D. nvarchar(100) SPARSE NULL

Answer: A, B

Question: 28
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There're two
partitioned tables respectively named Deal and DealDetail. Now you get an order from your
company manager, according to his requirement, one of the partitions of the Transaction table
has to be archived to the TransactionHistory table. You have to accomplish this task. In the
options below, which method should be used?

A. ALTER PARTITION FUNCTION ... MERGE ...


B. ALTER PARTITION FUNCTION ... SPLIT ...
C. ALTER TABLE ... SWITCH ...
D. INSERT ... SELECT ...; TRUNCATE TABLE

Answer: C

Question: 29
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database which is 5 GB. There's
a table named SellingDetails in the database. You often perform the inserting and updating of the
Selling information. Today you get a report saying that in the SellingDetails table, there happens
excessive page splitting. As the technical support, you must solve this problem, that is to say, you
have to minimize the chance of the page splitting. In the options below, which code segment
should you choose?

A. EXEC sys.sp_configure 'fill factor (%)', '60';


B. ALTER INDEX ALL ON Selling.SellingHistory REBUILD WITH (FILLFACTOR = 60);
C. UPDATE STATISTICS Selling.SellingHistory(Products) WITH FULLSCAN, NORECOMPUTE;
D. ALTER DATABASE Selling MODIFY FILE (NAME = Sellingdat3, SIZE = 10GB);

Answer: B

Page 12 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

Question: 30
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. According to the
business development, you are developing a new database, which will have two tables named
SallsBillItem and Goods contained. They are related to each other. Now you are assigned a task
to make sure that all goods referenced in the SalesBillItem table have a corresponding record in
the goods table. Which method would be used to accomplish this task?

A. DDL trigger would be used to accomplish this task


B. Foreign key constraint would be used to accomplish this task.
C. Primary key constraint would be used to accomplish this task.
D. DML trigger would be used to accomplish this task
E. JOIN would be used to accomplish this task

Answer: B

Question: 31
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You have a table
named Client. Now you are assigned a task to make sure that client data in the table not only
make the credit limit less than 10,000, but also make the credit limit zero when client identification
has not been verified. So which constraint would you check to accomplish this task?

A. ((CreditLimt = 0 AND Verified = 0) OR (CreditLimt BETWEEN 1 AND 10000 AND Verified = 1))
B. (CreditLimt BETWEEN 1 AND 10000)
C. (Verified = 1 AND CreditLimt BETWEEN 1 AND 10000)
D. ((CreditLimt = 0 AND Verified = 0) AND (CreditLimt BETWEEN 1 AND 10000 AND Verified =
1))
E. ((Verified = 1 AND CreditLimt BETWEEN 1 AND 10000) AND (CreditLimt BETWEEN 1 AND
10000
AND Verified = 1))

Answer: A

Question: 32
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. A table that has the
GPS location of clients stored is being created to meet the business needs. Now you are asked to
make sure that the table allows you the following issues:

1. Calculate the distance between a client and the nearest store.


2. Identify clients within a specified sales boundary.

So of the data type below, which one would be used?

A. Nvarchar(max) would be used


B. Varbinary(max) FILESTREAM would be used.
C. Algebra would be used
D. Geometry would be used.

Answer: D

Page 13 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

Question: 33
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You have two tables
respectively named Bills and BillItems as shown as the following:
From the table we can see the BillItems is related to Bills by a foreign key that enables
CASCADE
DELETE.
Now you are asked to have all records removed from the Bills table.
Of the Transact-SQL statements below, which one would be used?

A. DROP FROM BillItems statement would be used


B. DROP TABLE Bills statement would be used
C. DELETE FROM Bills statement would be used
D. TRUNCATE TABLE Bills statement would be used.
E. DELETE FROM BillItems statement would be used.

Answer: C

Question: 34
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses
SQL Server 2008 and all the company data is stored in the SQL Server 2008 database. There
are two tables in the database. The two tables are respectively named Client and SellingsOrder.
There are Clients who has have never made any orders and Clients who only made purchases
with an OrderTotal less than 90. Now the company manager wants to view the list of these
Clients. So you have to identify all these Clients. Of the following options, which query should be
used?

A. SELECT *FROM ClientWHERE 100 > (SELECT MAX(OrderTotal) FROM SellingsOrder


WHERE
Client.ClientID = SellingsOrder.ClientID)
B. SELECT *FROM ClientWHERE 100 > ALL (SELECT OrderTotal FROM SellingsOrder
WHERE
Client.ClientID = SellingsOrder.ClientID)
C. SELECT *FROM ClientWHERE 100 > SOME (SELECT OrderTotal FROM SellingsOrder
WHERE
Client.ClientID = SellingsOrder.ClientID)
D. SELECT *FROM ClientWHERE EXISTS (SELECT SellingsOrder.ClientID FROM
SellingsOrder
WHERE Client.ClientID = SellingsOrder.ClientID AND
SellingsOrder.OrderTotal <= 100)

Answer: B

Question: 35
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You have two tables
respectively named Clients and Bills. According to the business requirements, a list of each
Client's name and number of bills should be produced for clients that have placed at least one
Bill. Which query should be used to achieve this goal?

Page 14 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

A. SELECT c.ClientName, SUM(o.BillID) AS [BillCount] FROM Clients c JOIN Bills o ON


c.ClientID =
o.ClientID GROUP BY c.ClientName HAVING COUNT(o.BillID) > 1
B. SELECT c.ClientName, COUNT(o.BillId) AS [BillCount] FROM Clients c JOIN Bills o ON
c.ClientId =
o.ClientId GROUP BY c.ClientName
C. SELECT c.ClientName, SUM(o.BillID) AS [BillCount] FROM Clients c JOIN Bills o ON
c.ClientID =
o.ClientID GROUP BY c.ClientName
D. SELECT COUNT(o.BillId) AS [BillCount] FROM CLIENTS c JOIN BILLS o ON c.CLIENTID =
o.CLIENTID
E: SELECT c.ClientName, COUNT(o.BillID) AS [BillCount] FROM Clients c JOIN Bills o ON
c.ClientID =
o.ClientID GROUP BY c.ClientName HAVING COUNT(o.BillID) > 1

Answer: B

Question: 36
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. Now you are asked to use a code
segment to have the value 2.85 rounded to the nearest whole number, which code segment
would you select?

A. You would select ROUND (2.85, 1)


B. You would select ROUND (2.85, 0)
C. You would select ROUND (2.85, 2)
D. You would select ROUND (2.85, 1.0)
E. You would select ROUND (2.85, 2.0)

Answer: B

Question: 37
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. You have a table named Staff.
In order to identify the supervisor that each staff reports to, you write the following query:
SELECT e.StaffName AS [StaffName],
s.StaffName AS [SuperVisorName]
FROM Staff e Now you are asked to make sure that a list of all staff and their respective
supervisor is returned by the query. So of the following join clauses, which one would be used to
complete the query?

A. LEFT JOIN Staff s ON e.StaffId = s.StaffId would be used to complete the query
B. INNER JOIN Staff s ON e.ReportsTo = s.StaffId would be used to complete the query.
C. LEFT JOIN Staff s ON e.ReportsTo = s.StaffId would be used to complete the query
D. RIGHT JOIN Staff s ON e.ReportsTo = s.StaffId would be used to complete the query
E. INNER JOIN Staff s ON e.StaffId = s.StaffId would be used to complete the query

Answer: C

Question: 38
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You have two tables
respectively named:
Sales and SaleAlters

Page 15 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

Sales
SaleID 1 2 3 4
SaleName SaleA SaleB SaleC SaleD
VendorID 0 1 1 0
SaleAlters
SaleID 1 2 3 5
SaleName SaleA SaleB SaleC SaleE
VendorID 1 1 2 1
Then you execute the statement as the following:
MERGE Sales USING SaleAlters ON (Sales.SaleID = SaleAlters.SaleID)
WHEN MATCHED AND Sales.VendorID = A THEN DELETE
WHEN MATCHED THEN UPDATE SET Sales.SaleName = SaleAlters.SaleName
Sales.VendorID = SaleAlters.VendorID;

In order to identify the rows that will be displayed in the Sales table, which rows do you display?

A. SaleID 1 2 3 5
SaleName SaleA SaleB NewSaleC SaleE
VendorID 1 1 2 1
B. SaleID 1 2 3 4 5
SaleName SaleA SaleB NewSaleC SaleD SaleE
VendorID 1 1 2 0 1
C. SaleID 2 3
SaleName SaleB NewSaleC
VendorID 1 2
D. SaleID 2 3 4
SaleName SaleB NewSaleC SaleD
VendorID 1 2 0

Answer: D

Question: 39
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You have a table
named Sale. According to the business requirements, the sale prices should be increased by 15
percent for only the vendor named Hope Food shop, and then a list of the sales and updated
prices should be returned. So which code segment would be used to achieve this goal?

A. UPDATE Sale SET Price = Price * 1.15 SALE inserted.SaleName, inserted.Price WHERE
Sale.VendorName = ' Hope Food shop ' would be used to achieve this goal
B. UPDATE Sale SET Price = Price * 1.15, WHERE Sale.VendorName = ' Hope Food shop '
SALE
inserted.SaleName, inserted.Price would be used to achieve this goal.
C. UPDATE Sale SET Price = Price * 1.15, SaleName = SaleName WHERE Sale.VendorName =
' Hope Food shop ' would be used to achieve this goal
D. UPDATE Sale SET Price = Price * 1.15 SALE inserted.SaleName, deleted.Price WHERE
Sale.VendorName = ' Hope Food shop ' would be used to achieve this goal
E. UPDATE Sale SET Price = Price * 1.15 SaleName = SaleName
inserted.Price WHERE Sale.VendorName = ' Hope Food shop ' would be used to achieve this
goal.

Answer: A

Question: 40

Page 16 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You have two tables
and they are respectively named SalesMan and SalesZone. According to the business
requirements, you should use a Cartesian product that contains the data from the SalesMan and
SalesZone tables to create sample data. So of the following code segments, which one would be
used to achieve this goal?

A. SELECT p.SalesmanId, t.Name AS [Saleszone] FROM Sales.Salesman p CROSS JOIN


Sales.Saleszone t would be used to achieve this goal.
B. SELECT p.SalesmanId, t.Name AS [Saleszone] FROM Sales.Salesman p FULL JOIN
Sales.Saleszone t
ON p. SaleszoneId = t. SaleszoneId would be used to achieve this goal.
C. SELECT p.SalesmanId, t.Name AS [Saleszone] FROM Sales.Salesman p INNER JOIN
Sales.Saleszone t
ON p. SaleszoneId = t. SaleszoneId would be used to achieve this goal.
D. SELECT p.SalesmanId, t.Name AS [Saleszone] FROM Sales.Salesman p CROSS JOIN
Sales.Saleszone t
WHERE p. SaleszoneId = t. SaleszoneId would be used to achieve this goal

Answer: A

Question: 41
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You have two tables
and they are respectively named Clients and Bills. According to the business requirements, data
of 30 days ago should be moved from Clients into Bills. Which code segment below would be
used to achieve this goal?

A. INSERT INTO Bill SELECT * FROM Client WHERE RecordDate < DATEADD(D,-
30,GETDATE()) would be used to achieve this goal.
B. INSERT INTO Bill SELECT * FROM Client WHERE RecordDate < DATEADD(D,-
30,GETDATE())
DELETE FROM Client would be used to achieve this goal
C. DELETE FROM Client OUTPUT deleted.* WHERE RecordDate < DATEADD(D,-
30,GETDATE()) would be used to achieve this goal.
D. DELETE FROM Client OUTPUT DELETED.* INTO Bill WHERE RecordDate <
DATEADD(D,-30,GETDATE()) would be used to achieve this goal

Answer: D

Question: 42
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You are writing a
query, which returns a list of sales that have grossed more than $10,000.00 during the year 2007.
Meanwhile, the filter expression of SUM ([Order Details].Unit Price * [Order Details].Quantity) >
10000 should be inserted into the query. Of the clauses below, which one should be inserted into
this expression?

A. WHERE clause should be inserted into this expression


B. HAVING clause should be inserted into this expression
C. GROUP BY clause should be inserted into this expression
D. ON clause should be inserted into this expression

Page 17 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

E. WHEN clause should be inserted into this expression

Answer: B

Question: 43
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. The following table is
named Products and the products data ordered by date of product and client name should be
returned. You should give each client a list of the most recent product at the first time. So of the
queries below, which one would be used?

A. SELECT ClientName, ProductsDate FROM Products ORDER BY ClientName, ProductsDate


DESC;
B. SELECT ClientName, ProductsDate FROM Products ORDER BY ClientName DESC;
C. SELECT ClientName, ProductsDate FROM Products ORDER BY ClientName DESC;
ProductsDate;
D. SELECT ClientName, ProductsDate FROM Products ORDER BY ClientName, ProductsDate;
E. SELECT ClientName, ProductsDate FROM Products ORDER BY ProductsDate DESC,
ClientName

Answer: A

Question: 44
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. Now with a given
clause, you need to identify whether February will contain 29 days for a specified year. Which
object should be used to achieve this goal?

A. Table-valued function should be used to achieve this goal


B. Scalar-valued function should be used to achieve this goal.
C. DML trigger should be used to achieve this goal.
D. DDL trigger should be used to achieve this goal
E. Stored procedure should be used to achieve this goal

Answer: B

Question: 45
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Your company utilizes
an application. The application uses stored procedures to pass XML to the database server.
There are large quantities of XML handles that are currently active in the database server. Since
the XML is not being cleared from SQL Server memory, you have to choose the system stored
procedure to flush the XML. Of the following Transact-SQL statements, which one should be
used?

A. sp_reserve_http_namespace
B. sp_xml_removedocument
C. sp_xml_preparedocument
D. sp_delete_http_namespace_reservation

Answer: B

Page 18 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

Question: 46
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. Data is inserted
directly into a table by a third-party application. Then in order to meet the business needs, two
new columns are added to the table, which cannot use default constraints or accept NULL values.
So what action should you perform to make sure that the third-party application is not broken by
the new columns?

A. You should have a DDL trigger created


B. You should have a DML trigger created.
C. You should have an INSTEAD OF INSERT trigger created
D. You should have an AFTER INSERT trigger created.
E. You should have a stored procedure created

Answer: C

Question: 47
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. There is a transaction
using the repeatable read isolation level. After using the repeatable read isolation level, you find it
causes blocking problems frequently. Now you are assigned the following tasks:

1. Reduce blocking.
2. Avoid dirty reads.
3. Avoid non-repeatable reads.
So which transaction isolation level should be used to accomplish these tasks above?

A. READ COMMITTED should be used to accomplish these tasks above


B. READ UNCOMMITTED should be used to accomplish these tasks above
C. SNAPSHOT should be used to accomplish these tasks above.
D. SERIALIZABLE should be used to accomplish these tasks above
E. READ-Only COMMITTED should be used to accomplish these tasks above

Answer: C

Question: 48
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You have many tables
in your database. What action would you perform to make sure that tables are not dropped from
your database?

A. You should have a DML trigger that contains COMMIT created.


B. You should have a DDL trigger that contains ROLLBACK created
C. You should have a DML trigger that contains ROLLBACK created
D. You should have a DDL trigger that contains COMMIT created
E. You should have a XML trigger that contains ROLLBACK created
F. You should have a XML trigger that contains COMMIT created

Answer: B

Question: 49

Page 19 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. TRY...CATCH error
handling is being used to raise an error that will pass control to the CATCH block. So of the
severity level below, which one would be used?

A. 0 level would be used.


B. 9 level would be used
C. 10 level would be used
D. 16 level would be used.
E. 18 level would be used

Answer: D

Question: 50
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. Now a function that
references a table is being created to meet the business needs. In order to have the table
prevented from being dropped, which option would be used when the function is created?

A. WITH SCHEMABINDING would be used when the function is created


B. WITH RETURNS NULL ON NULL INPUT would be used when the function is created
C. WITH ENCRYPTION would be used when the function is created
D. WITH EXECUTE AS would be used when the function is created

Answer: A

Question: 51
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. Now according to the
order of your manager, a stored procedure that accepts a table-valued parameter named
@Clients should be created.
So of the code segments below, which one would be used?

A. CREATE PROCEDURE AddClients (@Clients ClientType OUTPUT) would be used


B. CREATE PROCEDURE AddClients (@Clients varchar(max)) would be used.
C. CREATE PROCEDURE AddClients (@Clients Client READONLY) would be used
D. CREATE PROCEDURE ADDCLIENTS (@Clients varchar (max))ASEXTERNAL NAME
Client.Add.NewClient would be used.

Answer: C

Question: 52
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. In your database,
there is a single CLR assembly, which only references blessed assemblies from the Microsoft.
External resources are not accessed by the NET Framework. Now you are assigned a task to
deploy this assembly to meet the following needs:

1. Use the minimum required permissions.


2. Make sure the security of your database.

Page 20 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

What would you do?

A. You would set PERMISSION_SET = UNSAFE TRUSTWORTHY ON


B. You would set PERMISSION_SET = UNSAFE TRUSTWORTHY OFF
C. You would set PERMISSION_SET = SAFE TRUSTWORTHY ON
D. You would set PERMISSION_SET = SAFE TRUSTWORTHY OFF
E. You would set PERMISSION_SET = EXTERNAL_ACCESS TRUSTWORTHY OFF

Answer: D

Question: 53
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. Now your manager
asks you to capture the execution plan for a query. So which statement as the following would be
used to achieve this goal?

A. SET STATISTICS IO ON statement would be used to achieve this goal


B. SET STATISTICS TIME ON statement would be used to achieve this goal
C. SET FORCEPLAN ON statement would be used to achieve this goal
D. SET SHOWPLAN_XML ON statement would be used to achieve this goal
E. SET FORCEPLAN TIME ON statement would be used to achieve this goal

Answer: D

Question: 54
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. After running the
database server, you find that it has a slow response to queries.
In order to make the server response normally, you have the following dynamic management
views (DMV) query run on the server.

SELECT TOP (10) wait_type, wait_time_ms FROM sys.dm_os_wait_stats ORDER BY


wait_time_ms
DESC;
After a long time, a top wait type of SOS_SCHEDULER_YIELD was returned to the query.
Now you are asked to find out the reason to cause the slow response.
So what should you do first?

A. First you should investigate Memory


B. First you should investigate Network
C. First you should investigate CPU
D. First you should investigate Disk
E. First you should investigate SQL

Answer: C

Question: 55
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. Now according to the
order of your manager, you are analyzing a workload by using the Database Engine Tuning
Advisor (DTA). So of the commands below, which one would be used to save the
recommendations generated by the DTA?

Page 21 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

A. The command of importing Session Definition


B. The command of exporting Session Definition
C. The command of importing Workload Table
D. The command of exporting Workload Table
E. The command of previewing Workload Table.
F. The command of exporting Session Results

Answer: F

Question: 56
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Now you company
appoints you to serve for a charity organization which is named AngelPlan. According to the
requirement of the charity organization, they want to view the highest 100 different amounts that
were donated. So you are writing a query to list the 100 amounts. You have written the code
segment below. (Line numbers are used for reference only):

1 SELECT *
2 FROM (SELECT Customer.CustomerID, SUM(TotalDue) AS TotalGiven,
3
4 FROM Customer
5 JOIN SalesOrder
6 ON Customer.CustomerID = SalesOrder.CustomerID
7 GROUP BY Customer.CustomerID) AS DonationsToFilter
8 WHERE FilterCriteria <= 100

In order to complete the query, you have to insert a Transact-SQL clause in line 3
Which Transact-SQL clause should be inserted?

A. ROW_NUMBER() OVER (ORDER BY SUM(TotalDue) DESC) AS FilterCriteria


B. DENSE_RANK() OVER (ORDER BY SUM(TotalDue) DESC) AS FilterCriteria
C. RANK() OVER (ORDER BY SUM(TotalDue) DESC) AS FilterCriteria
D. NTILE(100) OVER (ORDER BY SUM(TotalDue) DESC) AS FilterCriteria

Answer: D

Question: 57
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. Now you are assigned
a task to use the Database Engine Tuning Advisor (DTA) to capture and record a workload for
analysis. Of the tools below, which one would you choose?

A. You would choose SQL Server Profiler


B. You would choose XML utility
C. You would choose Performance Monitor
D. You would choose DTA utility
E. You would choose Activity Monitor

Answer: A

Question: 58

Page 22 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. According to the work
requirement, SQL Server Profiler is being used to collect deadlock information. So of the following
events, which one would be used to capture an XML description of a deadlock?

A. Lock:Deadlock Chain would be used to capture an XML description of a deadlock


B. Deadlock Graph would be used to capture an XML description of a deadlock
C. Deadlock XML would be used to capture an XML description of a deadlock
D. Lock:Deadlock would be used to capture an XML description of a deadlock
E. Showplan XML would be used to capture an XML description of a deadlock

Answer: B

Question: 59
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. Goods information is
contained in the XML document as the following:

ECLARE @GoodsList xml ='


<GoodsList xmlns="urn:Wide_World_Importers/schemas/Goods">
<Goods Name="GoodsA" Category="clothes" Price="15.1" />
<Goods Name="GoodsB" Category="Gas" Price="3.5" />
<Goods Name="GoodsC" Category="Stationary" Price="2.1" />
...
</GoodsList>';
Now your manager asks you to return a list of Goods including the following information: The
Goods
Name;
Price of each Goods;
The Category;
So which query would be used to return the list?

A. SELECT Goods.value('@Name','varchar(100)'), Goods.value('@Category','varchar(20)'),


Goods.value('@Price','money') FROM @GoodsList.nodes('/GoodsList/Goods')
GoodsList(Goods);
B. SELECT Goods.value('Name[1]','varchar(100)'), Goods.value('Category[1]','varchar(20)'),
Goods.value('Price[1]','money') FROM @GoodsList.nodes('/o:GoodsList/o:Goods')
GoodsList(Goods) WITH XMLNAMESPACES(DEFAULT
'urn;Wide_World_Importers/schemas/Goods' as
o);
C. SELECT Goods.value('./@Name','varchar(100)'), Goods.value('./@Category','varchar(20)'),
Goods.value('./@Price','money') FROM @GoodsList.nodes('/GoodsList/Goods')
GoodsList(Goods) WITH XMLNAMESPACES(DEFAULT
'urn:Wide_World_Importers/schemas/Goods');
D. SELECT Goods.value('.[1]/@Name','varchar(100)'),
Goods.value('.[1]/@Category','varchar(20)'),
Goods.value('.[1]/@Price','money') FROM @GoodsList.nodes('/GoodsList/Goods')
GoodsList(Goods);

Answer: C

Question: 60

Page 23 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. According to the
business needs, an XML schema must be used to validate XML data in your database.
So of the following code segments, which one would be used to store this XML schema?

A. CREATE XML SCHEMA COLLECTION ClientSchema would be used to store this XML
schema
B. CREATE DEFAULT XML INDEX ClientSchema would be used to store this XML schema
C. CREATE SCHEMA ClientSchema would be used to store this XML schema
D. CREATE DEFAULT ClientSchema AS 'XML' would be used to store this XML schema
E. CREATE PRIMARY XML INDEX ClientSchema would be used to store this XML schema.

Answer: A

Question: 61
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. A table named Client
has an XML column named Places, which has an XML fragment with details of one or more
places stored. You can see it from the following examples:

<Place City="Tokyo" Address="..." PhoneNumber="..." />


<Place City="Ohio" Address="..." PhoneNumber="..." />
<Place City="Paris" Address="..." PhoneNumber="..." />

Now you are assigned a task to write a query that returns a row for each of the client's places to
meet the following needs:

Each resulting row includes an XML fragment that contains the place details.
Each resulting row includes the city.
Each resulting row includes the client name.
So which query would be used to accomplish this task?

A. You should use the query that SELECT ClientName


Places.query('data(/Place/@City)'), Places.query('/Place') FROM Client
B. You should use the query that SELECT ClientName, Places.query('for $i in /Place return
data($i/@City)'),
Places.query('for $i in /Place return $i') FROM Client.
C. You should use the query that SELECT ClientName, Loc.value('@City','varchar(100)'),
Loc.query('.')
FROM Client CROSS APPLY Client.Places.nodes ('/Place') Locs(Loc)
D. You should use the query that SELECT ClientName, Places.query('for $i in /Place return
element Place
{$i/@City, $i}') FROM Client

Answer: C

Question: 62
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL server 2008 database. You have two tables
named Clients and Bills. Bills table is related to the Clients table on the ClientID by a foreign key
constraint. Now according to the requirement of your manager, the XML structure that contains all
clients and their related bills should be generated as the following:

Page 24 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

<Root>
<Client>
<ClientName>Client1</ClientName>
<Bills>
< Bill ><BillDate>1/1/2008</BillDate><BillValue>422</BillValue></Bill>
<Bill><BillDate>4/8/2008</BillDate><BillValue>300</BillValue></Bill>
...
</Bills>
...
</Client>
<Root>

So of the following queries, which one should you choose to meet your manager??s
requirement?

A. SELECT ClientName, (SELECT BillDate, BillValue FROM Bills FOR XML PATH('Bill')) FROM
Clients
FOR XML PATH('Client'), ROOT('Root'), TYPE
B. SELECT ClientName, (SELECT BillDate, BillValue FROM Bills WHERE Bills.ClientId =
Clients.ClientId FOR XML PATH('Bill'), TYPE) Bills FROM Clients FOR XML
PATH('Client'), ROOT('Root')
C. SELECT ClientName, BillDate, BillValue FROM Clients c JOIN Bills o ON o.ClientID =
c.ClientID FOR
XML AUTO, TYPE
D. SELECT * FROM (SELECT ClientName, NULL AS BillDate, NULL AS BillValue FROM Clients
UNION ALL SELECT NULL, BillDate, BillValue
FROM Bills) ClientBills FOR XML AUTO, ROOT('Root')

Answer: B

Question: 63
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. Now you are
checking query performance on SQL Server 2008. According to the requirement of the company
CIO, you have to use Transact-SQL to create an estimated execution plan. The plan should be
able to be viewed graphically in SQL Server Management Studio. You must make sure that the
execution plan can be saved as a .sqlplan file. Of the following Transact-SQL settings, which one
should you use?

A. SET SHOWPLAN_XML ON;


B. SET SHOWPLAN_ALL ON;
C. SET STATISTICS PROFILE ON;
D. SET STATISTICS XML ON;

Answer: A

Question: 64
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There's a table which
is named Commodities in the database. The Commodities table has a column which is named
Shape. Now you have got an order from your company manager, according to his requirement,
you have to calculate the percentage of commodities of each commodity shape. So a Transact-

Page 25 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

SQL statement has to be written to perform this task. Of the following Transact-SQL statement,
which one should be used?

A. SELECT Shape, (COUNT(*) * 1.0)/ COUNT(*) OVER() AS PercentShapeFROM


CommoditiesGROUP
BY Shape;
B. SELECT Shape COUNT(*) * 1.0) / COUNT(*) OVER(PARTITION BY Shape) AS
PercentShapeFROM
CommoditiesGROUP BY Shape;
C. SELECT Shape COUNT(*) OVER(PARTITION BY Shape) / (COUNT(*) * 1.0) AS
PercentShapeFROM
CommoditiesGROUP BY Shape;
D. SELECT Shape COUNT(*) OVER() / (COUNT(*) * 1.0) AS PercentShape / (COUNT(*) * 1.0)
AS
PercentShapeFROM CommoditiesGROUP BY Shape;

Answer: A

Question: 65
You are a database developer and you have many years experience in database development.
Now you are employed in a company which is named Loxgo. The company uses SQL Server
2008 and all the company data is stored in the SQL Server 2008 database. There are two tables
in the database. The two tables are respectively named Selling.SellingOrderTittle and
People.People. Now you get an e-mail from your company, in the e-mail, you have been
assigned a task that you have to write a query. The query should return SellingsOrderID and
SellingsPeopleName that have an OrderDate greater than 20040101. SellingsPeopleName
should be made up by concatenating the columns named FirstName and LastName from the
table named People.People. A query should be written to return data which is sorted in
alphabetical order, by the concatenation of FirstName and LastName.
Of the following Transact-SQL statements, which one should be used?

A. SELECT SellingsOrderID, FirstName +' ' + LastName as SellingsPeopleNameFROM


Sellings.SellingsOrderHeader HJOIN People.People P on P.BusinessEntityID =
H.SellingsPeopleIDWHERE
OrderDate > '20040101'ORDER BY SellingsPeopleName ASC
B. SELECT SellingsOrderID, FirstName + ' ' + LastName as SellingsPeopleName FROM
Sellings.SellingsOrderHeader HJOIN People.People P on P.BusinessEntityID =
H.SellingsPeopleIDWHERE OrderDate > '20040101'ORDER BY SellingsPeopleName DESC
C. SELECT SellingsOrderID, FirstName + ' ' + LastName as SellingsPeopleName FROM
Sellings.SellingsOrderHeader HJOIN People.People P on P.BusinessEntityID =
H.SellingsPeopleIDWHERE OrderDate > '20040101'ORDER BY FirstName ASC, LastName
ASC
D. SELECT SellingsOrderID, FirstName + ' ' + LastName as SellingsPeopleName FROM
Sellings.SellingsOrderHeader HJOIN People.People P on P.BusinessEntityID =
H.SellingsPeopleIDWHERE OrderDate > '20040101'ORDER BY FirstName DESC, LastName
DESC

Answer: A

Question: 66
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day Compnay.com asks you how long you have been using
and configuring any version of microsoft sql server.

Page 26 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

What should your reply be?

A. you should inform Compnay.com that you have 3-8 months experience.
B. you should inform Compnay.com that you have no experience.
C. you should inform Compnay.com that you have 1 year experience.
D. you should inform Compnay.com that you have 3-4 years experience.

Answer: B

Question: 67
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database containing two tables named product and wasdeleted. during the course of the day you
receive instruction from Compnay.com to prevent products from being deleted if the products
belong to kit by ensuring that the delete does not occur and the wasdeleted column for the row
should be changed to 'true'. you later decided to write the transact-sql trigger shown below:
update p
set wasdeleted = 1
from productpart pp
join deleted d on pp.productid = d.productid
join part p on pp.productid = p.productid;
delete from p
from part p
join deleted d on p.productid = d.productid
left outer join productpart pp on p.productid = pp.productid
where pp.productid is null;
What should you do?

A. you should consider making use of the trigger statement below:


create trigger tr_productpart_d on productpart
instead of delete as
begin
...
end
B. you should consider making use of the trigger statement below:
create trigger tr_product_d on product
instead of delete as
begin
...
end
C. you should consider making use of the trigger statement below:
create trigger tr_productpart_d on productpart
after delete as
begin
...
end
D. you should consider making use of the trigger statement below:
create trigger tr_product_d on product
after delete as
begin
...
end

Answer: B

Page 27 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

Question: 68
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which is accessed using an application with windows authentication by customers
around the worlD. during the course of the day you receive instruction from Compnay.com to
ensure that the system and user-defined error messages are displayed in the localized language
of the customers around the world.
What should you do? (choose two)

A. you should consider making use of the "set language" option of sp_configure.
B. you should consider making use of the default language for each login.
C. you should consider making use of the @lang parameter of sp_addmessage.
D. you should consider making use of the @@language function.

Answer: B, C

Question: 69
You work as a network database administrator at Compnay.com in london. The Compnay.com
network currently makes use of microsoft sql server 2008 as their database management
solution. Compnay.com currently makes use of a database server named -db01 hosting the
inventory database containing a table named new.product.development which contains a column
named e-address. during the course of the day you receive instruction from Compnay.com to
have a transact-sql stamen written to create a report which returns valid ".com" e-mail addresses
which has a minimum of one character before the @ sign, one character after the @ sign and
before the ".com" from the new.product.development table.
What should you do?

A. you should consider making use of the transact-sql statement below:


select * from new.product.development
where e-address like '_%@_%.com'
B. you should consider making use of the transact-sql statement below:
select * from new.product.development
where e-address like '%@%.com'
C. you should consider making use of the transact-sql statement below:
select * from new.product.development
where e-address like '%@%[.]com'
D. you should consider making use of the transact-sql statement below:
select * from new.product.development
where e-address like '_%@_.com'

Answer: A

Question: 70
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day you are approached by the management team and asked
what your level of experience is developing databases making use of microsoft sql server 2008.
What would your reply be?

A. you should inform Compnay.com that you have not done before.
B. you should inform Compnay.com that you have less than 6 months experience.
C. you should inform Compnay.com that you have1-2 years experience.

Page 28 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

D. you should inform Compnay.com that you have 3-6 months experience.
E. you should inform Compnay.com that you have 3-4 years experience.

Answer: A

Question: 71
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which contains a table named dbo.inventory. during the course of the day you receive
instruction from Compnay.com to have different views developed to view the dbo.inventory table
used by a specific region named kingregion to update, insert and delete rows whilst ensuring the
specific region are only able to insert, delete and update rows in their specific region.
What should you do?

A. you should consider making use of the code segment below to create the view:
create view dbo.kingregioninventory
as
select inventoryid,orderqty,salespersonid,kingregionid
from dbo.inventory
where kingregionid = 1
with check option;
B. you should consider making use of the code segment below to create the view:
create view dbo.kingregioninventory
with view_metadata
as
select inventoryid,orderqty,salespersonid,kingregionid
from dbo.inventory
where kingregionid = 1;
C. you should consider making use of the code segment below to create the view:
create view dbo.kingregioninventory
as
select inventoryid,orderqty,salespersonid,kingregionid
from dbo.inventory
where kingregionid = 1;
D. you should consider making use of the code segment below to create the view:
create view dbo.kingregioninventory
with schemabinding
as
select inventoryid,orderqty,salespersonid,kingregionid
from dbo.inventory
where kingregionid = 1;

Answer: A

Question: 72
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which has a transaction which uses the repeatable read isolation level which causes
blocking problems. during the course of the day you receive instruction from Compnay.com to
have the blocking reduced whilst ensuring that you avoid dirty reads and non-repeatable reads.
What should you do?

A. you should consider making use of the read uncommitted transaction isolation level.

Page 29 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

B. you should consider making use of the read committed transaction isolation level.
C. you should consider making use of the snapshot transaction isolation level.
D. you should consider making use of the serializable transaction isolation level.

Answer: C

Question: 73
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database. during the course of the day you receive instruction from Compnay.com to have the
blocking behavior analyzed for the query below:
set transaction isolation level serializable
with clients as (
select *
from clients ),
salestotal as (
select clientid, sum(ordertotal) as allordertotal
from inventoryorder)
select clientid, allordertotal
from inventorytotal
where allordertotal > 10000.00;
Compnay.com has additionally requested that you verify whether other queries using the clients
table would be blocked by the query whilst ensuring if the query will be blocked by other queries
using the inventory table.
What would the result be?

A. the result of the analyzing would have the other queries blocked by this query.
the result of the analyzing would not have the query blocked by the other queries.
B. the result of the analyzing would not have the other queries blocked by this query.
the result of the analyzing would not have the query blocked by the other queries.
C. the result of the analyzing would not have the other queries blocked by this query.
the result of the analyzing would have the query blocked by the other queries.
D. the result of the analyzing would have the other queries blocked by this query.
the result of the analyzing would have the query blocked by the other queries.

Answer: B

Question: 74
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database. during the course of the day you receive instruction from Compnay.com to troubleshoot
query performance on -sr01. you later decided to have the profiler trace data in a table named
perfdatA. Compnay.com has additionally requested that you determine which events take longer
that one seconds of cpu time to run for more than two seconds.
What should you do?

A. you should consider making use of the transact-sql statement:


select textdata, duration, cpu
from perfdata
where eventclass = 12 and
( cpu > 1000000 or
duration > 2000 )
B. you should consider making use of the transact-sql statement:

Page 30 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

select textdata, duration, cpu


from perfdata
where eventclass = 12 and
( cpu > 1000 or
duration > 2000 )
C. you should consider making use of the transact-sql statement:
select textdata, duration, cpu
from perfdata
where eventclass = 12 and
( cpu > 1000000 or
duration > 2000000 )
D. you should consider making use of the transact-sql statement:
select textdata, duration, cpu
from perfdata
where eventclass = 12 and
( cpu > 1000 or
duration > 2000000 )

Answer: D

Question: 75
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database containing the product table. during the course of the day you receive instruction from
Compnay.com to have the product data returned ordered by the vendor name and date of
product release whilst ensuring the vendors latest release is listed first. what should you do?

A. you should consider making use of the query below:


select vendorname,
productdate
from products
order by vendorname desc;
B. you should consider making use of the query below:
select vendorname,
productdate
from products
order by vendorname,
productdate;
C. you should consider making use of the query below:
select vendorname,
productdate
from products
order by vendorname,
productdate desc;
D. you should consider making use of the query below:
select vendorname,
productdate
from products
order by productdate desc,
vendorname;

Answer: C

Question: 76

Page 31 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

You work as a network database administrator at Compnay.com in london. The Compnay.com


network currently makes use of microsoft sql server 2008 as their database management
solution. Compnay.com currently makes use of a database server named -db01 hosting the
inventory database containing two tables named product and orders. during the course of the day
you receive instruction from Compnay.com to have a list produced which would return the product
name and order quantity for consumers placing at least one order.
What should you do?

A. you should consider making use of the query below:


select c.productname,
count(o.productid) as [ordercount]
from product c
join orders o
on c.productid = o.productid
group by c.productname
B. you should consider making use of the query below:
select c.productname,
sum(o.orderid) as [ordercount]
from product c
join orders o
on c.productid = o.productid
group by c.productname
C. you should consider making use of the query below:
select count(o.orderid) as [ordercount]
from product c
join orders o
on c.productid = o.productid
D. you should consider making use of the query below:
select c.productname,
count(o.orderid) as [ordercount]
from product c
join orders o
on c.productid = o.productid
group by c.productname
having count(o.orderid) > 1

Answer: A

Question: 77
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which contains a table named products containing the column named kingcolor. during
the course of the day you receive instruction from Compnay.com to have a transact-sql statement
written which would calculate the percentage of products of each color for a company named
weyland industries.
What should you do?

A. you should consider making use of the transact-sql statement below:


select color
count(*) over() / (count(*) * 1.0) as percentcolor
/ (count(*) * 1.0) as percentcolor
from products
group by color;
B. you should consider making use of the transact-sql statement below:

Page 32 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

select color
count(*) over(partition by color)
/ (count(*) * 1.0) as percentcolor
from products
group by color;
C. you should consider making use of the transact-sql statement below:
select color
count(*) * 1.0) / count(*) over(partition by color) as percentcolor
from products
group by color;
D. you should consider making use of the transact-sql statement below:
select color, (count(*) * 1.0)/ count(*) over() as percentcolor
from products
group by color;

Answer: D

Question: 78
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which has an inventory table with a full-text catalog and contains the productname and
description columns. Compnay.com has additionally used a full-text thesaurus to expand
common product terms. during the course of the day you receive instruction from
Compnay.com to have a full-text query developed which will match only the exact word in the
search as well as the meaning.
What should you do?

A. you should consider making use of the transact-sql statement below:


select * from inventory
where description like '%product%'
B. you should consider making use of the transact-sql statement below:
select * from inventory
where freetext (*, 'product'))
C. you should consider making use of the transact-sql statement below:
select * from inventory
where contains (*, 'formsof(inflectional, product)')
D. you should consider making use of the transact-sql statement below:
select * from inventory
where contains (*, 'product')

Answer: B

Question: 79
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database. during the course of the day you receive instruction from Compnay.com to create a
batch containing multiple update statements modifying existing inventory which will be placed into
an explicit transaction. Compnay.com has additionally requested that you set the option at the
beginning of the transaction to roll back all changes when updates in the transaction fail.
What should you do?

A. you should consider having the remote_proc_transactions option enabled.


B. you should consider having the implicit_transactions option enabled.

Page 33 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

C. you should consider having the arithabort option enabled.


D. you should consider having the xact_abort option enabled.

Answer: D

Question: 80
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which is used to store vendor product prices. during the course of the day you receive
instruction from Compnay.com to have the listed prices increased by 35.00 for the vendor
weyland industries.
What should you do?

A. you should consider making use of the query below:


update inventory.product
set listprice = listprice + 35.00
where vendorid in (select vendorid
from purchasing.vendor
where vendorname = 'weyland industries');
B. you should consider making use of the query below:
update inventory.product
set listprice = listprice + 35.00
where vendorid not in (select vendorid
from purchasing.vendor);
where vendorname = 'weyland industries');
C. you should consider making use of the query below:
update inventory.product
set listprice = listprice + 35.00
where exists (select vendorid
from purchasing.vendor
where vendorname = 'weyland industries');
D. you should consider making use of the query below:
update inventory.product
set listprice = listprice + 35.00
where not exists (select vendorid
from purchasing.vendor);
where vendorname = 'weyland industries');

Answer: A

Question: 81
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. Compnay.com additionally created a full-text catalog named kingcatalog which
contains the kininventory index on the product table. during the course of the day Compnay.com
decided to insert a couple of new products into the inventory tablE. during your maintenance you
discovered that only some of the added products are included in the results of the full-text
searches. you additionally verified that the row does indeed exist in the products table.
Compnay.com now wants you to have the full-text catalog updated ensuring the least amount of
administrative time is spent.
What should you do?

A. you should consider making use of the transact-sql statement below:

Page 34 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

alter fulltext catalog kingcatalog rebuild


B. you should consider making use of the transact-sql statement below:
alter fulltext index on kinginventory
start update population
C. you should consider making use of the transact-sql statement below:
alter fulltext index on kinginventory
resume population
D. you should consider making use of the transact-sql statement below:
alter fulltext index on kinginventory
start full population

Answer: B

Question: 82
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which contains a table named dbo.products. during the course of the day you receive
instruction from Compnay.com to have five rows inserted into the dob.products table whilst
ensuring that the productid returned for each of the rows have been inserted.
What should you do?

A. you should consider using the column definition below:


create table dbo.products (
productid uniqueidentifier primary key,
productname varchar(25) );
go
insert dbo.products (productname)
values
('productone'),('producttwo'),('productthree'),('productfour'),('productfive');
select scope_identity();
B. you should consider using the column definition below:
create table dbo.products (
productid uniqueidentifier primary key,
productname varchar(25));
go
insert dbo.products (productname)
output inserted.productid, inserted.productname
values
('productone'),('producttwo'),('productthree'),('productfour'),('productfive');
C. you should consider using the column definition below:
create table dbo.products (
productid int identity primary key,
productname varchar(25) );
go
insert dbo.products (productname)
values
(productone'),('producttwo'),('productthree'),('productfour'),('productfive');
select scope_identity();
D. you should consider using the column definition below:
create table dbo.products (
productid int identity primary key,
productname varchar(25));
go
insert dbo.products (productname)

Page 35 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

output inserted.productid, inserted.productname


values
('productone'),('producttwo'),('productthree'),('productfour'),('productfive');
C. create table dbo.products (

Answer: D

Question: 83
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which contains two tables named dbo.products and dbo.prices. Compnay.com is aware
that the dbo.products table contains ten products of which five are priced at $35 and have a price
increase set to $1 and the other five products are priced at $10 and remains so. during the course
of the day you received instruction from Compnay.com to develop a query. you decided to start
writing the query as shown below: insert dbo.prices (productid, change, changedate) select
productid, inprices - delprices, sysdatetime() from
(
update dbo.products
set price *= 1.1
output inserted.productid, inserted.prices, deleted.prices
where priceincrease = 1
) p (productid, inprices, delprices);
Compnay.com wants to know what the result would be from running the query that was written?

A. the query written would have no rows updated in dbo.products and five rows inserted into
dbo.prices.
B. the query written would have no rows updated in dbo.products and no rows inserte into
dbo.prices.
C. the query written would have five rows updated in dbo.products and no rows inserted into
dbo.prices.
D. the query written would have five rows updated in dbo.products and five rows inserted into
dbo.prices.

Answer: D

Question: 84
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database containing two tables which you populated using the transact-sql statements shown
below:

Page 36 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

create table currentcustomers (lastname varchar(50),


firstname varchar(50),
address varchar(100),
age int);
insert into currentcustomers
values ('ricardo', 'davids', '1881 kline street', 14)
,('paul', reeve' , '4829 south union', 14)
,('brown', 'cake' , '5881 washington ave',14)
,('smith', 'john' , '184 water st', 14)
,('holy', 'mary' , '888 mass ct', 14)
,('robbin', 'jankins' , '4889 union ave', 14)
,('chritiano', 'frank' , 85812 meadow st', 14)
,('bee', 'cathy' , '18829 skyhigh ave', 14)
,('franklin', 'thomas' , '18801 120th st', 14)
create table newcustomerroster(lastname varchar(50),
firstname varchar(50),
address varchar(100),
age int);
insert into newcustomerroster
values ('ricardo', 'davids', '1881 kline street', 15)
,('paul', 'reevers', '1980 grandview place', 15)
,('smith', 'wilbur', '4831 w. 93rd', 15)
,('chucky', 'norris', '1008 1st ave', 15)
,('thomas', 'huglestone', '18876 soundview dr', 15)
,('lester', 'danielle', '8941 w. 37 ave', 15)
,('tree', 'joshua', '2811 10st ave', 15)
,('dark', 'lovely', '1887 fifth ave', 15)
,('holy', 'marin', '1802 w. 303rd', 15)
,('dean', 'waltz', '100o 12st st', 15);
During the course of the day you receive instruction from Compnay.com to run a merge
statement which updates, inserts and deletes rows in the currentcustomer table as shown below:
merge top (3) currentcustomers as t
using newcustomerroster as s
on s.lastname = t.lastname and s.firstname = t.firstname
when matched and not (t.age = s.age or t.address = s.address) then
update set address = s.address,
age = s.age
when not matched by target then
insert (lastname, firstname, address, age)
values (s.lastname, s.firstname, s.address, s.age)
when not matched by source then delete;
Compnay.com has additionally requested that you identify the number of rows which are updated,
inserted and deleted in the currentcustomer table.
What should you do?

A. the merge statement used would have a total of 3 rows.


B. the merge statement used would have a total of 6 rows.
C. the merge statement used would have a total of 9 rows.
D. the merge statement used would have a total of 0 rows.

Answer: A

Question: 85
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.

Page 37 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

Compnay.com currently makes use of a database server named -db01 hosting the inventory
database. during the course of the day you receive instruction from Compnay.com to troubleshoot
the query performance by creating an estimated execution plan using transact-sql. Compnay.com
has additionally requested that you be able to view the plan graphically in sql server management
studio whilst ensuring that the execution plan saves as a .sqlplan file.
What should you do?

A. you should consider having the set statistics xml on; transact-sql setting used.
B. you should consider having the set showplan_all on; transact-sql setting used.
C. you should consider having the set showplan_xml on; transact-sql setting used.
D. you should consider having the set statistics profile on; transact-sql setting used.

Answer: C

Question: 86
You work as a network database administrator at Compnay.com in london. The Compnay.com
network currently makes use of microsoft sql server 2008 as their database management
solution. Compnay.com currently makes use of a database server named -db01 hosting the
inventory databasE. .com has recently requested that you develop a query for a partner company
named weyland industries. The query written for weyland industries is shown below: select
staffid, managmentid, loginid from dbo.inventory where managmentid = 1500
order by managmentid; during the course of the day you receive instruction from Compnay.com
to have the written query make use of a preconfigured execution plan by adding the proper hint
required to perform the operation.
What should you do?

A. you should consider making use of the index(1) hint.


B. you should consider making use of the index(pk_staff) hint.
C. you should consider making use of the index(ix_staff) hint.
D. you should consider making use of the index(0) hint.

Answer: C

Question: 87
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 which has the collation set
to sql_latin_general_cp1_ci_as hosting the inventory database which has a collation set to
sql_scandinavian_cp850_ci_as. during the course of the day you receive instruction from
Compnay.com to create and populate a temporary table #product from dbo.inventory in the
inventory database using the statement shown below: use mydb;
create table #product (lastname nchar(128));
insert into #product select lastname from dbo.inventory;
you have later decided to execute the command below:
select * from dbo.product a join #product b
on a.lastname = b.lastname;
You have later discovered that executing the command returns the error message shown below:
"cannot resolve the collation conflict between "sql_latin1_general_cp1_ci_as" and
"sql_scandinavian_cp850_ci_as" in the equal to operation"
Compnay.com wants you to ensure that you are able to resolve the conflict.
What should you do?

A. you should consider making use of the transact-sql statement below:


create table #product (lastname nvarchar(128) collate sql_latin1_general_cp1_ci_as);
B. you should consider making use of the transact-sql statement below:

Page 38 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

create table tmpproduct (lastname nvarchar(128) collate sql_latin1_general_cp1_ci_as);


C. you should consider making use of the transact-sql statement below:
create table #product (lastname nvarchar(128) collate database_default);
D. you should consider making use of the transact-sql statement below:
create table #product (lastname nvarchar(128) sparse);

Answer: C

Question: 88
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day you receive instruction from Compnay.com to have a
number of database mail messages deleted which have been sent to Company.com.
Compnay.com has additionally requested that you have all e-mails deleted which are more than a
month old.
What should you do?

A. you should consider running the transact-sql statements below:


declare @onemonthago datetime = dateadd(mm,-1,getdate())
exec msdb.dbo.sysmail_delete_mailitems_sp @onemonthago
B. you should consider running the transact-sql statements below:
declare @onemonthago datetime = dateadd(mm,-1,getdate())
exec msdb.dbo.sysmail_delete_log_sp @onemonthago,'success'
C. you should consider running the transact-sql statements below:
declare @onemonthago datetime = dateadd(mm,-1,getdate())
exec msdb.dbo.sysmail_delete_mailitems_sp @onemonthago,'sent'
D. you should consider running the transact-sql statements below:
declare @onemonthago datetime = dateadd(mm,-1,getdate())
exec msdb.dbo.sysmail_delete_log_sp @onemonthago

Answer: C

Question: 89
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which uses database mail. during the course of the day you receive instruction from
Compnay.com to have e-mail notifications delivereD. testkin.com has recently discovered that a
user named rory allen does not receive the e-mail notifications. Compnay.com wants you to verify
if the e-mail notifications sent by database mail is successful.
What should you do?

A. you should consider making use of the msdb.dbo.sysmail_unsentitems object from the msdb
database.
B. you should consider making use of the msdb.dbo.sysmail_faileditems object from the msdb
database.
C. you should consider making use of the msdb.dbo.sysmail_sentitems object from the msdb
database.
D. you should consider making use of the msdb.dbo.sysmail_event_log object from the msdb
database.

Answer: B

Question: 90

Page 39 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

You work as a network database administrator at Company.com. the Compnay.com network


currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day you receive instruction from Compnay.com to have a full-
text search configured for weyland industries which ignores specific words in searches.
What should you do?

A. you should consider making use of the thesaurus file full-text search component.
B. you should consider making use of the word breakers full-text search component.
C. you should consider making use of the stoplist full-text search component.
D. you should consider making use of the ifilter full-text search component.

Answer: C

Question: 91
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting multiple
databases for Company.com. during the course of the day you receive instruction from
Compnay.com to develop a powershell script which would determine if the databases on the
server are greater than 100gb by opening powershell from sql server management studio to
create the variables shown below: ps sqlserver:\sql\Company> $multipleofgb = 1024 * 1024 ps
sqlserver:\sql\Company> $server = get-item
Compnay.com wants you to select the script which would return the desired results.
What should you do?

A. you should consider making use of the script below:


$server | where-object{($_.databasesize * $multipleofgb) -match 100gb\} |
select-object name, databasesize
B. you should consider making use of the script below:
$server.databases | where-object{($_.size * $multipleofgb) -gt 100gb\} |
select-object name, size
C. you should consider making use of the script below:
$server.databases | where-object{($_.size * $multipleofgb) -match 100gb\} |
select-object name, size
D. you should consider making use of the script below:
$server | where-object{($_.databasesize * $multipleofgb) -gt 100gb\} |
select-object name, databasesize

Answer: B

Question: 92
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day you receive instruction from Compnay.com to have your
level of proficiency rated using database mail, full-text search, windows powershell, sql server
management objects and service broker.
What would your response be?

A. you should inform Compnay.com that your level of proficiency is moderate.


B. you should inform Compnay.com that your level of proficiency is very high.
C. you should inform Compnay.com that your level of proficiency is high.
D. you should inform Compnay.com that your level of proficiency is very low.
E. you should inform Compnay.com that your level of proficiency is low.

Page 40 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

Answer: B

Question: 93
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. Compnay.com has recently finished configuring the service broker to process
messages within the inventory database and performed the actions below:
1. Compnay.com has created the message type.
2. Compnay.com has created the contract.
3. Compnay.com created the queue.
During the course of the day you receive instruction from Compnay.com to complete the
configuration of the service broker.
What should you do?

A. you should consider having the service create.


B. you should consider having the endpoint create.
C. you should consider having the broker priority create.
D. you should consider having the route create.

Answer: A

Question: 94
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which has a service broker queue named weylandrequests. during the course of the
day testkin.com decided to restore the database to a new server and discovered that the service
broker no longer sends new messages. Compnay.com recently requested that you have the
service broker configured to resolve the issue.
What should you do?

A. you should consider making use of the transact-sql stamen below:


alter queue weylandrequests with status = on;
B. you should consider making use of the transact-sql stamen below:
alter database inventory set enable_broker;
C. you should consider making use of the transact-sql stamen below:
alter database inventory set new_broker;
D. you should consider making use of the transact-sql stamen below:
alter queue weylandrequests with activation (status = on);

Answer: C

Question: 95
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. Compnay.com has recently configured a service broker to support a web site which
uses an internal application. during the course of the day Compnay.com discovers that the web
site generates a greater workload using the internal application. Compnay.com has recently
requested that you configure service broker to ensure messages sent from the internal
application are processed before sent to the web site.
What should you do?

Page 41 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

A. you should consider making use of the transact-sql stamen below:


alter queue with activation
B. you should consider making use of the transact-sql stamen below:
alter service
C. you should consider making use of the transact-sql stamen below:
create broker priority
D. you should consider making use of the transact-sql stamen below:
create contract

Answer: C

Question: 96
You work as a network database administrator at Company.com. The Compnay.com network
currently makes use of microsoft sql server 2008 enterprise Edition as their database
management solution. Compnay.com currently makes use Of a database server named -db01
hosting the inventory database. During the course Of the day you receive instruction from
compnay.com to have the history of all data Modifications made maintained to a table including
the modification type and
Values modified.
What should you do?

A. you should consider making use of the change data capture tracking method.
B. you should consider making use of database audit.
C. you should consider making use of c2 audit tracing.
D. you should consider making use of change tracking.

Answer: A

Question: 97
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database which uses change tracking on a table named inventory.productorder. during the
course of the day you receive instruction from Compnay.com to verify whether all the columns
have changed since the minimum valid version.
What should you do?

A. you should consider making use of the changetable with the version argument function.
B. you should consider making use of the change_tracking_is_column_in_mask function.
C. you should consider making use of the changetable with the changes argument function.

Answer: C

Question: 98
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 that is configured to host
the inventory database. during the course of the day you receive instruction from Compnay.com
to have a table named inventory.productorder which has change tracking enabled modified for a
company named weyland industries to have the change tracking disabled prior to modifying the
inventory.productorder table. what should you do?

A. you should consider making use of the transact-sql statement below:


alter table inventory.productorder
disable change_tracking

Page 42 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

B. you should consider making use of the transact-sql statement below:


alter database inventory
set change_tracking = off
C. you should consider making use of the transact-sql statement below:
exec sys.sp_cdc_disable_table
@source_schema = n'inventory',
@source_name = n'productorder',
@capture_instance = n'inventory_productorder'
D. you should consider making use of the transact-sql statement below:
exec sys.sp_cdc_disable_db

Answer: A

Question: 99
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 that is configured to host
the inventory database. Compnay.com has recently developed the xml document shown below
which contains inventory information:
declare @prodlist xml ='
<productlist xmlns="urn:wide_world_importers/schemas/products">
<product name="product1" category="food" price="12.3" />
<product name="product2" category="drink" price="1.2" />
<product name="product3" category="food" price="5.1" />
...
</productlist>';
During the course of the day you receive instruction from Compnay.com to have a list of products
returned which contains the product named, category and price of each product.
What should you do?

A. you should consider making use of the query below:


select prod.value('.[1]/@name','varchar(100)'),
prod.value('.[1]/@category','varchar(20)'),
prod.value('.[1]/@price','money')
B. you should consider making use of the query below:
select prod.value('@name','varchar(100)'),
prod.value('@category','varchar(20)'),
prod.value('@price','money')
from @prodlist.nodes('/productlist/product') prodlist(prod);
C. you should consider making use of the query below:
with xmlnamespaces(default 'urn:wide_world_importers/schemas/products')
select prod.value('./@name','varchar(100)'),
prod.value('./@category','varchar(20)'),
prod.value('./@price','money')
from @prodlist.nodes('/productlist/product') prodlist(prod);
D. you should consider making use of the query below:
with xmlnamespaces(default 'urn;wide_world_importers/schemas/products' as o)
select prod.value('name[1]','varchar(100)'),
prod.value('category[1]','varchar(20)'),
prod.value('price[1]','money')
from @prodlist.nodes('/o:productlist/o:product') prodlist(prod);

Answer: C

Question: 100

Page 43 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

You work as a network database administrator at Company.com. the Compnay.com network


currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day you receive instruction from Compnay.com to have your
level of proficiency rated gathering performance data, capturing execution plans, collect output
data from the database engine tuning advisor, gathering trace information using sql server profiler
and collecting information from system metadata.
What would your response be?

A. you should inform Compnay.com that your level of proficiency is high.


B. you should inform Compnay.com that your level of proficiency is moderate.
C. you should inform Compnay.com that your level of proficiency is very low.
D. you should inform Compnay.com that your level of proficiency is low.
E. you should inform Compnay.com that your level of proficiency is very high.

Answer: E

Question: 101
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. testkin.com has recently developed the query shown below:
<site url="http://www.Company.com/index.htm">
<site url="http://www.Company.com/finance/index.htm">
<site url="http://www.Company.com/finance/reports/index.htm" />
<site url="http://www.Company.com/finance/main/index.htm" />
</site>
<site url="http://www.Company.com/marketing/index.htm">
<site url="http://www.Company.com/marketing/reports/index.htm" />
<site url="http://www..com/marketing/main/index.htm" />
</site>
<site url="http://www.testkin.com/sales/index.htm" />
</site>
During the course of the day you receive instruction from Compnay.com to have the sites queried
listed in the xml making use of open xml which would have the results in two columns named
parentsiteurl and siteurl. Compnay.com has additionally requested that the parentsiteurl contain
the url attribute for the parent site and the siteurl column should contain the url attribute of the site
itself.
What should you do?

A. you should consider making use of the transact-sql statement below:


select parentsiteurl, siteurl
from openxml (@xmldochandle, '//site', 1)
with (
parentsiteurl nvarchar(512) '../@url',
siteurl nvarchar(512) '@url')
B. you should consider making use of the transact-sql statement below:
select parentsiteurl, siteurl
from openxml (@xmldochandle, '//@url', 1)
with (
parentsiteurl nvarchar(512) '../url',
siteurl nvarchar(512) 'url')
C. you should consider making use of the transact-sql statement below:
select parentsiteurl, siteurl
from openxml (@xmldochandle, '//@site', 1)

Page 44 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

with (
parentsiteurl nvarchar(512) '../url',
siteurl nvarchar(512) 'url')
D. you should consider making use of the transact-sql statement below:
select parentsiteurl, siteurl
from openxml (@xmldochandle, '//url', 1)
with (
parentsiteurl nvarchar(512) '../@url',
siteurl nvarchar(512) '@url')

Answer: Pending

Question: 102
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
database containing two tables named products and orders. during the course of the day you
receive instruction from Compnay.com to write a select statement which will output product and
order data as a valid well formed xml document by mixing the attribute and element asked xml
within the document. you have later determined that you will not make use of the for xml auto
clause and Compnay.com requested that you select a suitable for xml clause. what should you
do? (choose two)

A. you should consider making use of the for xml explicit xml clause.
B. you should consider making use of the for xml path xml clause.
C. you should consider making use of the for browse xml clause.
D. you should consider making use of the for xml raw xml clause.

Answer: A, B

Question: 103
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day you receive instruction from Compnay.com to
troubleshoot the performance of a query by having the graphical execution plan captured whilst
ensuring that you save the plan file to be used with sql server management studio for displaying
the graphical execution plan.
What should you do?

A. you should consider making use of the .psql file extension.


B. you should consider making use of the .gif file extension.
C. you should consider making use of the .sqlplan file extension.
D. you should consider making use of the .sqlplan file extension.

Answer: C

Question: 104
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day you received instruction from Compnay.com to have a
server side trace created which created 35 trace files. Compnay.com has additionally requested
that you load the trace files on your workstation using the database called perfdata for further
analysis by loading three files starting at c:\t-king\trace_32. what should you do?

Page 45 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

A. you should consider using the transact-sql statement below:


select * into perfdata
from ::fn_trace_gettable('c:\t-king\trace.trc', 3)
B. you should consider using the transact-sql statement below:
select * into perfdata
from ( select * from ::fn_trace_gettable
('c:\t-king\trace_32.trc', default)
union all
select * from ::fn_trace_gettable
('c:\t-king\trace_33.trc', default)
union all
select * from ::fn_trace_gettable
('c:\t-king\trace_34.trc', default)
) trc
C. you should consider using the transact-sql statement below:
select * into perfdata
from ::fn_trace_gettable('c:\t-king\trace32.trc', default)
D. you should consider using the transact-sql statement below:
select * into perfdata
from ::fn_trace_gettable('c:\t-king\trace_32.trc', 3)

Answer: D

Question: 105
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day you receive instruction from Compnay.com to have a
workload created for a company named weyland industries that will be used by the database
engine tuning advisor (dta). Compnay.com has additionally requested that you have the workload
created in the proper format for weyland industries.
What should you do? (choose all that apply)

A. you should consider making use of the sql server profiler trace file format.
B. you should consider making use of the sql server event log format.
C. you should consider making use of the sql server transaction log format.
D. you should consider making use of the xml file format.
E. you should consider making use of the performance counter log file format.
F. you should consider making use of the transact-sql script format.

Answer: A, D, F

Question: 106
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. during the course of the day you receive instruction from Compnay.com to
troubleshoot the slow performance of queries. you have later decided to run the dynamic
management view (dmv) query below on -db01.
select top (10)
wait_type,
wait_time_ms
from sys.dm_os_wait_stats
order by wait_time_ms desc;

Page 46 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

you have finished executing the dynamic management view (dmv) query and a top
wait type of sos-scheduler_yielD. Compnay.com has additionally requested that you
identify the cause of the deteriorating server response issues.
What should you do?

A. you should first investigate the disk resource.


B. you should first investigate the cpu resource.
C. you should first investigate the network resource.
D. you should first investigate the memory resource.

Answer: B

Question: 107
You work as a network database administrator at Compnay.com in london. The Compnay.com
network currently makes use of microsoft sql server 2008 as their database management
solution. Compnay.com currently makes use of a database server named -db01 hosting the
inventory databasE. during the course of the day you receive instruction from Compnay.com to
evaluate a database design for a company named weyland industries. weyland industries has
requested that Compnay.com ensures all the tables in the database have a clustered index whilst
verifying the tables missing a clustered index by making use of the system catalog views.
What should you do?

A. you should consider making use of the transact-sql statement below:


select name as table_name
from sys.tables
where objectproperty(object_id,'tablehasuniquecnst') = 0
order by name;
B. you should consider making use of the transact-sql statement below:
select name as table_name
from sys.tables
where objectproperty(object_id,'tablehasclustindex') = 1 and
objectproperty(object_id,'tablehasuniquecnst') = 1
order by name;
C. you should consider making use of the transact-sql statement below:
select name as table_name
from sys.tables
where objectproperty(object_id,'tablehasclustindex') = 0 and
objectproperty(object_id,'tablehasuniquecnst') = 1
order by name;
D. you should consider making use of the transact-sql statement below:
select name as table_name
from sys.tables
where objectproperty(object_id,'tablehasclustindex') = 0
order by name;

Answer: D

Question: 108
You work as a network database administrator at Company.com. the Compnay.com network
currently makes use of microsoft sql server 2008 as their database management solution.
Compnay.com currently makes use of a database server named -db01 hosting the inventory
databasE. Compnay.com has recently started exchanging information with a company named
weyland industries using xml and web services. during the course of the day you receive
instruction from Compnay.com to have a schema collection removed which is no longer used
whilst confirming the schema is no longer in use before being droppeD. Compnay.com has

Page 47 of 48
Exam Name: TS: Microsoft SQL Server 2008, Database Development
Exam Type: Microsoft
Exam Code: 70-433 Total Questions 108

additionally requested that you determine which catalog view to use if the schema collection is
being used.
What should you do?

A. you should consider making use of the sys.xml_schema_collections catalog view.


B. you should consider making use of the sys.column_xml_schema_collection_usages catalog
view.
C. you should consider making use of the sys.xml_schema_components catalog view.
D. you should consider making use of the sys.xml_schema_namespaces catalog view.

Answer: B

End of Document

Page 48 of 48

Vous aimerez peut-être aussi