HOTSPOT (Drag and Drop is not supported)You have an Azure SQL database named db1 that contains a Microsoft Entra user named user1.You need to test impersonation of user1 in db1 by running a SELECT statement and returning to the original execution context.How should you complete the Transact-SQL statement? To answer, select the appropriate options in the answer area.Note: Each correct selection is worth one point.Hot Area:
Answer(s): A
Box 1: USERUsing EXECUTE AS and REVERT to switch context.The following example creates a context execution stack using multiple principals. The REVERT statement is then used to reset the execution context to the previous caller.**EXECUTE AS USER = 'user2';--The following REVERT statements will reset the execution context to the previous context.REVERT;**
https://docs.microsoft.com/en-us/sql/t-sql/statements/execute-as-transact-sql?view=sql-server-ver15 https://docs.microsoft.com/en-us/sql/t-sql/functions/suser-sname-transact-sql?view=sql-server-ver15
DRAG DROP (Drag and Drop is not supported)You have an Azure SQL database named DB1. DB1 contains a table that has a column named Col1.You need to encrypt the data in Col1.Which four actions should you perform for DB1 in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.Select and Place:
Use the following steps for column level encryption:1. Create a database master key (Step 1)2. Create a self-signed certificate for SQL Server (Step 2)3. Configure a symmetric key for encryption (Step 3)4. Encrypt the column data (this includes Open the symmetric key - Step 4)5. Query and verify the encryptionStep 1: Create a database master keyCreate a database master key for column level SQL Server encryption In this first step, we define a database master key and provide a password to protect it. It is a symmetric key for protecting the private keys and asymmetric keys.Step 2: Create a certificate.Create a self-signed certificate for Column level SQL Server encryption In this step, we create a self-signed certificate using the CREATE CERTIFICATE statement. You might have seen that an organization receives a certificate from a certification authority and incorporates into their infrastructures. In SQL Server, we can use a self-signed certificate without using a certification authority certificate.Step 3: Create a symmetric key.Configure a symmetric key for column level SQL Server encryption. In this step, we will define a symmetric key that you can see in the encryption hierarchy as well. The symmetric key uses a single key for encryption and decryption as well.Step 4: Open the symmetric keyData encryption.Let's encrypt the data in this newly added column.In a query window, open the symmetric key and decrypt using the certificate. We need to use the same symmetric key and certificate name that we created earlierEtc.
https://www.sqlshack.com/an-overview-of-the-column-level-sql-server-encryption/
HOTSPOT (Drag and Drop is not supported)You have a Microsoft SQL Server database named DB1 that contains a table named Table1.The database role membership for a user named User1 is shown in the following exhibit.Use the drop-down menus to select the answer choice that completes each statement based on the information presented in the graphic.Note: Each correct selection is worth one point.Hot Area:
Box 1: delete a row from Table1Members of the db_datawriter fixed database role can add, delete, or change data in all user tables.Box 2: db_datareaderMembers of the db_datareader fixed database role can read all data from all user tables.
https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/database-level-roles
You have an Azure subscription that contains a logical SQL server named Server1. The master database of Server1 contains a user named User1.You need to ensure that User1 can create databases on Server1.Which database role should you assign to User1?
Answer(s): B
dbmanager: Can create and delete databases. A member of the dbmanager role that creates a database, becomes the owner of that database, which allows that user to connect to that database as the dbo user. The dbo user has all database permissions in the database. Members of the dbmanager role don't necessarily have permission to access databases that they don't own.
You have an on-premises Microsoft SQL Server 2019 instance named SQL1 that hosts a database named db1. You have an Azure subscription that contains an Azure SQL managed instance named MI1 and an Azure Storage account named storage1.You plan to migrate db1 to MI1 by using the backup and restore process.You need to ensure that you can back up db1 to storage1. The solution must meet the following requirements:Use block blob storage.Maximize security.What should you do on storage1?
Post your Comments and Discuss Microsoft DP-300 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the DP-300 content, but please register or login to continue.