Designing Database Solutions for Microsoft SQL Server v12.0

Page:    1 / 8   
Exam contains 115 questions

You are designing your maintenance plan.
Which command should you use only during the monthly maintenance window?

  • A. DBCC INDEXDEFRAG (ProdDB, SalesOrderDetail, SODIndex)
  • B. ALTER INDEX SODIndex ON SalesOrderDetail REORGANIZE
  • C. ALTER INDEX SODIndex ON SalesOrderDetail REBUILD
  • D. ALTER INDEX SODIndex ON SalesOrderDetail REBUILD WITH (ONLINE * ON)


Answer : D

Explanation:
* Scenario: Database Issues
The current database does not perform well. Additionally, a recent disk problem caused the system to go down, resulting in lost sales revenue. In reviewing the current system, you found that there are no automated maintenance procedures. The database is severely fragmented, and everyone has read and write access.
* After the degree of fragmentation is known, use the following table to determine the best method to correct the fragmentation. avg_fragmentation_in_percent value
/ > 5% and < = 30%
then use

ALTER INDEX REORGANIZE -
/ > 30%
then use
ALTER INDEX REBUILD WITH (ONLINE = ON)
ALTER INDEX (Transact-SQL)

You need to implement a backup strategy to support the requirements.
Which two actions should you perform? Each correct answer presents part of the solution.
Choose two.

  • A. Create a credential called MyCredential on SQL Server by using a Windows domain account and password.
  • B. Schedule a full backup by using the command BACKUP DATABASE ProdDB TO DISK...
  • C. Create a share on your Windows Azure site by using your Windows Azure storage account information, and grant permission to the SQL Server service login.
  • D. Schedule a full backup by using the command BACKUP DATABASE ProdDB TO URL ... WTTH CREDENTIAL=N'MyCredential'
  • E. Create a share on the hot standby site and grant permission to the SQL Server service login.
  • F. Create a credential called MyCredential on SQL Server, using MyStorageAccount for the storage account name and StorageAccountKey for the access key.
  • G. Schedule a full backup by using the command BACKUP DATABASE ProdDB TO SHARE ... WITH CREDENTIAL=N' MyCredential'


Answer : CD

Explanation:
* Scenario: The current nightly backups have been failing due to insufficient space on the available drives and manual drive cleanup often needing to happen to get past the errors.
Additional space will not be made available for backups on the HQ or satellite servers.
* Need to store files in the cloud.
* Manage your backups to Windows Azure: Using the same methods used to backup to
DISK and TAPE, you can now back up to Windows Azure storage by Specifying URL as the backup destination. You can use this feature to manually backup or configure your own backup strategy like you would for a local storage or other off-site options. This feature is also referred to as SQL Server Backup to URL.
Reference: SQL Server Managed Backup to Windows Azure

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: 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.
Reference: How to Use Azure Storage for SQL Server Backup and Restore https://azure.microsoft.com/en-us/documentation/articles/storage-use-storage-sql-server- backup-restore/

The business requires a satellite office to have a local copy of the data to report against.
You want to implement a solution to support the requirements. You need to establish a new
Availability Group between the two servers.
Develop the solution by selecting and arranging the required code blocks in the correct order. You may not need all of the code blocks.




Answer :

Explanation:
Box 1:


Box 2:

Box 3:

Box 4:

Box 5:

Box 6:

Box 7:

Note:
* The following table lists the basic tasks involved in creating and configuring an availability group and indicates which Transact-SQL statements to use for these tasks. The AlwaysOn
Availability Groups tasks must be performed in the sequence in which they are presented in the table.
(step 2) Create database mirroring endpoint (once per SQL Server instance)
CREATE ENDPOINT endpointName FOR DATABASE_MIRRORING
(step 3) Create availability group

CREATE AVAILABILITY GROUP -
(step 4) Join secondary replica to availability group
ALTER AVAILABILITY GROUP group_name JOIN
(step 5-6)

Prepare the secondary database -
BACKUP and RESTORE.
Create backups on the server instance that hosts the primary replica.
Restore backups on each server instance that hosts a secondary replica, using RESTORE
WITH NORECOVERY.
(step 7)
Start data synchronization by joining each secondary database to availability group
ALTER DATABASE database_name SET HADR AVAILABILITY GROUP = group_name

Topic 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

You need to recommend a change to USP_3 to ensure that the procedure continues to execute even if one of the UPDATE statements fails.
Which change should you recommend?

  • A. Set the XACT_ABORT option to off.
  • B. Set the XACT_ABORT option to on.
  • C. Set the IMPLICIT_TRANSACTIONS option to off.
  • D. Set the IMPLICIT_TRANSACTIONS option to on.


Answer : A

Explanation:
* Scenario: 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.
* When SET XACT_ABORT is OFF, in some cases only the Transact-SQL statement that raised the error is rolled back and the transaction continues processing.
Reference: http://msdn.microsoft.com/en-us/library/ms188792.aspx

You need to recommend a disaster recovery solution for the Dev database.
What should you include in the recommendation?

  • A. The simple recovery model and full backups
  • B. The bulk-logged recovery model and full backups
  • C. The full recovery model, full backups, and differential backups
  • D. The full recovery model, full backups, and transaction log backups


Answer : A

Explanation:
* Scenario: 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.
* The simple recovery model provides the simplest form of backup and restore. This recovery model supports both database backups and file backups, but does not support log backups. Transaction log data is backed up only with the associated user data. The absence of log backups simplifies managing backup and restore. However, a database can be restored only to the end of the most recent backup.
Incorrect:
Not B: The bulk-logged recovery model is a special-purpose recovery model that should be used only intermittently to improve the performance of certain large-scale bulk operations, such as bulk imports of large amounts of data.
Reference: Recovery Models (SQL Server)

You need to recommend a solution to meet the security requirements of the junior database administrators.
What should you include in the recommendation?

  • A. A server role
  • B. A database role
  • C. A credential
  • D. A shared login


Answer : C

Explanation:
* Scenario: 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.
* Credentials provide a way to allow SQL Server Authentication users to have an identity outside of SQL Server. Credentials can also be used when a SQL Server Authentication user needs access to a domain resource, such as a file location to store a backup.

Reference: Create a Credential -

You need to recommend a solution to ensure that USP_4 adheres to the security requirements.
What should you include in the recommendation?

  • A. Enable SQL Server Audit.
  • B. Enable trace flags.
  • C. Configure data manipulation language (DML) triggers.
  • D. Enable C2 audit tracing.


Answer : A

Explanation:
* Scenario: 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.
* Beginning in SQL Server 2008 Enterprise, you can set up automatic auditing by using
SQL Server Audit.
Reference: SQL Server Audit (Database Engine)

You need to recommend a solution to minimize the amount of time it takes to execute
USP_2.
What should you recommend?

  • A. A database snapshot
  • B. A table variable
  • C. A temporary table
  • D. Snapshot isolation


Answer : C

Explanation:
Scenario: 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.
Reference: CREATE TABLE (SQL Server)

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. A view
  • B. A temporary table
  • C. A table variable
  • D. A function


Answer : A

Explanation:
* 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.
CREATE TABLE (SQL Server)

You need to recommend a solution for the planned changes to the customer classifications.
What should you recommend? (Each correct answer presents part of the solution. Choose all that apply.)

  • A. Add a row to the Customers table each time a classification changes.
  • B. Add columns for each classification to the Customers table.
  • C. Add a table to track any changes made to the classification of each customer.
  • D. Add a column to the Classifications table to track the status of each classification.
  • E. Implement change data capture.


Answer : CD

Explanation:
* Scenario: 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.
Incorrect:
Not E: Change data capture provides information about DML changes on a table and a database. By using change data capture, you eliminate expensive techniques such as user triggers, timestamp columns, and join queries.

You need to recommend a solution for the error handling of USP_3. The solution must minimize the amount of custom code required.
What should you recommend?

  • A. Use the @@ERROR variable in the nested stored procedures.
  • B. Use a TRY CATCH block in the called stored procedures.
  • C. Use the @@ERROR variable in the called stored procedures.
  • D. Use the RAISERROR command in the nested stored procedures.


Answer : B

Explanation:
* Must catch and handle the error.
* Scenario: 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.
Reference: TRY...CATCH (Transact-SQL)

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?

  • 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.


Answer : C

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.
Reference: http://msdn.microsoft.com/en-us/library/ms178592.aspx

You need to recommend a change to USP_3 to ensure that the procedure completes only if all of the UPDATE statements complete.
Which change should you recommend?

  • A. Set the XACT_ABORT option to off
  • B. Set the XACT_ABORT option to on.
  • C. Set the IMPLICIT_TRANSACTIONS option to off.
  • D. Set the IMPLICIT_TRANSACTIONS option to on.


Answer : B

Explanation:
* Scenario: 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.
* When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back.

You need to recommend a solution to minimize the amount of time it takes to execute
USP_5.
What should you include in the recommendation?

  • A. Enable cross-database chaining.
  • B. Use a server role to group all logins.
  • C. Use the EXECUTE AS clause in USP_5.
  • D. Copy USP.5 to each database.


Answer : A

Explanation:
* Scenario: A stored procedure named USP_5 changes data in multiple databases.
Security checks are performed each time USP_5 accesses a database.
* Cross-database ownership chaining occurs when a procedure in one database depends on objects in another database. A cross-database ownership chain works in the same way as ownership chaining within a single database, except that an unbroken ownership chain requires that all the object owners are mapped to the same login account. If the source object in the source database and the target objects in the target databases are owned by the same login account, SQL Server does not check permissions on the target objects.
Reference: http://technet.microsoft.com/en-us/sqlserver/bb669059(v=vs.71).aspx

Page:    1 / 8   
Exam contains 115 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary.com is owned by MBS Tech Limited: Room 1905 Nam Wo Hong Building, 148 Wing Lok Street, Sheung Wan, Hong Kong. Company registration number: 2310926
Certlibrary doesn't offer Real Microsoft Exam Questions. Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.
Terms & Conditions | Privacy Policy