Exam 70-464 Developing Microsoft SQL Server Databases
Exam 70-464 Developing Microsoft SQL Server Databases
Exam 70-464 Developing Microsoft SQL Server Databases
Exam 70-464
Developing Microsoft SQL Server
Databases
The data in the invoices is sometimes incomplete. The incomplete data must be stored and
processed as-is. Users cannot filter the data provided through views.
You are designing a SQL Server database named DB1 that will be used to receive,
process, and securely store the invoice data. A third-party Microsoft .NET Framework
component will be purchased to perform tax calculations. The third-party tax component
will be provided as a DLL file named Treytax.dll and a source code file named Amortize.cs.
The component will expose a class named TreyResearch and a method named Amortize().
The files are located in c:\temp\.
You plan to create two certificates named CERT1 and CERT2. You will create CERT1 in
master. You will create CERT2 in DB1.
You have a legacy application that requires the ability to generate dynamic T-SQL
statements against DB1. A sample of the queries generated by the legacy application
appears in Legacy.sql.
Application Requirements
The planned database has the following requirements:
✑ All stored procedures must be signed.
✑ The original XML invoices must be stored in the database.
✑ An XML schema must be used to validate the invoice data.
2
✑ Dynamic T-SQL statements must be converted to stored procedures.
✑ Access to the .NET Framework tax components must be available to T-SQL
objects.
✑ Columns must be defined by using data types that minimize the amount of space
used by each table.
✑ Invoices stored in the InvoiceStatus table must refer to an invoice by the same
identifier used by the Invoice table.
✑ To protect against the theft of backup disks, invoice data must be protected by
using the highest level of encryption.
✑ The solution must provide a table-valued function that provides users with the
ability to filter invoices by customer.
✑ Indexes must be optimized periodically based on their fragmentation by using the
minimum amount of administrative effort.
Usp_InsertInvoices.sql
Invoices.xml
All customer IDs are 11 digits. The first three digits of a customer ID represent the
customer's country. The remaining eight digits are the customer's account number.
3
InvoicesByCustomer.sql
Legacy.sql
CountryFromID.sql
IndexManagement.sql
4
Question No : 1 - (Topic 1)
You attempt to restore DB1 to a different server and you receive the following error
message: "Msg 33111.
,0xA694FBEA88C9354E5E2567C30A2A69E8FB4C44A9\
You need to ensure that you can restore DB1 to a different server.
5
Which code segment should you execute?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Question No : 2 - (Topic 1)
How should you define the InvoiceID column in the CREATE TABLE statement?
6
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Question No : 3 - (Topic 1)
A. varchar(11)
B. bigint
C. nvarchar(11)
D. char(11)
Answer: D
Explanation:
Invoices.xml
All customer IDs are 11 digits. The first three digits of a customer ID represent the
customer's country. The remaining eight digits are the customer's account number.
int: -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647) (just 10 digits max)
bigint: -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)
http://msdn.microsoft.com/en-us/library/ms176089.aspx
http://msdn.microsoft.com/en-us/library/ms187745.aspx
7
Question No : 4 - (Topic 1)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
8
Question No : 5 - (Topic 1)
You attempt to process an invoice by using usp_InsertInvoice.sql and you receive the
following error message: "Msg 515, Level 16, State 2, Procedure usp_InsertInvoice, Line
10
Cannot insert the value NULL into column 'InvoiceDate', table 'DB1.Accounting.Invoices';
column does not allow nulls. INSERT fails."
Answer: C
Question No : 6 - (Topic 1)
You need to modify the function in CountryFromID.sql to ensure that the country name is
returned instead of the country ID.
A. 04
B. 05
C. 06
D. 19
Answer: D
Explanation:
http://msdn.microsoft.com/en-us/library/ms186755.aspx
http://msdn.microsoft.com/en-us/library/ms191320.aspx
9
Question No : 7 - (Topic 1)
You execute IndexManagement.sql and you receive the following error message:
Subquery returned more than 1 value. This is not permitted when the subquery follows =,!
=, <, <= ,>, > = or when the subquery is used as an expression."
Answer: B
Question No : 8 - (Topic 1)
10
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Explanation:
http://msdn.microsoft.com/en-us/library/ms187926.aspx
http://msdn.microsoft.com/en-us/library/ms190782.aspx
http://msdn.microsoft.com/en-us/library/bb669091.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms709342.aspx
http://msdn.microsoft.com/en-us/library/ms188001.aspx
Question No : 9 - (Topic 1)
You need to create a function that filters invoices by CustomerID. The SELECT statement
11
for the function is contained in InvoicesByCustomer.sql.
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
You need to build a stored procedure that amortizes the invoice amount. Which code
segment should you use to create the stored procedure? To answer, move the appropriate
code segments from the list of code segments to the answer area and arrange them in the
correct order.
12
Answer:
13