70-464 Exam - Developing Microsoft SQL Server 2012 Databases

certleader.com

Q1. You have a SQL Server 2012 environment that contains two servers. The servers are configured as shown in the following table. 

After the failover is complete, a user receives the following error message when connecting to DB1 on Server2: 

"Msg 916, Level 14, State 1, Line 1 The server principal "Account1" is not able to access the database "DB1" under the current security context." 

You verify that there is a server login for Account1 on Server2. 

You need to ensure that Account1 can connect to DB1. 

What should you do? 

More than one answer choice may achieve the goal. Select the BEST answer. 

A. Update the SID for Account1 on DB1. 

B. Add Account1 to the db_datareader role. 

C. Create a new database user on DB1. 

D. Implement Windows authentication. 

Answer:

Q2. Topic 8) 

You plan to deploy SQL Server 2012. You must create two tables named Table1 and Table2 that will have the following specifications: 

. Table1 will contain a date column named Column1 that will contain a null value approximately 80 percent of the time. . Table2 will contain a column named Column2 that is the product of two other columns in Table2. . Both Table1 and Table2 will contain more than 1 million rows. 

You need to recommend which options must be defined for the columns. The solution must minimize the storage requirements for the tables. Which options should you recommend? To answer, drag the appropriate options to the correct column in the answer area. 

Answer:  

Q3. Your company has a SQL Azure subscription. 

You implement a database named Database1. Database1 has two tables named Table1 and Table2. 

You create a stored procedure named sp1. Sp1 reads data from Table1 and inserts data into Table2. 

A user named User1 informs you that he is unable to run sp1. 

You verify that User1 has the SELECT permission on Table1 and Table2. 

You need to ensure that User1 can run sp1. The solution must minimize the number of permissions assigned to User1. 

What should you do? 

A. Change sp1 to run as the saUser. 

B. Grant User1 the EXECUTE permission on sp1. 

C. Add User1 to the db_datawriter role. 

D. Grant User1 the INSERT permission on Table2. 

Answer:

Explanation: 

http://msdn.microsoft.com/en-us/library/ms191291.aspx 

Q4. You create a view by using the following code: 

Several months after you create the view, users report that the view has started to return 

unexpected results. 

You discover that the design of Table2 was modified since you created the view. 

You need to ensure that the view returns the correct results. 

Which code segment should you run? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q5. You have a database that contains a table named Department. Department contains the names and locations of each department. 

You have a table-valued function named ProjectList() that returns a list of all the projects assigned to a department. The name of the department is passed as an argument to the ProjectList() function. 

You need to create a query that returns a list of all the department names and the project names. The solution must return only departments that are associated to projects. 

What should you add to the query? 

A. OUTER APPLY 

B. OUTER JOIN 

C. CROSS JOIN 

D. CROSS APPLY 

Answer:

Q6. You need to create the InvoiceStatus table in DB1. 

How should you define the InvoiceID column in the CREATE TABLE statement? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q7. While testing usp.GetFutureSessions, you discover that IX_Sessions is accessed by a scan rather than a seek. 

You need to minimize the amount of time it takes to execute usp_GetFutureSessions. 

What should you do? (Each correct answer presents part of the solution. Choose all that apply.) 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

E. Option E 

F. Option F 

Answer: B,E 

Explanation: Future delivery dates. 

Q8. Topic 8) 

You have a SQL Server 2012 database named Database1. Database1 has a data file named Database1_data.mdf and a transaction log named Database1jog.ldf. Database1_data.mdf is 1.5 GB. Database1jog.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 perform transaction 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 and arrange them in the correct order. 

Answer:  

Q9. You plan to migrate an instance of SQL Server 2008 to a new installation of SQL Server 2012. 

You need to migrate alerts and e-mail notifications. 

Which system stored procedures should you use? (Each correct answer presents part of the solution. Choose all that apply.) 

A. sp_syspolicy_create_job 

B. sp_add_operator 

C. sp_audit_write 

D. sp_add_alert 

Answer: B,C 

Explanation: B: sp_add_operator 

Creates an operator (notification recipient) for use with alerts and jobs. 

C: sp_audit_write Adds a user-defined audit event to the USER_DEFINED_AUDIT_GROUP. If USER_DEFINED_AUDIT_GROUP is not enabled, sp_audit_write is ignored. 

Q10. You need to provide referential integrity between the Sessions table and Speakers table. Which code segment should you add at line 47 of Tables.sql? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: 

http://msdn.microsoft.com/en-us/library/ms189049.aspx http://msdn.microsoft.com/en-us/library/ms179610.aspx http://msdn.microsoft.com/en-us/library/ff878370.aspx