PrepAway - Latest Free Exam Questions & Answers

What should you recommend?

###BeginCaseStudy###
Case Study 4
A Datum
Overview
General Overview
A Datum Corporation has offices in Miami and Montreal.
The network contains a single Active Directory forest named adatum.com. The offices
connect to each other by using a WAN link that has a 5-ms latency.
A Datum standardizes its database platform by using SQL Server 2014 Standard edition.
Databases
Each office contains databases named Sales. Inventory, Customers, Products, Personnel, and Dev.
Servers and databases are managed by a team of database administrators. Currently, all of the
database administrators have the same level of permissions on all of the servers and all of the
databases.
The Customers database contains two tables named Customers and Classifications. The
following graphic shows the relevant portions of the tables:

The following table shows the current data in the Classifications table:

The Inventory database is used mainly for reports. The database is recreated every day. A full
backup of the database currently takes three hours to complete.
Stored Procedures
A stored procedure named USP_1 generates millions of rows of data for multiple reports.
USP_1 combines data from five different tables from the Sales and Customers databases in a
table named Table1.
After Table1 is created, the reporting process reads data from a table in the Products database
and searches for information in Table1 based on input from the Products table. After the
process is complete, Table1 is deleted.
A stored procedure named USP_2 is used to generate a product list. USP_2 takes several
minutes to run due to locks on the tables the procedure accesses.
A stored procedure named USP_3 is used to update prices. USP_3 is composed of several
UPDATE statements called in sequence from within a transaction. Currently, if one of the
UPDATE statements fails, the stored procedure continues to execute.
A stored procedure named USP_4 calls stored procedures in the Sales, Customers, and
Inventory databases. The nested stored procedures read tables from the Sales, Customers, and
Inventory databases. USP_4 uses an EXECUTE AS clause.
A stored procedure named USP_5 changes data in multiple databases. Security checks are
performed each time USP_5 accesses a database.

You suspect that the security checks are slowing down the performance of USP_5.
All stored procedures accessed by user applications call nested stored procedures. The nested
stored procedures are never called directly.
Design Requirements
Data Recovery
You must be able to recover data from the Inventory database if a storage failure occurs. You
have a Recovery Point Objective (RPO) of one hour.
You must be able to recover data from the Dev database if data is lost accidentally. You have
a Recovery Point Objective (RPO) of one day.
Classification Changes
You plan to change the way customers are classified. The new classifications will have four
levels based on the number of orders. Classifications may be removed or added in the future.
Management requests that historical data be maintained for the previous classifications.
Security
A group of junior database administrators must be able to view the server state of the SQL
Server instance that hosts the Sales database. The junior database administrators will not have
any other administrative rights.
A Datum wants to track which users run each stored procedure.
Storage
A Datum has limited storage. Whenever possible, all storage space should be minimized for
all databases and all backups.
Error Handling
There is currently no error handling code in any stored procedure. You plan to log errors in
called stored procedures and nested stored procedures. Nested stored procedures are never
called directly.
###EndCaseStudy###

You need to recommend a solution for the error handling of USP_4. The solution must
handle errors for nested stored procedures in the code for USP_4.
What should you recommend?

PrepAway - Latest Free Exam Questions & Answers

A.
Use the @@ERROR variable in the nested stored procedures.

B.
Use the @@ERROR variable in USP_4.

C.
Use the RAISERROR command in the nested stored procedures.

D.
Use the RAISERROR command in USP_4.

Explanation:

* A stored procedure named USP_4 calls stored procedures in the Sales, Customers, and
Inventory databases. The nested stored procedures read tables from the Sales, Customers,
and Inventory databases. USP_4 uses an EXECUTE AS clause.

4 Comments on “What should you recommend?

  1. stanley says:

    ADVENTURE WORKS CYCLE CASE STUDY
    A. General overview
    Adventure Works Cycle is an international company that sells cycling equipment and accessories.
    Adventure Works cycles currently has 300 employees, and is experiencing rapid growth.
    The company has a sales department, a marketing department, an accounting department, and a human resources department.
    • Physical Location
    The company has one main office located in Los Angeles. The office contains 100 employees. The other 200 employees, called field associates, are spread across North America and Europe.
    B. Existing Environment.

    • Active directory
    The network contains one Active Directory forest named adventure_works.com. The forest contains a single domain. All domain controllers run Windows Server 2012 R2.
    • SQL Server
    Adventure Works Cycles has an existing customer relationship management (CRM) system that the company plans to replace. The company is developing a replacement application in-house. The new CRM application will be used by the field associates and by the sales management team in the main office.
    The network currently contains one SQL Server 2008 server located in the main office. For the new application, the company plans to deploy additional SQL Servers for failover and redundancy and plans to use SQL Server 2014.
    • Problem statements
    Adventure Works cycles identifies the following issues with the current CRM system:
    • Users report that a view named View1 takes a long time to run.
    • Due to high network latency, users report slow database access times.
    • Users do not always have current sales data and product inventory data.
    • Database updates sometimes timeout. The database administrators discover the occurrence of deadlocks.

    • Existing backup Solution
    Currently, SQL server backups are stored on Linear Tape-open (LTO) tapes drives for long-term storage.
    Adventure Works Cycle wants to eliminate completely the hardware requirements for long term backup storage.
    C. Requirements

    • Databases
    The new CRM application will use three databases named DB1, DB2, and DB3. DB1 will be used by developers for testing purposes. DB1 will be a copy of DB2. DB2 will be the production database for the application. DB3 will be used for SQL Server Reporting Services (SSRS).

    • Technical Requirements
    Adventure works cycles identify the following technical requirements for the new CRM application:
    • Database locking must be minimized.
    • Database downtime must be minimised if a database fails.
    • Users must not have direct access to the database tables.
    • Multiple development teams will work on the new application. The design team must be able to modify the database tables. The development team members must not be able to modify tables, but must be able to create stored procedures and views.

    • Schemas
    In DB2, you create a schema named prod_schema1. You create a new database role named dev_role1. Dev_role1 must be able to retrieve data from all of the tables that belong to dev_schema1.
    In DB2, you create a schema named dev_schema1. Dev¬_schemma1 contains several tables. Developers will create new tables in dev_schema1 only. Once the tables are validated, the tables will be move to prod_schema1.
    • Sales.TransactionHistory
    You plan to create a table named Sales.TransactionHistory. You will create an index for the table by using the following statement.
    CREATE NONCLUSTERS INDEX [IX_TransHistory_PrductID] ON [Sales]. [TransactionHistory]
    (
    [ProductID] ASC
    )
    WITH (FILLFACTOR =0)

    You will create a query named Query1 that uses the following statement.

    SELECT [Sales].[Transaction History].prductID,
    [Sales].[TransactionHistory].[Quantity]
    FROM Sales.TransactionHistory
    ORDERS BY Sales.TransactinHistory.Quantity ASC

    During testing, you run the SQL Server profiler and you discover that Query1 uses a significant amount of disk resources while executing.
    When user updates Sales.TransactionHistory, dirty reads, nonrepeatable reads, and phantom reads occur and must be prevented.

    • Sales.SalesOrder

    You plan to create a table named Sales.SalesOrders by using the following statement.

    CREATE TABLE [Sales].[SalesOrders] (
    [SalesOrderID] int IDENTITY (1, 1) NOT NULL,
    [PartNum] int NOT NULL,
    [DateRequested] datetime NULL,
    [Qty] int NOT NULL,
    [UnitAskPrice] float NULL,
    [ShipDate] datetime Not NULL,
    );
    Go

    You must ensure that when users update SalesOrders, other users are prevented from modifying the data in the table while the update is installing.

    • Database Health
    Adventure Works Cycles identifies the following health requirements:
    • In Microsoft Azure, create and store a backup copy of DB1 once a week.
    • Check the consistency between system metadata tables for DB1.
    • Check the consistency of the disk space structure used by DB2
    • Check the logical and physical consistency of the objects in DB3.

    • User reports
    Frequently, users will access a report named Report1. Report1 will be based on a view named View1. View1 will aggregate data from multiple columns. View1 will perform complex calculations.
    Question 1
    What should you recommend for the updates to Sales.TransactionHistory?
    A. query hints
    B. a SERIALIZABLE isolation level.
    C. a REPEATABLE READ isolation level.
    D. a READ COMMITED isolation level.
    Question 2
    You need to recommend a solution to back up DB1.
    What should you include in the recommendation?
    A. Azure Blob storage.
    B. Azure Table storage.
    C. Azure Queue Storage.
    D. Azure Document DB.
    Question 3
    You need to recommend which statement should be used to update SalesOrder.
    How should you recommend completing the statement? To answer, drag the appropriate elements to the correct locations. Each element may be once, more than once, or not at all.
    You may need to drag the split bar between panes or scroll to view to view content.
    Options to drag
    EXPLICIT
    ISOLATION
    READ UNCOMMITED
    ROLLBACK
    SERIALIBLE
    SNAPSHOT
    TABLOCK
    TRANSACTION

    Answer area

    SET TRANSACTION ISOLATION
    LEVEL ———–
    BEGIN TRANSACTION
    UPDATE SalesOrder

    COMMIT TRANSACTION
    Question 4
    What should you create in Azure to support the creation of the backups for DB1?
    A. a storage account.
    B. An Azure content delivery Network (CDN) endpoint.
    C. A Service Bus namespace.
    D. A cloud service.
    Question 5(sent the printscrean)
    On DB1, a developer creates a table names Table1.
    What statement should you use after the table is validated? To answer, select appreciate options in the answer area.
    Question 6
    You need to assign security to dev_role1
    How should you complete the code? To answer, drag the appropriate elements to the correct locations. Each element may be used once or more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
    Elements

    AUTHORIZATION
    CONTROL
    dev_role1
    dev_schema1
    OBJECT_ID
    SCHEMA
    SELECT

    Answer Area
    ——————- ON ———–::[————-] TO [————
    CONTROL ON SCHEMA dev_schema1 To dev_role1




    0



    0
  2. Max (BR) says:

    The Case Study [In Design Requirements, Error Handling] says “You plan to log errors …”, and the “RAISERROR command in the nested stored procedures” will pass the error to the caller, in this case USP_4, an in the USP_4 you can use a TRY/CATCH statement to handle the error and log it in a table, so C is the correct answer.




    0



    0

Leave a Reply