Q1. You administer a Microsoft SQL Server 2012 database that contains a table named OrderDetail. You discover that the NCI_OrderDetail_CustomerID non-clustered index is fragmented. You need to reduce fragmentation. You need to achieve this goal without taking the index offline. Which Transact-SQL batch should you use? A. CREATE INDEX NCI_OrderDetail_CustomerID ON OrderDetail.CustomerID WITH DROP EXISTING B. ALTER INDEX NCI_OrderDetail_CustomerID ON OrderDetail.CustomerID REORGANIZE C. ALTER INDEX ALL…
Q1. You administer a Microsoft SQL Server 2012 instance. You discover that the SQL Agent Error Log file is rapidly growing in size. You need to ensure that the SQL Agent Error Log file does not grow rapidly when SQL Server agent jobs execute. What should you do? A. Execute the sp_cycle_agent_errorlog stored procedure. B. Configure event forwarding. C. Enable the Auto Shrink option on the…
Q1. You develop a database for a travel application. You need to design tables and other database objects. You need to store media files in several tables. Each media file is less than 1 MB in size. The media files will require fast access and will be retrieved frequently. What should you do? A. Use the CAST function. B. Use the DATE data type. C.…
Q1. You administer a Microsoft SQL Server 2012 database that has multiple tables in the Sales schema. Some users must be prevented from deleting records in any of the tables in the Sales schema. You need to manage users who are prevented from deleting records in the Sales schema. You need to achieve this goal by using the minimum amount of administrative…
Q1. 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' View AnswerAnswer: C Q2. You…
Q1. Your database contains a table named Purchases. The table includes a DATETIME column named PurchaseTime that stores the date and time each purchase is made. There is a non-clustered index on the PurchaseTime column. The business team wants a report that displays the total number of purchases made on the current day. You need to write a query that…
Q1. You administer a Microsoft SQL Server 2012 server that hosts a transactional database and a reporting database. The transactional database is updated through a web application and is operational throughout the day. The reporting database is only updated from the transactional database. The recovery model and backup schedule are configured as shown in the following table: The differential backup of the…
Q1. You administer a SQL Server 2012 server that contains a database named SalesDB. SalesDb contains a schema named Customers that has a table named Regions. A user named UserA is a member of a role named Sales. UserA is granted the Select permission on the Regions table and the Sales role is granted the Select permission on the Customers schema. You…
Q1. You administer a Microsoft SQL Server 2012 database named ContosoDb. Tables are defined as shown in the exhibit. (Click the Exhibit button.) Which Transact-SQL query should you use? A. SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN Customers ON Orders.CustomerId = Customers-CustomerId WHERE Customers.CustomerId = 1 FOR XML RAW B. SELECT OrderId, OrderDate, Amount, Name, Country FROM Orders INNER JOIN…
Q1. You administer a Microsoft SQL Server 2012 database. The database has a table named Customers owned by UserA and another table named Orders owned by UserB. You also have a stored procedure named GetCustomerOrderInfo owned by UserB. GetCustomerOrderInfo selects data from both tables. You create a new user named UserC. You need to ensure that UserC can call the GetCustomerOrderInfo stored…
Q1. You develop a database for a travel application. You need to design tables and other database objects. You create a stored procedure. You need to supply the stored procedure with multiple event names and their dates as parameters. 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…
Q1. 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 View AnswerAnswer: B Q2. You administer a Microsoft SQL Server 2012 instance. After a routine shutdown, the drive that contains tempdb fails. You need to be able to start…
Q1. You are creating an application that will connect to the AgentPortal database by using a SQL login named AgentPortalUser. Stored procedures in the database will use sp_send_dbmail to send email messages. You create a user account in the msdb database for the AgentPortalUser login. You use the Database Mail Configuration Wizard to create a Database Mail profile. Security has not…
Q1. You administer a Microsoft SQL Server 2012 database named Contoso on a server named Server01. You need to diagnose deadlocks that happen when executing a specific set of stored procedures by recording events and playing them back on a different test server. What should you create? A. an Extended Event session B. a Policy C. a Database Audit Specification D. an Alert E. a Server Audit…
Q1. You administer a Microsoft SQL Server 2012 Enterprise Edition server that uses 64 cores. You discover performance issues when large amounts of data are written to tables under heavy system load. You need to limit the number of cores that handle I/O. What should you configure? A. Processor affinity B. Lightweight pooling C. Max worker threads D. I/O affinity View AnswerAnswer: D Q2. You create a table that…
Q1. 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…
Q1. 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…