Ensurepass

Application Information

Your company receives invoices in XML format from customers. Currently, the invoices are stored as files and processed by a desktop application. The application has several performance and security issues. The application is being migrated to a SQL Server-based solution. A schema named InvoiceSchema has been created for the invoices xml. 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. The following graphic shows the planned tables:

 

70-464-demo-6

 

You have a sequence named Accounting.InvoiceID_Seq. 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.

  • 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 thef
    t 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

 

70-464-demo-7

 

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. The following is a sample of a customer invoice in XML format:

 

70-464-demo-8

InvoiceByCustomer.sql

 

70-464-demo-9

 

Legacy.sql

 

70-464-demo-10

 

CountryFromID.sql

 

70-464-demo-11

 

IndexManagement.sql

 

70-464-demo-12

 

 

QUESTION 7

You need to modify InsertInvoice to comply with the application requirements. Which code segment should you execute?

 

  1. OPEN CERT1;

ALTER PROCEDURE Accounting.usp_AuthPayment

WITHENCRYPTION; CLOSE CERT1;

 

  1. OPEN CERT2;

ALTER PROCEDURE Accounting,usp_AuthPayment

WITH ENCRYPTION; CLOSE CERT2;

 

  1. ADD SIGNATURE TO Accounting.usp_AuthPayment

BY CERTIFICATE CERT1;

 

  1. ADD SIGNATURE TO Accounting.usp_AuthPayment

BY CERTIFICATE CERT2;

Correct Answer: D

 

 

QUESTION 8

Which data type should you use for CustomerID?

 

  1. varchar(11)

  2. bigint

  3. nvarchar(11)

  4. char(11)

 

Correct Answer: D

 

 

QUESTION 9

You have a SQL Server 2012 database named database1.Databaset has a data file named database1_data.mdf and a transaction log file named database1_log.ldf. Database1_data.mdf is 1.5 GB. Database1_log.ldf is 1.5 terabytes. A full backup of Database1 is performed every day. You need to reduce the size of the log file. The solution must ensure that you can perform transaction log backups in the future. Which code segment should you execute?

 

To answer, move the appropriate code segments from the list of code segments to the answer area and arrange them in the correct order.

 

  1. CREATE ASSEMBLY TaxCalc FROM `c: tempTreyTax.DLL’

 

  1. EXEC SP_CONFIGURE ‘clr enabled’, ‘1’;

 

  1. CREATE FUNCTION Accounting.Amortize (

@total decimal (8, 2),@period int

) RETURNS decimal (8, 2)

AS EXTERNAL NAMF. TaxCalc.
TreyResearch.Amortize:

 

  1. EXEC sp_recompile @objname = ‘TaxCalc’

 

  1. CREATE ASSEMBLY TaxCalc FROM ‘C: tempAmortize.cs’;

 

  1. RECONFIGURE;

 

Correct Answer: ACDE

 

 

QUESTION 10

You need to modify the function in CountryFromlD.sql to ensure that the country name is returned instead of the country ID. Which line of code should you modify in CountryFromlD.sql?

 

  1. 06

  2. 04

  3. 19

  4. 05

 

Correct Answer: C

 

 

QUESTION 11

You need to create the InvoiceStatus table in DB1. How should you define the InvoiceID column in the CREATE TABLE statement?

 

  1. InvoiceID bigint

DEFAULT (NEXT VALUE FOR Accounting.InvoiceID_Seq) NOT NULL,

 

  1. InvoiceiD bigint DEFAULT ((NEXT VALUE

FOR Accounting.InvoiceID_Seq

OVER (ORDER BY InvoiceStatusID))) NOT NULL,

 

  1. InvoiceID bigint DEFAULT ((NEXT VALUE

FOR Accounting.InvoiceID_Seq

OVER (ORDER BY InvoiceStatusID))) NOT NULL FOREIGN

KEY REFERENCES Accounting.Invoices (InvoiceID),

 

  1. InvoiceID bigint FOREIGN KEY REFERENCES

Accounting.Invoices (InvoiceID) NOT NULL,

 

Correct Answer: D

 

 

QUESTION 12

You execute IndexManagement.sql and you receive the following error message: “Msg 512, Level 16, State 1, Line 12 Subquery returned more than 1 value. This is not permitted when the subquery follows =, ! = , <,<= , >, > = or when the subquery is used as an expression.” You need to ensure that IndexManagement.sql executes properly. Which WHILE statement should you use at line 18?

 

  1. WHILE @counter < (SELECT COUNT(RowNumber) FROM@indextable)

  2. WHILE @counter < (SELECT SUM(RowNumber) FROM @indextable)

  3. WHILE SUM(@RowNumber) < (SELECT @counter FROM@indextable)

  4. WHILE COUNT(@RowNumber) < (SELECT @counter FROM@indextable)

 

Correct Answer: A

 

 

QUESTION 13

You are testing disaster recovery procedures. You attempt to restore DB1 to a different server and you receive the following error message:

 

“Msg 33111, Level 16, State 3, Line 1 Cannot find server certificate with thumbprint

‘OxA694FBEA88C9354E5E2567C30A2A69E8FB4C44A9’.

Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally.”

 

You need to ensure that you can restore DB1 to a different server. Which code segment should you execute?

 

  1. CREATE CERTIFICATE CERT1

ENCRYPTION BY PASSWORD=’p@ssw0rd1′

WITH SUBJECT = ‘EncryptionCertificate’;

 

  1. CREATE CERTIFICATE CERT1

FROM FILE=’CERT1.CER’

WITH PRIVATE KEY (FILE = ‘CERT1.KEY’,

DECRYPTION BY PASSWORD=’p@ssw0rd1′);

 

  1. RESTORE CERTIFICATE CERT2

FROM FILE=’CERT2.CER’

WITH PRIVATE KEY (FILE = ‘CERT2.KEY’,

DECRYPTION BY PASSWORD=’p@ssw0rd1′);

 

  1. CREATE CERTIFICATE CERT2

ENCRYPTION BY PASSWORD=’p@ssw0rd1′

WITH SUBJECT = ‘EncryptionCertificate’;

 

Correct Answer: B

 

 

QUESTION 14

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.”

You need to modify usp_InsertInvoice.sql to resolve the error. How should you modify the INSERT statement?

 

  1. InvoiceDate date ‘Customer/@InvoiceDate1’.

  2. InvoiceDate varchar(100) ‘InvoiceDate’,

  3. InvoiceDate varchar(100) ‘Customer/InvoiceDate’,

  4. InvoiceDate date ‘@InvoiceDate’,

 

Correct Answer: D

 

Instant Access to Download Latest Complete Collection of Microsoft MCSE 70-464 Real Exam

Try Microsoft MCSE 70-464 Free Demo

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.