Set - 7

Question 21 :

In SQL Server 2005, if you want the keys securing your data to expire over time, what type of key encryption would you choose?

Answer :

Answer
Certificates
Explanation
Certificates have an expiration data associated with them. This allows you to issue them to users and force a reissue in order to maintain their access to data.


Question 22 :

Which is larger in size in SQL Server 2005 if you are using symmetric keys?

Answer :

Answer
Ciphertext
Explanation
Ciphertext is larger and can be calculated using the following formula:
Size = ( FLOOR (8 + D)/BLOCK) + 1) * (BLOCK + BLOCK + 16)
where D is the data size in bytes, BLOCK is the block size (8 or 16, depending on algorithm) and Size is the new size in bytes of the ciphertext.


Question 23 :

What result would you expect from this statement?

Answer :

Select * from dbo
.MyTable

All records from [dbo].[MyTable]
The answer is all records from [dbo].[MyTable]. Qualified names can include white space before and after the dots. Restrictions apply only to the names themselves that may need quoted identifiers with embedded white space or invalid characters.


Question 24 :

You are using SQL Server 2005 and you wish to find a number of details about stored procedures created. The details include date and time, the server that created the stored procedure, the login name and the contents. How would you do this?

Answer :


Create a DDL trigger on CREATE_PROCEDURE database event
The answer is Create a DDL trigger on CREATE_PROCEDURE database event You can find the answer on page 448 of Beginning SQL Server 2005 for Developers: From Novice to Professional


Question 25 :

A .NET assembly running with UNSAFE permissions can do which of the following?

Answer :

All of the above
CLR code running with UNSAFE permissions can access virtually any resource inside or outside of SQL Server without restriction. This is one reason only a sysadmin can create an assembly as UNSAFE.