PrepAway - Latest Free Exam Questions & Answers

Author: admin

Which performance object should you add to the counter log?

TestKing.com has a server named SQL1 that runs SQL Server 2005 Enterprise Edition.
SQL1 has 2 GB of RAM, 1.6 GB of which are used by the default SQL Server database engine instance. The average data growth of all databases combined is 100 MB a month.
Users state that report execution times are increasing. You want to assess whether more RAM is needed.
You need to use System Monitor to create a counter log that will help you decide whether to add RAM. Which performance object should you add to the counter log?

What should you do?

A full backup of your database named DB1 is created automatically at midnight every day.
Differential backups of DB1 occur twice each day at 10:00 and at 16:00. A database snapshot is created every day at noon. A developer reports that he accidentally dropped the Pricelist table in DB1 at 12:30. The last update to Pricelist occurred one week ago.
You need to recover the Pricelist table. You want to achieve this goal by using the minimum amount of administrative effort. You must also minimize the amount of data that is lost. What should you do?

Which two actions should you perform?

You are implementing transaction log shipping for a database named DB1 from a server named SQL1 to a server named SQL2. Because DB1 is 100 GB in size, it is too big to transfer over the network in a reasonable amount of time.
You need to minimize the impact on the network while you initialize the secondary database. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

What should you do?

You are creating an online catalog application that will display product information on the company Web site. The product data is stored in a SQL Server 2005 database. The data is stored as relational data but must be passed to the application as an XML document by using FOR XML. You test your application and notice that not all of the items matching your query appear in the XML document. Only those products that have values for all elements in the schema appear.
You need to modify your Transact-SQL statement so that all products matching your query appear in the XML document. What should you do?

What should you do?

You are creating a stored procedure that will delete data from the Contact table in a SQL Server 2005 database. The stored procedure includes the following Transact-SQL statement to handle any errors that occur.
BEGIN TRY BEGIN TRANSACTION DELETE FROM Person.Contact WHERE ContactID = @ContactID COMMIT TRANSACTION END TRY BEGIN CATCH DECLARE @ErrorMessage nvarchar(2000) DECLARE @ErrorSeverity int DECLARE @ErrorState int SELECT @ErrorMessage = ERROR_MESSAGE(), @ErrorSeverity = ERROR_SEVERITY(), @ErrorState = ERROR_STATE() RAISERROR (@ErrorMessage, @ErrorSeverity, @ErrorState) END CATCH;

You test the stored procedure and discover that it leaves open transactions. You need to modify the stored procedure so that it properly handles the open transactions. What should you do?

Which SQL query should you use?

You work for a company that sells books. You are creating a report for a SQL Server 2005 database. The report will list sales representatives and their total sales for the current month. The report must include only those sales representatives who met their sales quota for the current month. The monthly sales quota is $2,000. The date parameters are passed in variables named @FromDate and @ToDate.
You need to create the report so that it meets these requirements. Which SQL query should you use?

What should you do?

You work in Dublin at the main office of TestKing.com. You are responsible for managing a SQL Server 2005 database. The sales department wants a report that compares customer activity in the previous quarter between the main office in Dublin and the branch office in Buenos Aires. They want the data sorted by surname and first name.
You restore a recent backup of the Buenos Aires database onto your server. You write queries to build the report, ordering the data by the Surname and FirstName columns. You review the data and notice that the customer list from the Buenos Aires database is sorted differently. The sales department needs the revised data within 15 minutes for a presentation.
You need to implement the fastest possible solution that ensures that the data from both databases is sorted identically. What should you do?