70-462 Exam - Administering Microsoft SQL Server 2012 Databases

certleader.com

Q1. You administer two Microsoft SQL Server 2012 servers named ProdSrv1 and ProdSrv2. ProdSrv1 is configured as a Distributor. Both servers are configured to use the Windows NT Service virtual accounts for all SQL Services. 

You are configuring snapshot replication from ProdSrv1 to ProdSrv2 by using ProdSrv2 as 

a pull subscriber. 

The distribution agent on ProdSrv2 regularly fails, displaying the following error message: 

"Cannot access the file. Operating system error code 5 (Access is denied.)." 

You need to configure the distribution agent by granting only the minimum required access to all accounts. 

What should you do? 

A. Configure the Subscriber to use the Local System account. 

B. Configure the SQL Server Agent service to run under the Local System account. 

Configure the Subscriber to use the SQL Server Agent service account. 

C. Configure the SQL Server Agent service to run under a Windows domain account. Configure the Subscriber to use the SQL Server Agent service account. Grant FULL CONTROL access for the domain account to the ReplData share on ProdSrv1. 

D. Configure the Subscriber to use a Windows domain account. Grant READ access for the domain account to the ReplData share on ProdSrv1. 

Answer:

Q2. You administer a Microsoft SQL Server 2012 instance named SQL2012. You are in the process of migrating a database from a SQL Server 2008 instance named SQL2008 to the SQL2012 instance. 

You have upgraded a database from the SQL2008 instance by using the side-by-side migration technique. 

You need to migrate the SQL Server logins from the SQL2008 instance to the SQL2012 instance. 

What should you do? 

A. Back up the master database on the SQL2008 instance. Restore the master database on the SQL2012 instance. 

B. Use the Transfer Logins task in a Microsoft SQL Server Integrated Services package. 

C. Use sp_grantlogin. 

D. Use xp_logininfo. 

Answer:

Q3. You administer a Microsoft SQL Server 2012 failover cluster. 

You need to ensure that a failover occurs when the server diagnostics returns query_processing error. 

Which server configuration property should you set? 

A. SqlOumperDumpFlags 

B. FailureConditionLevel 

C. HealthCheckTimeout 

D. SqlDumperDumpPath 

Answer:

Q4. You administer a single server that contains a Microsoft SQL Server 2012 default instance. 

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

You need to ensure that the application login is unable to access other production databases. 

What should you do? 

A. Use the SQL Server default instance and configure an affinity mask. 

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

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

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

Answer:

Q5. You are a database developer for an application hosted on a Microsoft SQL Server 2012 server. The database contains two tables that have the following definitions: 

Global customers place orders from several countries. You need to view the country from which each customer has placed the most orders. 

Which Transact-SQL query do you use? 

A. SELECT c.CustomerID, c.CustomerName, o.ShippingCountry FROM Customer c INNER JOIN (SELECT CustomerID, ShippingCountry, RANK() OVER (PARTITION BY CustomerID ORDER BY COUNT(OrderAmount) DESC) AS Rnk FROM Orders GROUP BY CustomerID, ShippingCountry) AS o ON c.CustomerID = o.CustomerID WHERE o.Rnk = 1 

B. SELECT c.CustomerID, c.CustomerName, o.ShippingCountry FROM (SELECT c.CustomerID, c.CustomerName, o.ShippingCountry, 

RANK() OVER (PARTITION BY CustomerID ORDER BY COUNT(o.OrderAmount) ASC) AS Rnk FROM Customer c INNER JOIN Orders o ON c.CustomerID = o.CustomerID GROUP BY c.CustomerID, c.CustomerName, o.ShippingCountry) cs WHERE Rnk = 1 

C. SELECT c.CustomerID, c.CustomerName, o.ShippingCountry FROM Customer c INNER JOIN (SELECT CustomerID, ShippingCountry, RANK() OVER (PARTITION BY CustomerID ORDER BY OrderAmount DESC) AS Rnk FROM Orders GROUP BY CustomerID, ShippingCountry) AS o ON c.CustomerID = o.CustomerID WHERE o.Rnk = 1 

D. SELECT c.CustomerID, c.CustomerName, o.ShippingCountry FROM Customer c INNER JOIN (SELECT CustomerID, ShippingCountry, COUNT(OrderAmount) DESC) AS OrderAmount FROM Orders GROUP BY CustomerID, ShippingCountry) AS o ON c.CustomerID = o.CustomerID ORDER BY OrderAmount DESC 

Answer: A

Q6. You administer two instances of Microsoft SQL Server 2012. You deploy an application that uses a database on the named instance. 

The application is unable to connect to the database on the named instance. 

You need to ensure that the application can connect to the named instance. 

What should you do? 

A. Configure the application as data-tiered. 

B. Open port 1433 on the Windows firewall on the server. 

C. Configure the named SQL Server instance to use an account that is a member of the Domain Admins group. 

D. Start the SQL Server Browser Service. 

Answer:

Q7. You are the lead database administrator (DBA) of a Microsoft SQL Server 2012 environment. 

All DBAs are members of the DOMAIN\JrDBAs Active Directory group. You grant DOMAIN\JrDBAs access to the SQL Server. 

You need to create a server role named SpecialDBARole that can perform the following functions: 

View all databases. 

View the server state. 

Assign GRANT, DENY, and REVOKE permissions on logins. 

You need to add DOMAIN\JrDBAs to the server role. You also need to provide the least level of privileges necessary. 

Which SQL statement or statements should you use? Choose all that apply. 

A. CREATE SERVER ROLE [SpecialDBARole] AUTHORIZATION setupadmin; 

B. ALTER SERVER ROLE [SpecialDBARole] ADD MEMBER [DOMAIN\JrDBAs]; 

C. CREATE SERVER ROLE [SpecialDBARole] AUTHORIZATION securityadmin; 

D. GRANT VIEW DEFINITION TO [SpecialDBARole]; 

E. CREATE SERVER ROLE [SpecialDBARole] AUTHORIZATION serveradmin; 

F. GRANT VIEW SERVER STATE, VIEW ANY DATABASE TO [SpecialDBARole]; 

Answer: BCF 

Q8. You use Microsoft SQL Server 2012 to write code for a transaction that contains several statements. 

There is high contention between readers and writers on several tables used by your transaction. You need to minimize the use of the tempdb space. 

You also need to prevent reading queries from blocking writing queries. 

Which isolation level should you use? 

A. SERIALIZABLE 

B. SNAPSHOT 

C. READ COMMITTED SNAPSHOT 

D. REPEATABLE READ 

Answer:

Q9. You are developing a database application by using Microsoft SQL Server 2012. An application that uses a database begins to run slowly. 

You discover that a large amount of memory is consumed by single-use dynamic queries. 

You need to reduce procedure cache usage from these statements without creating any additional indexes. 

What should you do? 

A. Add a HASH hint to the query. 

B. Add a LOOP hint to the query. 

C. Add a FORCESEEK hint to the query. 

D. Add an INCLUDE clause to the index. 

E. Add a FORCESCAN hint to the Attach query. 

F. Add a columnstore index to cover the query. 

G. Enable the optimize for ad hoc workloads option. 

H. Cover the unique clustered index with a columnstore index. 

I. Include a SET FORCEPLAN ON statement before you run the query. 

J. Include a SET STATISTICS PROFILE ON statement before you run the query. 

K. Include a SET STATISTICS SHOWPLAN_XML ON statement before you run the query. 

L. Include a SET TRANSACTION ISOLATION LEVEL REPEATABLE READ statement before you run the query. 

M. Include a SET TRANSACTION ISOLATION LEVEL SNAPSHOT statement before you run the query. 

N. Include a SET TRANSACTION ISOLATION LEVEL SERIALIZABLE statement before you run the query. 

Answer:

Q10. 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