Welcome to awslagi.com – Sharing AWS, Anthropic, Google Cloud, Microsoft Azure IT Exams. It's free for all!

Developing Microsoft SQL Server 2012/2014 Databases

Develop SQL Server databases with professional application design.

4.8★★★★★(300 ratings)
16,606 studentsIntermediate
Gain hands-on database development skills for building reliable SQL Server solutions. The exam covers schema design, programmability, indexes, stored procedures, and data integrity, helping you create robust database applications. These skills matter for developers who need to design databases that perform well and scale safely. It also supports stronger collaboration between application teams and database teams.

What you'll learn

  • Design database schemas- Write stored procedures- Optimize indexes- Enforce data integrity- Create database objects

70-464

Lectures1
Questions27
Duration30 week
Students16,606

$20.00

Full Free Question Bank (27 Questions)

Developing Microsoft SQL Server 2012/2014 Databases (70-464) Practice Questions & Verified Answers

Click any option to test your knowledge, or reveal the verified answer and detailed explanation below each question.

Question #1Part 1

You have a table named Rooms that contains three columns. You run the following Transact-SQL statement: You discover the execution plan shown in the exhibit. (Click the Exhibit button.) You need to recommend a solution to reduce the amount of time it takes to execute the query. What should you do? More than one answer choice may achieve the goal. Select the BEST answer.

AInclude the RoomName column and the Position column in the Room_IX index.
BCreate a nonclustered index for RoomName, Id, and Position.
CCreate a clustered index for Id.
DUse the WITH (INDEX(Room_IX),NOLOCK) query hint.
Question #2Part 1

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 ,0xA694FBEA88C9354E5E2567C30A2A69E8FB4C44A9\ 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?

AOption A
BOption B
COption C
DOption D
Question #3Part 1

You have a database named database1. Database developers report that there are many deadlocks. You need to implement a solution to monitor the deadlocks. The solution must meet the following requirements: ✑ Support real-time monitoring. ✑ Be enabled and disabled easily. ✑ Support querying of the monitored data. What should you implement? More than one answer choice may achieve the goal. Select the BEST answer.

ALog errors by using trace flag 1222
BLog errors by using trace flag 1204
CA SQL Server Profiler template
DAn Extended Events session
Question #4Part 1

You need to recommend a solution to ensure that SQL1 supports the auditing requirements of usp_UpdateEmployeeName. What should you include in the recommendation?

AChange data capture
BChange tracking
CTransactional replication
DThe Distributed Transaction Coordinator (DTC)
Question #5Part 1

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?

AWHILE SUM(@RowNumber) < (SELECT @counter FROM @indextable)
BWHILE @counter < (SELECT SUM(RowNumber) FROM @indextable)
CWHILE COUNT(@RowNumber) < (SELECT @counter FROM @indextable)
DWHILE @counter
Question #6Part 1

You need to recommend a solution to ensure that SQL1 supports the auditing requirements of usp_UpdateSpeakerName. What should you include in the recommendation?

AThe Distributed Transaction Coordinator (DTC)
BTransactional replication
CChange data capture
DChange tracking
Question #7Part 1

You need to implement a change to usp_ExportOpenings that meets the integration requirements. What should you modify in usp_ExportOpenings? (Each correct answer presents part of the solution. Choose all that apply?)

ATo the end of line 04, add [Opening].
BTo the end of line 05, add [Opening! title].
CTo line 10, add FOR XML RAW.
DTo line 10, add FOR XMLEXPLICIT.
ETo line 10, add FOR XML AUTO.
Question #8Part 1

You need to add a new column named Confirmed to the Attendees table. The solution must meet the following requirements: ✑ Have a default value of false. ✑ Minimize the amount of disk space used. Which code block should you use?

AALTER TABLE Attendees ADD Confirmed bit DEFAULT 0;
BALTER TABLE Attendees ADD Confirmed char(l) DEFAULT '1';
CALTER TABLE Attendees ADD Confirmed bit DEFAULT 1;
DALTER TABLE Attendees ADD Confirmed char(l) DEFAULT `1';
Question #9Part 1

You have an application that uses a view to access data from multiple tables. You need to ensure that you can insert rows into the underlying tables by using the view. What should you do?

ACreate an INSTEAD OF trigger on the view.
BDefine the view by using the SCHEMABINDING option.
CDefine the view by using the CHECK option.
DMaterialize the view.
Question #10Part 1

You are evaluating the index design. You need to recommend a change to Indexes.sql that minimizes the amount of time it takes for usp_SelectEmployessByName to execute. Which line of code should you use to replace line 08 of Indexes.sql?

A(EmployeeID) INCLUDE (LastName);
B(LastName) INCLUDE (FirstName);
C(LastName, EmployeeID);
D(FirstName, LastName);
Question #11Part 1

You have a database that contains a user-defined function named Schema1.Udf1 and two tables named Schema1.Table1 and Schema1.Table2. Schema1.Table1 has 1 million rows. The schema for Schema1.Table1 is configured as shown in the following table. Schema1.Udf1 was defined by using the following code: You need to write a query that will contain the following columns: ✑ Country ✑ CountryID ✑ CustomerName The solution must meet the following requirements: ✑ Rows must be returned only if the function returns data. ✑ The amount of time it takes the query to execute must be minimized. Which query should you use?

AOption A
BOption B
COption C
DOption D
Question #12Part 1

Developers report that usp_UpdateSessionRoom periodically returns error 3960. You need to prevent the error from occurring. The solution must ensure that the stored procedure returns the original values to all of the updated rows. What should you configure in Procedures.sql?

AReplace line 46 with the following code: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
BReplace line 46 with the following code: SET TRANSACTION ISOLATION LEVEL REPEATABLE READ
CMove the SELECT statement at line 49 to line 57.
DMove the SET statement at line 46 to line 53.
Question #13Part 1

Developers report that usp_UpdateOffice periodically returns error 3960. You need to prevent the error from occurring. The solution must ensure that the stored procedure return the original values to all of the updated rows. What should you configure in StoredProcedures.sql?

AMove the SET statement at line 38 to line 45
BChange line 38 to: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
CMove the SELECT statement at line 41 to line 50
DChange line 38 to: SET TRANSACTION ISOLATION LEVEL REPEATABLE READ
Question #14Part 1

You need to ensure that a new execution plan is used by usp_GetOrdersByProduct each time the stored procedure runs. What should you do?

AExecute sp_help usp_GetOrdersByProduct\
BAdd WITH (FORCESEEK) to line 69 in usp.GetOrdersByProduct.
CAdd WITH RECOMPILE to line 64 in usp.GetOrdersByProduct.
DExecute sp_recompile usp.GetOrdersByProduct'.
Question #15Part 1

You discover that usp.SelectSpeakersByName executes slowly if usp_UpdateSpeakerName executes simultaneously. You need to minimize the execution time of usp.SelectSpeakersByName. The solution must not affect the performance of the other stored procedures. What should you update?

AUsp_UpdateSpeakerName to use the NOLOCK query hint
BUsp_UpdateSpeakerName to use snapshot isolation
CUsp_SelectSpeakersByName to use the NOLOCK query hint
DUsp_SelectSpeakersByName to use snapshot isolation
Question #16Part 1

You need to add a new column named Confirmed to the Employees table. The Confirmed column has the following requirements: ✑ It must have a default value of TRUE. ✑ It must minimize the amount of disk space used. Which Transact-SQL statement should you run?

AALTER TABLE Employees ADD Confirmed but DEFAULT 0;
BALTER TABLE Employees ADD Confirmed but DEFAULT 1;
CALTER TABLE Employees ADD Confirmed nchar(1) DEFAULT '1';
DALTER TABLE Employees ADD Confirmed nchar(1) DEFAULT '0';
Question #17Part 1

B\Batch 1 - While testing usp.GetFutureSessions, you discover that IX_Sessions is accessed by a scan rather than a seek. You need to minimize the amount of time it takes to execute usp_GetFutureSessions. What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

AOption A
BOption B
COption C
DOption D
EOption E
Question #18Part 1

You have a Microsoft SQL Azure database. You have the following stored procedure: You discover that the stored procedure periodically fails to update HR.Employees. You need to ensure that HR.Employees is always updated when up_employees executes. The solution must minimize the amount of time required for the stored procedure to execute and the number of locks held. What should you do?

AAdd the following line of code to line 05: SET TRANSACTION ISOLATION LEVEL SNAPSHOT
BAdd the following line of code to line 13: WITH (UPDLOCK)
CAdd the following line of code to line 05: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
DAdd the following line of code to line 08: WITH (UPDLOCK)
Question #19Part 1

You need to convert the functionality of Dynamic.sql to use a stored procedure. Which Transact SQL statement should you add to the stored procedure contain?

ACREATE PROC Production.ProductsAfterDate (@ProductID AS varchar(11), @CreationDate AS date) AS ...
BCREATE PROC Production.ProductsAfterDate( @sqlstring AS nvarchar(1000)) AS ...
CCREATE PROC Production.ProductsAfterDate( @sqlstring AS nvarchar(1000), OUTPUT @ProductID AS varchar(11), OUTPUT @CreationDate AS date) AS ...
DCREATE PROC Production.ProductsAfterDate( @sqlstring AS nvarchar(1000), @ProductID AS varchar(11), @CreationDate AS date) AS ...
Question #20Part 1

You have a database named Database1. Database1 has two stored procedures named Proc1 and Proc2 and a table named Table1. Table1 has millions of rows. Proc1 updates data in Table1. Proc2 reads data from Table1. You discover that when Proc1 is executed to update more than 4,000 rows, Proc2 is blocked. The block affects all rows, including those that are not being updated by Proc1. You need to ensure that when Proc1 is executing, Proc2 can access the data in Table1 that Proc1 is not updating. What should you change Proc1 to do? More than one answer choice may achieve the goal. Select the BEST answer.

AUpdate less than 4,000 rows simultaneously.
BUse the PAGLOCK table hint.
CWait for Proc2 to complete.
DUse the ROWLOCK table hint.
Question #21Part 1

You are evaluating the index design for the database. You have the following requirements: ✑ minimize the amount of time it takes for usp_AttendeesReport to run ✑ minimize the amount of database fragmentation. You need to recommend a change to Indexes.sql Which line of code should you use to replace line 12 of Indexes.sql?

A(LastName);
B(FirstName) INCLUDE (LastName);
C(LastName, FirstName);
D(LastName) INCLUDE (FirstName);
Question #22Part 1

You need to modify usp_GetOrdersAndItems to ensure that an order is NOT retrieved by usp_GetOrdersAndItems while the order is being updated. What should you add to usp_getOrdersAndItems?

AAdd SET TRANSACTION ISOLATION LEVEL SERIALIZABLE to line 44
BAdd WITH (UPDLOCK) to the end of line 42
CAdd SET TRANSACTION ISOLATION LEVEL SNAPSHOT to line 44
DAdd WITH (READPAST) to the end of line 42
Question #23Part 1

You use SQL Server 2014 to maintain the data used by applications at your company. You need to run two separate SQL statements. You must guarantee that the following three things happen: ✑ Either BOTH statements succeed or BOTH statements fail as a batch. ✑ If an error occurs on the first statement, SQL should not attempt to run the second statement. ✑ Error information should be returned to the client. What should you do?

AOption A
BOption B
COption C
DOption D
Question #24Part 1

You plan to create a database that has multiple tables. The tables will contain product information. Each product has a stock-keeping unit (SKU). You need to recommend a solution to ensure that each SKU starts with the letters "ADV" and is followed by 10 digits. The solution must minimize the amount of development effort required. What should you include in the recommendation?

AA FOREIGN KEY constraint
BA trigger
CA user-defined data type
DA CHECK constraint
Question #25Part 1

You have a database that uses the following management views: ✑ Sys.dm_os_volume_stats ✑ Sys.dm_db_partition_stats ✑ Sys.dm_db_file_space_usage ✑ Sys.fulltext_indexes You plan to migrate the database to Microsoft SQL Azure. You need to identify which view can be used in SQL Azure. Which view should you identify?

Asys.fulltext_indexes
Bsys.dm_db_file_space_usage
Csys.dm_os_volume_stats
Dsys.dm_db_partition_stats
Question #26Part 1

You need to modify the Orders table to store the XML data used by the retailers. Which statement should you execute?

AALTER Orders ADD originalOrder XML (ValidateOrder);
BALTER Orders ADD originalOrder XML;
CALTER Orders ADD originalOrder varchar(max);
DALTER Orders ADD originalOrder varbinary(max);
Question #27Part 1

You need to identify which long running transactions use an index. Which dynamic management view should you use?

Asys.dm_exec_query_optimizer_info
Bsys.dm_exec_plan_attributes
Csys.dm_exec_requests
Dsys.dm_exec_procedure_stats

📢 Unlock Full Access to Success!

"The content displayed here is a promotional preview and contains only 50% of the actual exam database. To access the complete set of updated questions, please upgrade to the Full Version."

👉 Click the button and follow the instructions to secure your full access immediately!