Ensurepass

QUESTION 21

You administer a Microsoft SQL Server 2012 database that has Trustworthy set to On. You create a stored procedure that returns database-level information from Dynamic Management Views. You grant User1 access to execute the stored procedure. You need to ensure that the stored procedure returns the required information when User1 executes the stored procedure. You need to achieve this goal by granting the minimum permissions required. What should you do? (Each correct answer presents a complete solution. Choose all that apply.)

 

A.      Create a SQL Server login that has VIEW SERVER STATE permissions.

Create an application role and a secured password for the role.

B.      Modify the stored procedure to include the EXECUTE AS OWNER statement.

Grant VIEW SERVER STATE permissions to the owner of the stored procedure.

C.      Create a SQL Server login that has VIEW SERVER STATE permissions.

Modify the stored procedure to include the EXECUTE AS {newlogin} statement.

D.      Grant the db_owner role on the database to User1.

E.       Grant the sysadmin role on the database to User1.

 

Correct Answer: BC

 

 

QUESTION 22

You are migrating a database named Orders to a new server that runs Microsoft SQL Server 2012.

You attempt to add the [CorpnetUser1] login to the database. However, you receive the following error message: “User already exists in current database.” You need to configure the [CorpnetUser1] login to be able to access the Orders database and retain the original permissions. You need to achieve this goal by using the minimum required permissions.Which Transact-SQL statement should you use?

 

A.        DROP USER [User1];

CREATE USER [CorpnetUser1] FOR LOGIN [CorpnetUser1];

ALTER ROLE [db_owner] ADD MEMBER [CorpnetUser1];

B.        ALTER SERVER ROLE [sysadmin] ADD MEMBER [CorpnetUser1];

C.        ALTER USER [CorpnetUser1] WITH LOGIN [CorpnetUser1];

D.        ALTER ROLE [db_owner] ADD MEMBER [CorpnetUser1];

Correct Answer: C

 

 

QUESTION 23

You administer a Microsoft SQL Server 2012 database. You configure Transparent Data Encryption (TDE) on the Orders database by using the following statements:

 

CREATE MASTER KEY ENCRYPTION BY PASSWORD = ‘MyPassword1!’;

CREATE CERTIFICATE TDE_Certificate WITH SUBJECT = ‘TDE Certificate’;

 

BACKUP CERTIFICATE TDE_Certificate TO FILE = ‘d:TDE_Certificate.cer’

WITH PRIVATE KEY (FILE = ‘d:TDE_Certificate.key’, ENCRYPTION BY PASSWORD =

‘MyPassword1!’);

 

CREATE DATABASE ENCRYPTION KEY

WITH ALGORITHM = AES_256

ENCRYPTION BY SERVER CERTIFICATE TDE_Certificate;

 

ALTER DATABASE Orders SET ENCRYPTION ON;

 

You attempt to restore the Orders database and the restore fails. You copy the encryption file to the original location. A hardware failure occurs and so a new server must be installed and configured. After installing SQL Server to the new server, you restore the Orders database and copy the encryption files to their original location. However, you are unable to access the database. You need to be able to restore the database. Which Transact-SQL statement should you use before attempting the restore?

 

A.        CREATE ASSEMBLY TDE_Assembly

FROM ‘d:TDE_Certificate.cer’

WITH PERMISSION_SET = SAFE;

GO

CREATE CERTIFICATE TDE_Certificate

FROM ASSEMBLY TDE_Assembly;

 

B.        CREATE CERTIFICATE TDE_Certificate

FROM EXECUTABLE FILE = ‘d:TDE_Certificate.cer’

 

C.        CREATE CERTIFICATE TDE_Certificate

FROM FILE = ‘d:TDE_Certificate.cer’

WITH PRIVATE KEY (FILE = ‘d:TDE_Certificate.key’, DECRYPTION BY PASSWORD

‘MyPassword1!’);

 

D.        DECLARE @startdate date

SET @startdate = GETDATE()

CREATE CERTIFICATE TDE_Certificate

FROM FILE = ‘d:TDE_Certificate.cer’

WITH START_DATE = @startdate;

 

Correct Answer: C

 

 

QUESTION 24

You administer a Microsoft SQL Server 2012 database. You provide temporary securityadmin access to User1 to the database server. You need to know if User1 adds logins to securityadmin. Which server-level audit action group should you use?

 

A.      SERVER_STATE_CHANGE_GROUP

B.      SERVER_PRINCIPAL_IMPERSONATION_GROUP

C.      SUCCESSFUL_LOGIN_GROUP

D.      SERVER_ROLE_MEMBER_CHANGE_GROUP

 

Correct Answer: D

 

 

QUESTION 25

You administer a Microsoft SQL Server 2012 instance. You need to stop a blocking process that has an SPID of 64 without stopping other processes. What should you do?

 

A.      Execute the following Transact-SQL statement: EXECUTE sp_KillSPID 64

B.      Restart the SQL Server service.

C.      Execute the following Transact-SQL statement: KILL 64

D.      Execute the following Transact-SQL statement: ALTER SESSION KILL ’64’

 

Correct Answer: C

 

 

QUESTION 26

You administer a Microsoft SQL Server 2012 database. Users report that an application that accesses the database displays an error, but the error does not provide meaningful information. No entries are found in the SQL Server log or Windows event logs related to the error. You need to identify the root cause of the issue by retrieving the error message. What should you do?

 

A.      Create an Extended Events session by using the sqlserver.error_reported event.

B.      Create a SQL Profiler session to capture all ErrorLog and EventLog events.

C.      Flag all stored procedures for recompilation by using sp_recompile.

D.      Execute sp_who.

 

Correct Answer: A

 

 

QUESTION 27

You administer a Microsoft SQL Server 2012 server. One of the databases on the server supports a highly active OLTP application. Users report abnormally long wait times when they submit data into the application. You need to identify which queries are taking longer than 1 second to run over an extended period of time. What should you do?

 

A.      Use SQL Profiler to trace all queries that are processing on the server. Filter queries that have a Duration value of more than 1,000.

B.      Use sp_configure to set a value for blocked process threshold. Create an extended event session.

C.      Run the sp_who command from a query window.

D.      Run the DBCC TRACEON 1222 command from a query window and review the SQL Server event log.

E.       Use the Job Activity monitor to review all processes that are actively running. Review the Job History to find out the duration of each step.

 

Correct Answer: D

 

 

QUESTION 28

You administer a Microsoft SQL Server 2012 database. You need to ensure that the size of the transaction log file does not exceed 2 GB. What should you do?

 

A.      Execute sp_configure ‘max log size’, 2G.

B.      Use the ALTER DATABASE…SET LOGFILE command along with the maxsize parameter.

C.      In SQL Server Management Studio, right-click the instance and select Database Settings. Set the maximum size of the file for the transaction log.

D.      In SQL Server Management Studio, right-click the database, select Properties, and then click Files. Open the Transaction log Autogrowth window and set the maximum size of the file.

 

Correct Answer: D

 

 

QUESTION 29

You administer a Microsoft SQL Server 2012 server. The MSSQLSERVER service uses a domain account named CONTOSOSQLService. 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 CONTOSOSQLService account to the Perform Volume Maintenance Tasks local security policy.

E.       Add the CONTOSOSQLService account to the Server Operators fixed server role.

F.       Enable snapshot isolation.

 

Correct Answer: CD

 

 

QUESTION 30

You administer a Microsoft SQL Server 2012 failover cluster that contains two nodes named Node A and Node B. A single instance of SQL Server is installed on the cluster. An additional node named Node C has been added to the existing cluster. You need to ensure that the SQL Server instance can use all nodes of the cluster. What should you do?

 

A.      Run the New SQL Server stand-alone installation Wizard on Node C.

B.      Run the Add Node to SQL Server Failover Cluster Wizard on Node C.

C.      Use Node B to install SQL Server on Node C.

D.      Use Node A to install SQL Server on Node C.

 

Correct Answer: B

 

 

Comments are closed.