Provisioning SQL Databases Quiz Questions and Answers

Answer :
  • sys.dm_db_missing_index_group_stats
  • sys.dm_db_missing_index_groups
  • sys.dm_db_missing_index_details

Explanation :

The missing indexes feature consists of the following components: A set of dynamic management objects that can be queried to return information about missing indexes. The Missing Indexes element in XML Showplans, which correlate indexes that the query optimizer considers missing with the queries for which they are missing. Dynamic Management Objects After running a typical workload on SQL Server, you can retrieve information about missing indexes by querying the dynamic management objects listed in the following table. These dynamic management objects are stored in the master database. sys.dm_db_missing_index_group_stats Returns summary information about missing index groups, for example, the performance improvements that could be gained by implementing a specific group of missing indexes. sys.dm_db_missing_index_groups Returns information about a specific group of missing indexes, such as the group identifier and the identifiers ofall missing indexes that are contained in that group. sys.dm_db_missing_index_details Returns detailed information about a missing index; for example, it returns the name and identifier of the table where the index is missing, and the columns and column types that should make up the missing index. sys.dm_db_missing_index_columns Returns information about the database table columns that are missing an index. References: https://technet.microsoft.com/en-us/library/ms345524(v=sql.105).aspx
Answer :
  • Always Encrypted

Explanation :

To encrypt columns you can configure Always Encrypted. SQL Server Management Studio (SSMS) provides a wizard that helps you easily configure Always Encrypted by setting up the column master key, column encryption key, and encrypted columns for you. Always Encrypted allows client applications to encrypt sensitive data and never reveal the data or the encryption keys to SQL Server or Azure SQL Database. An Always Encrypted enabled driver, such as the ODBC Driver 13.1 for SQL Server, achieves this by transparently encrypting and decrypting sensitive data in the client application. Note: The ODBC driver automatically determines which query parameters correspond to sensitive database columns (protected using Always Encrypted), and encrypts the values of those parameters before passing the data to SQL Server or Azure SQL Database. Similarly, the driver transparently decrypts data retrieved from encrypted database columns in query results. References: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-always-encrypted-azure-key-vault#encrypt-columns-configure-always-encrypted https://msdn.microsoft.com/en-us/library/mt637351(v=sql.110).aspx
Answer :
  • Set the Alert logic threshold to Dynamic
  • Set Threshold Sensitivity to Low

Explanation :

B: Dynamic Thresholds continuously learns the data of the metric series and tries to model it using a set of algorithms and methods. It detects patterns in the data such as seasonality (Hourly / Daily / Weekly), and is able to handle noisy metrics (such as machine CPU or memory) as well as metrics with low dispersion (such as availability and error rate). D: Alert threshold sensitivity is a high-level concept that controls the amount of deviation from metric behavior required to trigger an alert. Low – The thresholds will be loose with more distance from metric series pattern. An alert rule will only trigger on large deviations, resulting in fewer alerts. Incorrect Answers: A: High – The thresholds will be tight and close to the metric series pattern. An alert rule will be triggered on the smallest deviation, resulting in more alerts. References: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-dynamic-thresholds
Answer :
  • Increase the size of the tempdb data files to 1 GB.

Explanation :

Explanation: In an effort to simplify the tempdb configuration experience, SQL Server 2016 setup has been extended to configure various properties for tempdb for multi-processor environments. 1. A new tab dedicated to tempdb has been added to the Database Engine Configuration step of setup workflow. 2. Configuration options: Data Files * Number of files – this will default to the lower value of 8 or number of logical cores as detected by setup. * Initial size – is specified in MB and applies to each tempdb data file. This makes it easier to configure all files of same size. Total initial size is the cumulative tempdb data file size (Number of files * Initial Size) that will be created. * Autogrowth – is specified in MB (fixed growth is preferred as opposed to a non-linear percentage based growth) and applies to each file. The default value of 64MB was chosen to cover one PFS interval.
Answer :
  • Turn on auditing and write audit logs to an Azure Storage account.
  • Turn on Advanced Data Security for the Azure SQL server.
  • Apply sensitivity labels named Highly Confidential to the column.

Explanation :

C: Advanced Data Security (ADS) is a unified package for advanced SQL security capabilities. ADS is available for Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics. It includes functionality for discovering and classifying sensitive data D: You can apply sensitivity-classification labels persistently to columns by using new metadata attributes that have been added to the SQL Server database engine. This metadata can then be used for advanced, sensitivity-based auditing and protection scenarios. A: An important aspect of the information-protection paradigm is the ability to monitor access to sensitive data. Azure SQL Auditing has been enhanced to include a new field in the audit log called data_sensitivity_information. This field logs the sensitivity classifications (labels) of the data that was returned by a query.
Answer :
  • Standard locally redundant blob storage

Explanation :

Explanation: A URL specifies a Uniform Resource Identifier (URI) to a unique backup file. The URL is used to provide the location and name of the SQL Server backup file. The URL must point to an actual blob, not just a container. If the blob does not exist, it is created. If an existing blob is specified, BACKUP fails, unless the “WITH FORMAT” option is specified to overwrite the existing backup file in the blob. LOCALLY REDUNDANT STORAGE (LRS) makes multiple synchronous copies of your data within a single datacenter. Incorrect Answers: F: Zone redundant blob storage would be me more expensive as it stores three copies of data across multiple datacenters within or across regions. https://msdn.microsoft.com/en-us/library/dn435916.aspx https://azure.microsoft.com/en-us/pricing/details/storage/blobs/
Answer :
  • Enable server property contained database authentication
  • Set database containment to PARTIAL

Explanation :

A contained database is a database that is isolated from other databases and from the instance of SQL Server that hosts the database. B: In the contained database user model, the login in the master database is not present. Instead, the authentication process occurs at the user database, and the database user in the user database does not have an associated login in the master database. SQL Database and SQL Data Warehouse support Azure Active Directory identities as contained database users D: The contained database feature is currently available only in a partially contained state. A partially contained database is a contained database that allows the use of uncontained features. References: https://docs.microsoft.com/en-us/sql/relational-databases/databases/contained-databases
Answer :
  • Yes

Explanation :

Azure SQL Database and Data Warehouse offer encryption-at-rest by providing Transparent Data Encryption (TDE) for all data written to disk, including databases, log files and backups. This protects data in case of unauthorized access to hardware. TDE provides a TDE Protector that is used to encrypt the Database Encryption Key (DEK), which in turn is used to encrypt the data. With the TDE and Bring Your Own Key (BYOK) offering currently in preview, customers can take control of the TDE Protector in Azure Key Vault. Taking advantage of TDE with BYOK for databases that are geo-replicated to maintain high availability requires to configure and test the scenario carefully. References: https://azure.microsoft.com/en-us/blog/how-to-configure-azure-sql-database-geo-dr-with-azurekey-vault/
Answer :
  • Set MAXDOP to half the number of CPUs available.

Explanation :

When an instance of SQL Server runs on a computer that has more than one microprocessor or CPU, it detects the best degree of parallelism, that is, the number of processors employed to run a single statement, for each parallel plan execution. You can use the max degree of parallelism option to limit the number of processors to use in parallel plan execution. Incorrect Answers: A: The Auto Close property exposes server behavior for databases not accessed by a user. This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. https://msdn.microsoft.com/en-us/library/ms189094.aspx