PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

How should you modify the INSERT statement?

###BeginCaseStudy###
Case Study: 1
Scenario 1
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:

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

InvoicesByCustomer.sql

Legacy.sql

CountryFromID.sql

IndexManagement.sql

###EndCaseStudy###

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?

Which item should you configure?

HOTSPOT
A school stores information about teachers, students, classes, and enrollments in a
Microsoft Azure SQL Database database. The database includes a table that maps the user
IDs of teachers to the subjects they teach.

Teachers access reports in a SQL Server Reporting Services (SSRS) instance by using their credentials.
You are developing a report that displays a table of class enrollments for a specific subject.
The report will prompt teachers to select from their mapped subjects. The table is based on
a dataset named ClassData. To minimize report execution time, the ClassData dataset has
been configured to cache all class enrollment data.
You need to ensure that the report displays the correct class enrollment data.
Which item should you configure?
To answer, select the appropriate item in the answer area.

You need to ensure that the Amount measure aggregates correctly according to the account type classification

You are restructuring an existing cube. One of the measures in the cube is Amount. The
Sum aggregation function is used for the Amount measure. The cube includes a dimension
named Account and the dimension’s Type property is set to Accounts. The Account
dimension includes an account type attribute.
You need to ensure that the Amount measure aggregates correctly according to the account
type classification. Development effort must be minimized.
What should you do? (More than one answer choice may achieve the goal. Select the BEST
answer.)

Which functions should you use to complete the MDX query?

DRAG DROP
You are using Multidimensional Expressions (MDX) to query a SQL Server Analysis
Services (SSAS) cube.
You need to compute the aggregate value of the 10 most-ordered produces in the Product
Categories hierarchy. The Product level is the lowest in the hierarchy.
Which functions should you use to complete the MDX query? (To answer, drag the
appropriate functions from the list of functions to the correct locations in the answer area.)

Which line of code should you modify in CountryFromID.sql?

###BeginCaseStudy###
Case Study: 1
Scenario 1
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:

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

InvoicesByCustomer.sql

Legacy.sql

CountryFromID.sql

IndexManagement.sql

###EndCaseStudy###

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

You need to ensure that users can receive reports by email according to their preferences

You are designing a subscription strategy for a SQL Server Reporting Services (SSRS)
report.
You have an application that populates a table with user-specific subscription schedules and
report formats.
You need to ensure that users can receive reports by email according to their preferences.
Email messages will be sent via an internal mail server.
What should you do? (More than one answer choice may achieve the goal. Select the BEST
answer.)

Which type of hierarchy should you create?

You are developing a SQL Server Analysis Services (SSAS) cube.
You must create a four-level hierarchy for the employee dimension. Each level must be
associated with an attribute in the employee dimension table. Two thirds of the dimension
data contain values for all four attributes. The remainder of the dimension data contains
values for the first three of the four attributes only.
You need to create the hierarchy so that logically missing members will not be shown by the
reporting tool.
Which type of hierarchy should you create?

Which WHILE statement should you use at line 18?

###BeginCaseStudy###
Case Study: 1
Scenario 1
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:

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

InvoicesByCustomer.sql

Legacy.sql

CountryFromID.sql

IndexManagement.sql

###EndCaseStudy###

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?

You need to meet the requirements to support the HR department report writers

A hospital has a relational data warehouse, a SQL Server Analysis Services (SSAS)
database, and a SQL Server Reporting Services (SSRS) instance. The SSAS database
contains a cube named Pharmacy. Shared data sources exist in SSRS for the relational and
SSAS databases. Each hospital department has its own report writers.
Report writers in the Human Resources (HR) department want to create new reports by
using Report Builder. Many reports will include data generated by a custom formula that
references data stored either in a data warehouse table or in the Pharmacy cube. The
custom formula will compare time periods across multiple products, categories, and
employees.
You have the following requirements:
Ensure that only the HR department report writers can access the custom formula.
Implement only one dataset.
Ensure that the dataset references the data source that will provide the fastest data retrieval.

You need to meet the requirements to support the HR department report writers.
What should you do? (More than one answer choice may achieve the goal. Select the BEST
answer.)

You need to ensure that users can refresh the PivotTables from within Excel Services without a warning message

DRAG DROP
You are configuring an Excel Services service application in a Microsoft SharePoint farm.
Users will deploy Excel workbooks to SharePoint libraries that allow interaction with
PivotTables through Excel Services. PivotTable data is sourced from secured SQL Server
Analysis Services (SSAS) cubes and PowerPivot models inside published workbooks.
You need to ensure that users can refresh the PivotTables from within Excel Services
without a warning message appearing.
What should you do?
To answer, drag the appropriate term or terms to the correct location or locations in the
answer area. (Use only terms that apply.)