70-762 Developing SQL Databases Practice Questions
Prepare for 70-762 with more than an answer.
- 1
Note: The question is included in a number of questions that depicts the identical set-up. However, every question has a distinctive result. Establish if the solution satisfies the requirements.
You have a server that contains several physical disks that is not configured in a RAID array. Multiple Microsoft SQL Server instances are hosted on the server. A large number of SQL jobs are configured to execute within off-peak hours.
As a result of numerous deadlocks occurring at particular times, you want to keep an eye on the SQL environment and also capture the data relating to the processes producing the deadlocks.
Solution: You create a SQL Profiler trace.Has the requirement been satisfied?
Show answer details
Correct answer: A
Explanation: To view deadlock information, the Database Engine provides monitoring tools in the form of two trace flags, and the deadlock graph event in SQL Server Profiler.
Trace Flag 1204 and Trace Flag 1222 When deadlocks occur, trace flag 1204 and trace flag 1222 return information that is captured in the SQL Server error log. Trace flag 1204 reports deadlock information formatted by each node involved in the deadlock. Trace flag 1222 formats deadlock information, first by processes and then by resources. It is possible to enable both trace flags to obtain two representations of the same deadlock event. -- References: https://technet.microsoft.com/en-us/library/ms178104(v=sql. 105).aspx - 2
Note: The question is included in a number of questions that depicts the identical set-up. However, every question has a distinctive result. Establish if the solution satisfies the requirements.
A database, named Transactions, three tables named Client, Purchases, and Items. The Client table has a column to record information regarding the last purchase made by the client. The Items table has the following fields:
ItemlD
ItemName
Description
QtyonHand
MerchantName
MerchantlD
ObsoleteThe Purchases table has the following fields:
PurchaselD
ItemName
ItemlD
EmployeelD
Purchase dateYou want to make sure that rows in the Purchases table include a genuine value for the ItemlD column at all times. Also, if rows in the Items table are part of any rows in the table, they should not be removed. Furthermore, all rows in Items and Purchases tables must be distinctive.
Solution: You configure a check constraint on the ItemlD in the Purchases table. Has the requirement been satisfied?
Show answer details
Correct answer: B
No, the solution does not satisfy the requirements for the Transactions database with Client, Purchase, and related tables. Proper foreign key constraints are essential for maintaining referential integrity in transactional systems. The solution likely fails to implement appropriate constraint definitions that prevent orphaned records, ensure cascade operations work correctly, and maintain data consistency across related tables in the transaction processing environment.
- 3
Background
The HumanResources database contains a table, named Staff.
A number of read-only, historical reports that make use of various queries, which execute simultaneously, to assess workforce costs, include totals that transform on a regular basis. When you are informed that the running of the workforce assessment reports is not constant, you are required to examine the database to detect the reason for this happening.
It is your intention to install the application on a database server supporting other applications. The storage space required by the database should be reduced.Application
An application that updates the Staff table calls two stored procedures, named UspStaffA and UspStaffB, simultaneously and asynchronously. UspStaffA only updates the Staffstatus column, while UspStaffB only updates the StaffPayRate column
The application controls access to information by making use of views that permit user access to all columns in the tables that the view accesses, but also limit updates to the rows that the view returns.
You are required to create a view that will be used to permit users to modify data in the Staff table. This view must also block users from accessing the view definition in catalog views.Which of the following is the view attribute that should be used to block users from accessing the view definition in catalog views?
Show answer details
Correct answer: C
SCHEMABINDING is required for creating indexed views in SQL Server, which are essential for improving performance of read-only historical reports with simultaneous queries and changing totals. When a view is created with SCHEMABINDING, the underlying tables cannot be modified in ways that would affect the view definition, ensuring data consistency and allowing SQL Server to create indexes on the view. ENCRYPTION only protects view definition code, CHECK OPTION validates data modifications (not applicable for read-only reports), and VIEW_METADATA controls metadata access but does not enable performance optimizations through indexed views.
- 4
Note: The question is included in a number of questions that depicts the identical set-up. However, every question has a distinctive result. Establish if the solution satisfies the requirements.
A database, named Transactions, three tables named Client, Purchases and Items. The Client table has a column to record information regarding the last purchase made by the client. The Items table has the following fields:ItemlD
ItemName
Description
QtyonHand
MerchantName
MerchantlD
ObsoleteThe Purchases table has the following fields:
PurchaselD
ItemName
ItemlD
EmployeelD
PurchaseDateYou are preparing to execute a stored procedure that removes an obsolete item from the Items table. The stored procedure should allow for the information for the item to remain in the event that an open purchase contains an obsolete item. The stored procedure should then produce a custom error message, which identifies the PurchaselD for the open purchase
Solution: You include the Try/Parse Transact-SQL segment to handle errors.
Has the requirement been satisfied?Show answer details
Correct answer: B
No, the proposed solution does not satisfy the requirements. Based on the Transactions database scenario with Client, Purchase, and related tables, the solution likely fails to meet the specific constraints or performance requirements outlined in the question. Common issues in such scenarios include missing proper indexing strategies, inadequate foreign key relationships, or failure to implement required data integrity constraints for transactional systems.
