DRAG DROP
You have a SQL Server 2012 database named Database1. Database1 has a data file
named database1_data.mdf and a transaction log file named database1_Log.ldf.
Database1_Data.mdf is 1.5 GB.
Database1_Log.ldf is 1.5 terabytes. A full backup of Database1 is performed every day.
You need to reduce the size of the log file. The solution must ensure that you can
performtransaction log backups in the future. Which code segment should you execute? To
answer,move the appropriate code segments from the list of code segments to the answer
area andarrange them in the correct order.
Explanation:
http://technet.microsoft.com/en-us/library/ms190757.aspx
http://technet.microsoft.com/en-us/library/ms189493.aspx
http://technet.microsoft.com/en-us/library/ms365418.aspx
http://technet.microsoft.com/en-us/library/ms189272.aspx
http://technet.microsoft.com/en-us/library/ms179478.aspx
The right answer is
1. USE Database1;
2. ALTER DATABASE
Database1 SET
RECOVERY SIMPLE;
3. DBCC SHRINKFILE
(Database1_Log);
4. ALTER DATABASE
Database1 SET
RECOVERY FULL;
See
– https://technet.microsoft.com/en-us/library/ms189493.aspx
The answer is similar to
http://www.aiotestking.com/microsoft/which-code-segment-should-you-execute-16/
Agree with DP. Step1 is not necessary for step2 but only for step3, so it could be given as step 2 as well.
Use master;
ALTER DATABASE Database1 SET RECOVERY SIMPLE;
Use Database1;
DBCC SHRINKFILE(Database1_Log, TRUNCATEONLY);
ALTER DATABASE Database1 SET RECOVERY FULL;