70-462 Exam - Administering Microsoft SQL Server 2012 Databases

certleader.com

Q1. You administer a Microsoft SQL Server 2012 instance. 

You need to configure a new database to support FILETABLES. 

What should you do? Choose all that apply. 

A. Disable FILESTREAM on the Database. 

B. Enable FILESTREAM on the Server Instance. 

C. Configure the Database for Partial Containment. 

D. Create a non-empty FILESTREAM file group. 

E. Enable Contained Databases on the Server Instance. 

F. Set the FILESTREAM directory name on the Database. 

Answer: BDF 

Q2. You create an availability group named HaContoso that has replicas named Server01/HA, Server02/HA, and Server03/HA. 

Currently, Server01l/HA is the primary replicA. 

You need to ensure that the following requirements are met: 

Backup operations occur on Server02/HA. 

If Server02/HA is unavailable, backup operations occur on Server03/HA. 

Backup operations do not occur on Server01/HA. 

How should you configure HaContoso? 

A. . Set the backup preference of HaContoso to Prefer Secondary. 

. Set the backup priority of Server02/HA to 20. 

. Set the backup priority of Server03/HA to 10. 

B. . Set the backup preference of HaContoso to Secondary only. 

. Set the backup priority of Server02/HA to 20. 

. Set the backup priority of Server03/HA to 10. 

C. . Set the backup preference of HaContoso to Secondary only. 

. Set the backup priority of Server02/HA to 10. 

. Set the backup priority of Server03/HA to 20. 

D. . Set the exclude replica of Server01/HA to true. 

. Set the backup priority of Server02/HA to 10. 

. Set the backup priority of Server03/HA to 20. 

Answer:

Q3. You administer a Microsoft SQL Server 2012 server. The MSSQLSERVER service uses a domain account named CONTOSO\SQLService. 

You plan to configure Instant File Initialization. 

You need to ensure that Data File Autogrow operations use Instant File Initialization. 

What should you do? Choose all that apply. 

A. Restart the SQL Server Agent Service. 

B. Disable snapshot isolation. 

C. Restart the SQL Server Service. 

D. Add the CONTOSO\SQLService account to the Perform Volume Maintenance Tasks local security policy. 

E. Add the CONTOSO\SQLService account to the Server Operators fixed server role. 

F. Enable snapshot isolation. 

Answer: CD 

Q4. You develop a database for a travel application. 

You need to design tables and other database objects. 

You create the Airline_Schedules table. 

You need to store the departure and arrival dates and times of flights along with time zone information. 

What should you do? 

A. Use the CAST function. 

B. Use the DATE data type. 

C. Use the FORMAT function. 

D. Use an appropriate collation. 

E. Use a user-defined table type. 

F. Use the VARBINARY data type. 

G. Use the DATETIME data type. 

H. Use the DATETIME2 data type. 

I. Use the DATETIMEOFFSET data type. 

J. Use the TODATETIMEOFFSET function. 

Answer: I

Q5. You install a Microsoft SQL Server 2012 instance. 

The instance will store data extracted from two databases running on Windows Azure SQL Database. 

You hire a data steward to perform interactive data cleansing and ad hoc querying and updating of the data. 

You need to ensure that the data steward is given the correct client tools to perform these tasks. 

Which set of tools should you install? 

A. SQL Server Management Studio and Distributed Reply Client 

B. Data Quality Client and SQL Server Data Tools 

C. Data Quality Client and Distributed Replay Client 

D. SQL Server Management Studio and Master Data Services 

Answer: B

Q6. You use Microsoft SQL Server 2012 to develop a database application. You create a stored procedure named dbo.ModifyData that can modify rows. 

You need to ensure that when the transaction fails, dbo.ModifyData meets the following requirements: 

. Does not return an error 

. Closes all opened transactions 

Which Transact-SQL statement should you use? 

A. BEGIN TRANSACTION BEGIN TRY EXEC dbo.ModifyData COMMIT TRANSACTION END TRY BEGIN CATCH IF @@ TRANCOUNT = 0 ROLLBACK TRANSACTION; END CATCH 

B. BEGIN TRANSACTION BEGIN TRY EXEC dbo.ModifyData COMMIT TRANSACTION END TRY BEGIN CATCH IF @@ERROR != 0 ROLLBACK TRANSACTION; THROW; END CATCH 

C. BEGIN TRANSACTION BEGIN TRY EXEC dbo.ModifyData COMMIT TRANSACTION END TRY BEGIN CATCH IF @@TRANCOUNT = 0 ROLLBACK TRANSACTION; THROW; END CATCH 

D. BEGIN TRANSACTION BEGIN TRY EXEC dbo.ModifyData COMMIT TRANSACTION END TRY BEGIN CATCH IF @@ERROR != 0 ROLLBACK TRANSACTION; END CATCH 

Answer:

Q7. You administer a Microsoft SQL Server 2012 instance named SQL2012 that hosts an OLTP database of 1 terabyte in size. 

The database is modified by users only from Monday through Friday from 09:00 hours to 17:00 hours. Users modify more than 30 percent of the data in the database during the week. 

Backups are performed as shown in the following schedule: 

The Finance department plans to execute a batch process every Saturday at 09:00 hours. This batch process will take a maximum of 8 hours to complete. 

The batch process will update three tables that are 10 GB in size. The batch process will update these tables multiple times. 

When the batch process completes, the Finance department runs a report to find out whether the batch process has completed correctly. 

You need to ensure that if the Finance department disapproves the batch process, the batch operation can be rolled back in the minimum amount of time. 

What should you do on Saturday? 

A. Perform a differential backup at 08:59 hours. 

B. Record the LSN of the transaction log at 08:59 hours. Perform a transaction log backup at 17:01 hours. 

C. Create a database snapshot at 08:59 hours. 

D. Record the LSN of the transaction log at 08:59 hours. Perform a transaction log backup at 08:59 hours. 

E. Create a marked transaction in the transaction log at 08:59 hours. Perform a transaction log backup at 17:01 hours. 

F. Create a marked transaction in the transaction log at 08:59 hours. Perform a transaction log backup at 08:59 hours. 

Answer:

Q8. You administer a Microsoft SQL Server 2012 instance that contains a financial database hosted on a storage area network (SAN). 

The financial database has the following characteristics: 

. A data file of 2 terabytes is located on a dedicated LUN (drive D). 

. A transaction log of 10 GB is located on a dedicated LUN (drive E). 

. Drive D has 1 terabyte of free disk space. . Drive E has 5 GB of free disk space. 

The database is continually modified by users during business hours from Monday through Friday between 09:00 hours and 17:00 hours. 

Five percent of the existing data is modified each day. 

The Finance department loads large CSV files into a number of tables each business day at 11:15 hours and 15:15 hours by using the BCP or BULK INSERT commands. 

Each data load adds 3 GB of data to the database. 

These data load operations must occur in the minimum amount of time. 

A full database backup is performed every Sunday at 10:00 hours. 

Backup operations will be performed every two hours (11:00, 13:00, 15:00, and 17:00) during business hours. 

You implement log shipping of the financial database to another SQL Server 2012 instance. 

You decide to failover to this secondary database. 

You need to ensure that all transactions will be replicated to the secondary database. 

Which backup option should you use? 

A. Differential 

B. Transaction Log 

C. FULL 

D. SIMPLE 

E. SKIP 

F. RESTART 

G. STANDBY 

H. CHECKSUM 

I. DBO_ONLY 

J. COPY_ONLY 

K. NORECOVERY 

L. NO_CHECKSUM 

M. CONTINUE_AFTER_ERROR 

N. BULK_LOGGED 

Answer:

Q9. You are a database developer of a Microsoft SQL Server 2012 database. You are designing a table that will store Customer data from different sources. The table will include a column that contains the CustomerID from the source system and a column that contains the SourceID. A sample of this data is as shown in the following table. 

You need to ensure that the table has no duplicate CustomerID within a SourceID. You also need to ensure that the data in the table is in the order of SourceID and then CustomerID. Which Transact- SQL statement should you use? 

A. CREATE TABLE Customer (SourceID int NOT NULL IDENTITY, CustomerID int NOT NULL IDENTITY, CustomerName varchar(255) NOT NULL); 

B. CREATE TABLE Customer 

(SourceID int NOT NULL, 

CustomerID int NOT NULL PRIMARY KEY CLUSTERED, 

CustomerName varchar(255) NOT NULL); 

C. CREATE TABLE Customer 

(SourceID int NOT NULL PRIMARY KEY CLUSTERED, 

CustomerID int NOT NULL UNIQUE, 

CustomerName varchar(255) NOT NULL); 

D. CREATE TABLE Customer 

(SourceID int NOT NULL, 

CustomerID int NOT NULL, 

CustomerName varchar(255) NOT NULL, 

CONSTRAINT PK_Customer PRIMARY KEY CLUSTERED 

(SourceID, CustomerID)); 

Answer: D

Q10. You administer a single server that contains a Microsoft SQL Server 2012 default instance on which several production databases have been deployed. 

You plan to install a new ticketing application that requires the deployment of a database on the server. The SQL login for this application requires sysadmin permissions. 

You need to ensure that the login for the ticketing application cannot access other production databases. 

What should you do? 

A. Use the SQL Server default instance and enable Contained Databases. 

B. Use the SQL Server default instance and configure a user-defined server role. Add the login for the ticketing application to this role. 

C. Install a new named SQL Server instance on the server. 

D. Install a new default SQL Server instance on the server. 

Answer: