Which severity level should you use?
You are using TRY…CATCH error handling.
You need to raise an error that will pass control to the CATCH block.
Which severity level should you use?
What should be the expected outcome?
You have tables named Products and OrderDetails. The Products table has a foreign key relationship
with the OrderDetails table on the ProductID column. You have the following Transact-SQL batch:
BEGIN TRY
BEGIN TRANSACTION
DELETE FROM Products WHERE ProductID = 5;
BEGIN TRANSACTION
INSERT INTO OrderDetails
( OrderID, ProductID, Quantity )
VALUES
( 1234, 5, 12 );
COMMIT TRANSACTION
COMMIT TRANSACTION
END TRY
BEGIN CATCH ROLLBACK TRANSACTION PRINT ERROR_MESSAGE();
END CATCH
You need to analyze the result of executing this batch. What should be the expected outcome?
Which permission set should you use?
You have created an assembly that utilizes unmanaged code to access external resources.
You need to deploy the assembly with the appropriate permissions.
Which permission set should you use?
Which options should you set?
You have a single CLR assembly in your database. The assembly only references blessed assemblies from the Microsoft .NET Framework and does not access external resources.
You need to deploy this assembly by using the minimum required permissions. You must ensure that your database remains as secure as possible.
Which options should you set?
Which Transact-SQL statement should you use?
You are responsible for a SQL Server database. You require the tables to be added or altered only on the first day of the month. You need to ensure that if the tables are attempted to be modified or created on any other day, an error is received and the attempt is not successful.
Which Transact-SQL statement should you use?
What should you do?
You need to ensure that tables are not dropped from your database. What should you do?
Which Transact-SQL statement should you use?
Your database contains two tables named Order and OrderDetails that store order information. They relate to each other using the OrderID column in each table. Your business requires that the LastModifiedDate column in the Order table must reflect the date and time when a change is made in the OrderDetails table for the related order.
You need to create a trigger to implement this business requirement.
Which Transact-SQL statement should you use?
What should you do?
You have a third-party application that inserts data directly into a table.
You add two new columns to the table. These columns cannot accept NULL values and cannot use default constraints.
You need to ensure that the new columns do not break the third-party application.
What should you do?
Which option should you use when you create the function?
You are creating a function that references a table.
You need to prevent the table from being dropped.
Which option should you use when you create the function?
Which object should you use?
You need to identify, within a given clause, if the month of February will contain 29 days for a specified year.
Which object should you use?