###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 to minimize the amount of time it takes to execute USP_1.
With what should you recommend replacing Table1?
A.
An indexed view
B.
A function
C.
A table variable
D.
A temporary table
Explanation:
Scenario: 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.
I think the problem would be in reading 2 databases and many tables and later combining them.
Probably option A (Index View) would help in reading the data
SQL Standard Edition doesn’t support indexed views, so I’m leaning toward D. Temporary table.
Why not support?!
“In SQL Server Standard Edition, we can still create indexed views, but the optimizer will not automatically consider its indexes when formulating an execution plan for a query;”
https://www.simple-talk.com/sql/learn-sql-server/sql-server-indexed-views-the-basics/
Yaa,Thanks for correcting.. But still not sure about D
I think having ability to create index on Temp table and in question millions of rows are being processed than D looks good
As it requires to retrieve data from multiple database, it can’t be an indexed view. So D, for sure.
i think the temp table is the best choice as it contains millions of rows so we can not use the table variable also the indexed view is a good choice but it is not deleted automatically after the process ends
+1 D
D
New 70-465 Exam Questions and Answers Updated Recently:
NEW QUESTION 20
What should you recommend for the updates to Sales.TransactionHistory?
A. a REPEATABLE READ isolation level
B. implicit transactions
C. query hints
D. a SNAPSHOT isolation level
Answer: A
NEW QUESTION 21
……
NEW QUESTION 32
You need to recommend a solution to back up DB1. What should you include in the recommendation?
A. Azure Table Storage
B. Azure Queue storage
C. Azure Blob storage
D. Azure Document DB
Answer: C
Explanation:
Explanation: For SQL Server the Azure Blob Storage service offers a better alternative to the often used tape option to archive backups. Tape storage might require physical transportation to an off-site facility and measures to protect the media. Storing your backups in Azure Blob Storage provides an instant, highly available, and a durable archiving option.
NEW QUESTION 33
……
NEW QUESTION 154
You are using dynamic management views to monitor an SQL Server server named SQL1. A database administrator named Dba1 must monitor the health of SQL1. You need to ensure that Dba1 can access dynamic management views for SQL1. The solution must use the principle of least privilege. Which permissions should you assign to Dba1?
A. VIEW ANY DEFINITION
B. VIEW SERVER STATE
C. VIEW DEFINITION
D. CONTROL SERVER
Answer: B
Explanation:
To query a dynamic management view or function requires SELECT permission on object and VIEW SERVER STATE or VIEW DATABASE STATE permission.
NEW QUESTION 155
You have a customer who has several SQL Server 2012 database servers. You are designing a data warehouse for the customer. The data warehouse will use columnstore indexes. The customer identifies that the following must be supported for the column store indexes.
– Data manipulation language (DML) statements
– Nonclustered columnstore indexes
– Clustered columnstore indexes
– Partitioning
You need to identify which technology requires the customer to implement an SQL Server 2014 database. What should you identify?
A. clustered columnstore indexes
B. nonclustered columnstore indexes
C. data manipulation language (DML) statements
D. partitioning
Answer: A
Explanation:
SQL Server 2014 has the features of SQL Server 2012 plus updateable clustered columnstore indexes. This feature is required here as DML statements must be supported in the warehouse.
NEW QUESTION 156
……
NEW QUESTION 157
Drag and Drop Question
You have an SQL Server 2014 server. You plan to create four stored procedures that will use transactions. The stored procedures will be configured as shown in the following table.
IMG: examgod.com/plimages/5ff1a742aa3c_FC1B/1571_thumb8_thumb.jpg
You need to recommend an isolation level for each stored procedure. The solution must support the concurrency strategy of each stored procedure and must minimize locks. What should you recommend? To answer, drag the appropriate isolation levels to the correct stored procedures. Each isolation level may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
IMG: examgod.com/plimages/5ff1a742aa3c_FC1B/1572_thumb4_thumb.jpg
Answer:
IMG: examgod.com/plimages/5ff1a742aa3c_FC1B/1573_thumb4_thumb.png
NEW QUESTION 158
……
P.S. These New 70-465 Exam Questions Were Updated By PassLeader, You Can Get The Newest 70-465 Dumps In PDF And VCE From — https://tr.im/HlLS2 (160q dumps)
Good Luck !!!
D is still correct
D seems most plausible though not that much of a win.
As was pointed out it can’t be an indexed view because this is not possible across databases.
I just came across a different version of this question with the following distractors…
A) A view
B) A temporary table
C) A table variable
D) A function
This version of the question seems to make more sense. Using a view would allow you to ditch the whole generate a table with millions of rows process.