{"id":13200,"date":"2026-09-16T07:02:47","date_gmt":"2026-09-16T07:02:47","guid":{"rendered":"https:\/\/www.examlabs.com\/certification\/?p=13200"},"modified":"2026-09-16T07:02:47","modified_gmt":"2026-09-16T07:02:47","slug":"microsoft-dp-300-practice-test-questions-and-exam-dumps-part-9-q161-180","status":"publish","type":"post","link":"https:\/\/www.examlabs.com\/certification\/microsoft-dp-300-practice-test-questions-and-exam-dumps-part-9-q161-180\/","title":{"rendered":"Microsoft DP-300 Practice Test Questions and Exam Dumps Part 9 Q161-180"},"content":{"rendered":"<h1><\/h1>\n<p><b>View Full <\/b><a href=\"https:\/\/www.examlabs.com\/dp-300-exam-dumps\"><b>Microsoft DP-300 Exam Dumps<\/b><\/a><b> and Practice Test Dumps<\/b><\/p>\n<p>&nbsp;<\/p>\n<h3><b>Question 161. Which SQL Server feature helps restrict users from accessing specific rows in a table?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> Dynamic Data Masking<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Row-Level Security<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Transparent Data Encryption<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> Always Encrypted<\/span><\/p>\n<p><b>Answer: 2) Row-Level Security<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Row-Level Security (RLS) controls access to individual rows based on the characteristics of the user executing a query. It uses security predicates to determine which rows a user can view or modify. This is useful when multiple users share the same database but should only access records belonging to their department, region, or assigned organization. RLS operates at the database engine level, so applications do not necessarily need separate filtering logic. Dynamic Data Masking and encryption protect sensitive values differently, but they do not provide row-based authorization. Therefore, Row-Level Security is the appropriate feature for restricting access to particular rows.<\/span><\/p>\n<h3><b>Question 162. Which SQL Server feature hides sensitive column values from unauthorized users without changing the underlying data?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> Row-Level Security<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Dynamic Data Masking<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Query Store<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> Database Backup<\/span><\/p>\n<p><b>Answer: 2) Dynamic Data Masking<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Dynamic Data Masking (DDM) helps prevent unauthorized users from viewing complete sensitive values while keeping the original data unchanged in the database. It can mask information such as phone numbers, email addresses, or credit card values when users query protected columns. The masking is applied when data is returned to the requester rather than permanently modifying stored values. Appropriate permissions can allow authorized users to see the unmasked information. Unlike encryption, DDM is primarily intended to limit exposure of sensitive information during normal query access. Therefore, Dynamic Data Masking is the correct feature for hiding sensitive values from unauthorized database users.<\/span><\/p>\n<h3><b>Question 163. Which SQL Server technology helps protect sensitive data by encrypting values so that the database engine cannot directly view the plaintext?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> Query Store<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Always Encrypted<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Row-Level Security<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> SQL Server Agent<\/span><\/p>\n<p><b>Answer: 2) Always Encrypted<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Always Encrypted is designed to protect sensitive information by encrypting selected column values on the client side. The encryption keys are not directly available to the database engine, which means sensitive plaintext values remain protected even if someone gains elevated database access. Applications that are configured to work with Always Encrypted can decrypt the data when authorized operations are performed. This technology is particularly useful for protecting highly sensitive information such as identification numbers or financial data. It differs from Transparent Data Encryption, which protects database files at rest but does not prevent the database engine from seeing decrypted values during normal processing.<\/span><\/p>\n<h3><b>Question 164. Which database object stores a predefined set of SQL statements that can be executed by calling its name?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> View<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Stored procedure<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Index<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> Constraint<\/span><\/p>\n<p><b>Answer: 2) Stored procedure<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A stored procedure is a programmable database object that contains one or more SQL statements and can accept parameters. Database administrators and developers commonly use stored procedures to encapsulate business logic, perform repetitive operations, and control access to underlying data. Instead of sending multiple individual statements from an application, the application can call the procedure and provide required parameter values. Stored procedures can also simplify maintenance because logic is stored centrally in the database. A view primarily represents query results, while an index improves data retrieval performance. Therefore, a stored procedure is the database object designed to store and execute a predefined collection of SQL statements.<\/span><\/p>\n<h3><b>Question 165. Which SQL Server feature automatically calculates a column value based on an expression involving other columns?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> Computed column<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Foreign key<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Trigger<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> Synonym<\/span><\/p>\n<p><b>Answer: 1) Computed column<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A computed column derives its value from an expression based on other columns in the same table. For example, a table containing quantity and unit price could define a computed column that calculates the total amount automatically. This avoids requiring applications to calculate the value separately each time the record is created or updated. Depending on its definition, a computed column may also be persisted so that SQL Server stores the calculated result. A foreign key establishes a relationship between tables, while a trigger executes automatically when specified database events occur. Therefore, a computed column is the appropriate feature for automatically deriving values from other columns.<\/span><\/p>\n<h3><b>Question 166. Which SQL Server statement creates a server-level login?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> CREATE USER<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> CREATE LOGIN<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> CREATE ROLE<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> CREATE ACCOUNT<\/span><\/p>\n<p><b>Answer: 2) CREATE LOGIN<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">CREATE LOGIN<\/span><span style=\"font-weight: 400;\"> statement creates a security principal at the SQL Server instance level. A login is used to authenticate a connection to the SQL Server instance. After authentication, the login can be mapped to a database user in one or more databases. This separation between server-level login and database-level user allows administrators to manage access at different security scopes. <\/span><span style=\"font-weight: 400;\">CREATE USER<\/span><span style=\"font-weight: 400;\"> creates a database-level principal rather than a server login. Roles are used to group permissions but do not replace the login creation process. Therefore, <\/span><span style=\"font-weight: 400;\">CREATE LOGIN<\/span><span style=\"font-weight: 400;\"> is the correct statement when an administrator needs to create a server-level SQL Server login.<\/span><\/p>\n<h3><b>Question 167. Which statement creates a database user that can be mapped to an existing login?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> CREATE LOGIN<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> CREATE USER<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> CREATE DATABASE<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> CREATE SERVER<\/span><\/p>\n<p><b>Answer: 2) CREATE USER<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">CREATE USER<\/span><span style=\"font-weight: 400;\"> statement creates a database-level security principal. A database user can be mapped to an existing server-level login, allowing that login to access the database according to the permissions assigned to the user. This distinction is important in SQL Server security because logins exist at the instance level, while users exist within individual databases. An administrator may create one login and then create corresponding database users in multiple databases as required. <\/span><span style=\"font-weight: 400;\">CREATE LOGIN<\/span><span style=\"font-weight: 400;\"> is used for server authentication, not database authorization. Therefore, <\/span><span style=\"font-weight: 400;\">CREATE USER<\/span><span style=\"font-weight: 400;\"> is the appropriate statement for creating a database user associated with an existing login.<\/span><\/p>\n<h3><b>Question 168. Which permission is required to allow a user to execute a stored procedure?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> SELECT<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> EXECUTE<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> DELETE<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> REFERENCES<\/span><\/p>\n<p><b>Answer: 2) EXECUTE<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">EXECUTE<\/span><span style=\"font-weight: 400;\"> permission allows a user or role to run stored procedures and other executable database objects when applicable. For example, an administrator can grant EXECUTE permission on a specific stored procedure without giving the user direct SELECT, INSERT, UPDATE, or DELETE permissions on the underlying tables. This approach can improve security by allowing users to perform approved operations through controlled procedures. The SELECT permission is primarily used for reading data, while DELETE permits removal of rows. Therefore, when the requirement is specifically to allow a user to run a stored procedure, the appropriate permission is EXECUTE.<\/span><\/p>\n<h3><b>Question 169. Which SQL Server statement is used to explicitly assign permissions to a user or role?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> GRANT<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> DENY<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> REVOKE<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> DROP<\/span><\/p>\n<p><b>Answer: 1) GRANT<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">GRANT<\/span><span style=\"font-weight: 400;\"> statement explicitly assigns a specified permission to a database principal such as a user or role. For example, an administrator can grant SELECT permission on a table or EXECUTE permission on a stored procedure. Using GRANT provides controlled access without requiring broader permissions than necessary. <\/span><span style=\"font-weight: 400;\">DENY<\/span><span style=\"font-weight: 400;\"> explicitly prevents access, while <\/span><span style=\"font-weight: 400;\">REVOKE<\/span><span style=\"font-weight: 400;\"> removes a previously granted or denied permission according to the applicable permission hierarchy. The DROP statement is used to remove database objects and is unrelated to permission assignment. Therefore, GRANT is the correct statement when an administrator needs to provide a user or role with a specific database permission.<\/span><\/p>\n<h3><b>Question 170. Which SQL Server statement removes a previously granted permission?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> GRANT<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> DENY<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> REVOKE<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> REMOVE<\/span><\/p>\n<p><b>Answer: 3) REVOKE<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">REVOKE<\/span><span style=\"font-weight: 400;\"> statement is used to remove a previously granted permission or remove an explicit DENY in appropriate permission scenarios. For example, if a user previously received SELECT permission on a table and that access is no longer required, an administrator can use REVOKE to remove the explicit grant. REVOKE is different from DENY because DENY explicitly blocks permission, while REVOKE removes an explicit permission assignment. Administrators should understand SQL Server&#8217;s permission hierarchy when multiple roles and permissions are involved. Therefore, REVOKE is the appropriate statement when an administrator needs to withdraw an explicitly assigned permission.<\/span><\/p>\n<h3><b>Question 171. Which SQL Server statement explicitly prevents a user or role from receiving a specified permission?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> GRANT<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> DENY<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> REVOKE<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> CANCEL<\/span><\/p>\n<p><b>Answer: 2) DENY<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">DENY<\/span><span style=\"font-weight: 400;\"> statement explicitly prevents a principal from receiving a specified permission through the normal permission hierarchy. For example, an administrator can deny SELECT permission on a table to a user. DENY is different from REVOKE because REVOKE removes an explicit permission assignment, whereas DENY establishes an explicit restriction. SQL Server permission evaluation can involve memberships in multiple roles, so administrators must carefully consider the effective permissions of a principal before applying DENY. GRANT provides access rather than restricting it. Therefore, DENY is the correct statement when the requirement is to explicitly block a specific permission.<\/span><\/p>\n<h3><b>Question 172. Which SQL Server constraint ensures that a column value satisfies a specified logical condition?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> CHECK<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> FOREIGN KEY<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> DEFAULT<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> UNIQUE<\/span><\/p>\n<p><b>Answer: 1) CHECK<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A CHECK constraint ensures that values inserted or updated in a column satisfy a defined logical condition. For example, a table could use a CHECK constraint to ensure that an employee&#8217;s salary is greater than zero or that an age value falls within an acceptable range. SQL Server evaluates the condition when data is inserted or modified. If the condition is not satisfied, the operation is rejected. A FOREIGN KEY enforces relationships between tables, while a UNIQUE constraint prevents duplicate values. Therefore, CHECK is the appropriate constraint when database administrators need to enforce a specific rule on acceptable column values.<\/span><\/p>\n<h3><b>Question 173. Which constraint uniquely identifies every row in a SQL Server table?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> CHECK constraint<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> DEFAULT constraint<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> PRIMARY KEY constraint<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> FOREIGN KEY constraint<\/span><\/p>\n<p><b>Answer: 3) PRIMARY KEY constraint<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A PRIMARY KEY constraint uniquely identifies each row within a table. The column or combination of columns used as the primary key must contain unique values and cannot contain NULL values. Primary keys are commonly used as the main identifier for records and can also be referenced by foreign keys in related tables. A CHECK constraint validates values against a condition, while a FOREIGN KEY establishes referential relationships between tables. A DEFAULT constraint supplies a value when one is not explicitly provided. Therefore, the PRIMARY KEY constraint is the correct choice when the objective is to uniquely identify every row in a table.<\/span><\/p>\n<h3><b>Question 174. Which SQL Server constraint prevents duplicate values in a column while allowing the column to remain separate from the primary key?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> FOREIGN KEY<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> UNIQUE<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> CHECK<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> DEFAULT<\/span><\/p>\n<p><b>Answer: 2) UNIQUE<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A UNIQUE constraint ensures that duplicate values are not stored in the constrained column or combination of columns. It is useful when a table has an attribute that must remain unique but is not selected as the primary key. For example, an organization may require every employee&#8217;s email address to be unique while using an employee ID as the primary key. A table can have multiple UNIQUE constraints, whereas it normally has only one primary key constraint. FOREIGN KEY establishes relationships, CHECK validates conditions, and DEFAULT supplies values. Therefore, UNIQUE is the correct constraint for preventing duplicate values in a non-primary-key column.<\/span><\/p>\n<h3><b>Question 175. Which type of SQL Server backup contains a complete copy of the database at the time the backup is created?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> Differential backup<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Transaction log backup<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Full backup<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> Partial backup<\/span><\/p>\n<p><b>Answer: 3) Full backup<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A full database backup contains a complete backup of the database data required for restoration. It provides a baseline from which additional backup strategies can be built. Organizations often combine full backups with differential and transaction log backups to meet recovery requirements while controlling backup storage and duration. A differential backup contains changes made since the most recent full backup, while a transaction log backup records transaction log activity for supported recovery models. Full backups are therefore fundamental to many SQL Server recovery strategies. When the requirement is to create a complete backup of the database at a particular point, a full backup is the appropriate choice.<\/span><\/p>\n<h3><b>Question 176. Which SQL Server backup contains changes made since the most recent full database backup?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> Full backup<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Differential backup<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Transaction log backup<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> Copy-only log backup<\/span><\/p>\n<p><b>Answer: 2) Differential backup<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A differential backup contains data that has changed since the most recent full database backup. As additional changes occur, a differential backup may become larger because it continues to include changes made after that baseline full backup. During restoration, the most recent full backup and the appropriate differential backup are generally used as part of the recovery sequence. This differs from a transaction log backup, which captures transaction log records and supports point-in-time recovery when the recovery model and backup strategy allow it. Therefore, when the requirement is to back up changes since the latest full backup, a differential backup is the correct option.<\/span><\/p>\n<h3><b>Question 177. Which backup type records transaction log information and can support point-in-time recovery?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> Full backup<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Differential backup<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Transaction log backup<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> Database snapshot<\/span><\/p>\n<p><b>Answer: 3) Transaction log backup<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A transaction log backup captures transaction log records that have occurred since the previous transaction log backup. It is an important component of recovery strategies that require more precise restoration points than full or differential backups can provide. When used with an appropriate recovery model, transaction log backups can help restore a database to a specific point in time. They also help manage the transaction log by allowing log records that are no longer required for recovery to be truncated under the appropriate conditions. Therefore, a transaction log backup is the correct choice when the requirement involves capturing transaction log activity for point-in-time recovery.<\/span><\/p>\n<h3><b>Question 178. Which DBCC command is commonly used to check the physical and logical integrity of a SQL Server database?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> DBCC CHECKDB<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> DBCC BACKUP<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> DBCC DATABASE<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> DBCC VERIFY<\/span><\/p>\n<p><b>Answer: 1) DBCC CHECKDB<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">DBCC CHECKDB<\/span><span style=\"font-weight: 400;\"> checks the physical and logical integrity of database objects and structures. It can identify corruption and consistency problems within database pages, indexes, allocation structures, and related metadata. Database administrators commonly include integrity checks in maintenance and monitoring strategies to detect problems before they become more serious. The command can also provide information that helps administrators investigate database consistency issues. It should not be confused with backup commands because DBCC CHECKDB is an integrity-checking operation rather than a backup mechanism. Therefore, DBCC CHECKDB is the standard SQL Server command used to check database integrity.<\/span><\/p>\n<h3><b>Question 179. What is the primary purpose of statistics in SQL Server query optimization?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> Encrypt database files<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Estimate data distribution and row counts<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Create database users<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> Back up transaction logs<\/span><\/p>\n<p><b>Answer: 2) Estimate data distribution and row counts<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">SQL Server statistics provide information about the distribution of values in columns and help the query optimizer estimate how many rows a query may return. These estimates influence decisions such as whether SQL Server should use an index seek, index scan, nested loops, hash join, or another execution strategy. Accurate and current statistics can therefore contribute to efficient query execution plans. Statistics do not perform encryption, create users, or back up transaction logs. SQL Server can maintain statistics automatically depending on database configuration, but administrators may also update them when appropriate. Therefore, estimating row counts and data distribution is the primary purpose of query optimization statistics.<\/span><\/p>\n<h3><b>Question 180. Which practice helps protect a SQL Server application from SQL injection attacks?<\/b><\/h3>\n<p><b>1)<\/b><span style=\"font-weight: 400;\"> Concatenating user input into SQL strings<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2)<\/b><span style=\"font-weight: 400;\"> Using parameterized queries<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3)<\/b><span style=\"font-weight: 400;\"> Disabling database backups<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4)<\/b><span style=\"font-weight: 400;\"> Removing all indexes<\/span><\/p>\n<p><b>Answer: 2) Using parameterized queries<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Parameterized queries help protect applications from SQL injection by separating SQL command structure from user-supplied values. Instead of directly concatenating untrusted input into a SQL statement, the application sends the input as a parameter. The database engine then treats the parameter value as data rather than allowing it to modify the intended SQL command structure. This approach significantly reduces a common source of SQL injection vulnerabilities. Input validation and appropriate permissions can provide additional security, but parameterization is a fundamental defensive practice. Therefore, using parameterized queries is the appropriate answer when designing applications that interact securely with SQL Server.<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>View Full Microsoft DP-300 Exam Dumps and Practice Test Dumps &nbsp; Question 161. Which SQL Server feature helps restrict users from accessing specific rows in a table? 1) Dynamic Data Masking 2) Row-Level Security 3) Transparent Data Encryption 4) Always Encrypted Answer: 2) Row-Level Security Explanation: Row-Level Security (RLS) controls access to individual rows based [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1648,1647],"tags":[],"_links":{"self":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/13200"}],"collection":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/comments?post=13200"}],"version-history":[{"count":1,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/13200\/revisions"}],"predecessor-version":[{"id":13227,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/13200\/revisions\/13227"}],"wp:attachment":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/media?parent=13200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/categories?post=13200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/tags?post=13200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}