2015 Get Prepared with fully updated Microsoft 70-462 Real Exam Questions and Accurate Answers for 70-462 Exam Dumps. Braindump2go IT experts review the 70-462 newly added qustions and suggest Correct Microsoft 70-462 Exam Questions Answers in Real Time. 100% Pass easily!!

Vendor: Microsoft
Exam Code: 70-462
Exam Name: Administering Microsoft SQL Server 2012 Databases Exam

11022

QUESTION 181
A table named Profits stores the total profit made each year within a territory.
The Profits table has columns named Territory, Year, and Profit.
You need to create a report that displays the profits made by each territory for each year and its previous year.
Which Transact-SQL query should you use?

A.    SELECT Territory, Year, Profit,
LEAD(Profit, 1, 0) OVER (PARTITION BY Territory ORDER BY Year) AS PrevProfit FROM Profits
B.    SELECT Territory, Year, Profit,
LAG(Profit, 1, 0) OVER (PARTITION BY Year ORDER BY Territory) AS PrevProfit FROM Profits
C.    SELECT Territory, Year, Profit,
LAG(Profit, 1, 0) OVER (PARTITION BY Territory ORDER BY Year) AS PrevProfit FROM Profits
D.    SELECT Territory, Year, Profit,
LEAD(Profit, 1, 0) OVER (PARTITION BY Year ORDER BY Territory) AS PrevProfit FROM Profits

Answer: C
Explanation:
http://msdn.microsoft.com/en-us/library/hh231256.aspx
http://msdn.microsoft.com/en-us/library/hh213125.aspx

QUESTION 182
Your database contains a table named SalesOrders.
The table includes a DATETIME column named OrderTime that stores the date and time each order is placed.  There is a non-clustered index on the OrderTime column. The business team wants a report that displays the total number of orders placed on the current day.
You need to write a query that will return the correct results in the most efficient manner.
Which Transact-SQL query should you use?

A.    SELECT COUNT(*) FROM SalesOrders
WHERE OrderTime = CONVERT(DATE, GETDATE())
B.    SELECT COUNT(*) FROM SalesOrders
WHERE OrderTime = GETDATE()
C.    SELECT COUNT(*) FROM SalesOrders
WHERE CONVERT(VARCHAR, OrderTime, 112) = CONVERT(VARCHAR, GETDATE(I, 112))
D.    SELECT COUNT(*) FROM SalesOrders
WHERE OrderTime >= CONVERT(DATE, GETDATE())
AND OrderTime < DATEADD(DAY, CONVERT(DATE, GETDATE()))

Answer: D

QUESTION 183
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: D

QUESTION 184
You are developing a database application by using Microsoft SQL Server 2012.
You have a query that runs slower than expected.
You need to capture execution plans that will include detailed information on missing indexes recommended by the query optimizer.
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: K

QUESTION 185
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: G
Explanation:
http://msdn.microsoft.com/en-us/library/cc645587.aspx

QUESTION 186
You create a table that has the StudentCode, SubjectCode, and Marks columns to record mid-year marks for students.
The table has marks obtained by 50 students for various subjects.
You need to ensure that the top half of the students arranged by their average marks must be given a rank of 1 and the remaining students must be given a rank of 2.
Which Transact-SQL query should you use?

A.    SELECT StudentCode as Code,
RANK() OVER (ORDER BY AVG (Marks) DESC) AS Value FROM StudentMarks
GROUP BY StudentCode
B.    SELECT Id, Name, Marks,
DENSE_RANK() OVER (ORDER BY Marks DESC) AS Rank
FROM StudentMarks
C.    SELECT StudentCode as Code,
DENSE_RANK() OVER (ORDER BY AVG (Marks) DESC) AS Value FROM StudentMarks
GROUP BY StudentCode
D.    SELECT StudentCode as Code,
NTILE (2) OVER (ORDER BY AVG (Marks) DESC) AS Value FROM StudentMarks
GROUP BY StudentCode
E.    SELECT StudentCode AS Code,Marks AS Value FROM ( SELECT StudentCode, Marks AS Marks,
RANK() OVER (PARTITION BY SubjectCode ORDER BY Marks ASC) AS Rank FROM StudentMarks) tmp
WHERE Rank = 1
F.    SELECT StudentCode AS Code,Marks AS Value FROM ( SELECT StudentCode, Marks AS Marks,
RANK() OVER (PARTITION BY SubjectCode ORDER BY Marks DESC) AS Rank FROM StudentMarks) tmp
WHERE Rank = 1
G.    SELECT StudentCode AS Code,Marks AS Value FROM ( SELECT StudentCode, Marks AS Marks,
RANK () OVER (PARTITION BY StudentCode ORDER BY Marks ASC) AS Rank FROM StudentMarks) tmp
WHERE Rank = 1
H.    SELECT StudentCode AS Code,Marks AS Value FROM ( SELECT StudentCode, Marks AS Marks,
RANXO OVER (PARTITION BY StudentCode ORDER BY Marks DESC) AS Rank FROM StudentMarks) tmp
WHERE Rank = 1

Answer: D

QUESTION 187
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
Explanation:
http://msdn.microsoft.com/en-us/library/ff848733.aspx
http://msdn.microsoft.com/en-us/library/bb630289.aspx

QUESTION 188
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 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: E

QUESTION 189
You develop a Microsoft SQL Server 2012 database.
The database is used by two web applications that access a table named Products.
You want to create an object that will prevent the applications from accessing the table directly while still providing access to the required data.
You need to ensure that the following requirements are met:
Future modifications to the table definition will not affect the applications’ ability to access data.
The new object can accommodate data retrieval and data modification.
You need to achieve this goal by using the minimum amount of changes to the applications.
What should you create for each application?

A.    Synonyms
B.    Common table expressions
C.    Views
D.    Temporary tables

Answer: C
Explanation:
http://msdn.microsoft.com/en-us/library/ms190174.aspx

QUESTION 190
You are designing a SQL Server Integration Services (SSIS) package that uses the Fuzzy Lookup transformation.
The reference data to be used in the transformation does not change.
You need to reuse the Fuzzy Lookup match index to increase performance and reduce maintenance.
What should you do?

A.    Select the GenerateAndPersistNewIndex option in the Fuzzy Lookup Transformation Editor.
B.    Select the GenerateNewIndex option in the Fuzzy Lookup Transformation Editor.
C.    Select the DropExistingMatchlndex option in the Fuzzy Lookup Transformation Editor.
D.    Execute the sp_FuzzyLookupTableMaintenanceUninstall stored procedure
E.     Execute the sp_FuzzyLookupTableMaintenanceInvoke stored procedure.

Answer: A
Explanation:
http://msdn.microsoft.com/en-us/library/ms137786.aspx

QUESTION 191
You are developing a SQL Server Integration Services (SSIS) package.
You need to design a package to change a variable value during package execution by using the least amount of development effort.
What should you use?

A.    Expression task
B.    Script task
C.    Execute SQL task
D.    Execute Process task
E.    Term Extraction transformation

Answer: A
Explanation:
http://msdn.microsoft.com/en-us/library/hh213137.aspx

QUESTION 192
You are creating a SQL Server Master Data Services (MDS) model for a company.
The source data for the company is stored in a single table that contains the manager-to-subordinate relationships.
You need to create a hierarchy representing the organizational structure of the company.
Which hierarchy type should you use?

A.    Natural
B.    Explicit
C.    Parent
D.    Recursive

Answer: D

QUESTION 193
You are completing the installation of the Data Quality Server component of SQL Server Data Quality Services (DQS).
You need to complete the post-installation configuration.
What should you do?

A.    Run the Configuration component in the Data Quality Client.
B.    Install ADOMD.NET.
C.    Run the Data Quality Server Installer.
D.    Make the data available for DQS operations.

Answer: C
Explanation:
http://msdn.microsoft.com/en-us/library/ff877917.aspx
http://msdn.microsoft.com/en-us/library/gg492277.aspx

QUESTION 194
You are the data steward for a Business Intelligence project.
You must identify duplicate rows stored in a SQL Server table and output discoveries to a CSV file.
A Data Quality Services (DQS) knowledge base has been created to support this project.
You need to produce the CSV file with the least amount of development effort.
What should you do?

A.    Create an Integration Services package and use a Data Profiling transform.
B.    Create a custom .NET application based on the Knowledgebase class.
C.     Create a data quality project.
D.    Create a CLR stored procedure based on the Knowledgebase class.
E.    Create a Master Data Services (MDS) business rule.

Answer: C
Explanation:
http://msdn.microsoft.com/en-us/library/hh213052.aspx
http://msdn.microsoft.com/en-us/library/ff877917.aspx
http://msdn.microsoft.com/en-us/library/microsoft.masterdataservices.services.datacontracts.knowledgebase.aspx
http://msdn.microsoft.com/en-us/library/bb895263.aspx

QUESTION 195
You are implementing the indexing strategy for a fact table in a data warehouse.
The fact table is named Quotes.
The table has no indexes and consists of seven columns:
– [ID]
– [QuoteDate]
– [Open]
– [Close]
– [High]
– [Low]
– [Volume]
Each of the following queries must be able to use a columnstore index:
– SELECT AVG ([Close]) AS [AverageClose] FROM Quotes WHERE [QuoteDate] BETWEEN ‘20100101’ AND ‘20101231’.
– SELECT AVG([High] – [Low]) AS [AverageRange] FROM Quotes WHERE [QuoteDate] BETWEEN ‘20100101’ AND
‘20101231’.
– SELECT SUM([Volume]) AS [SumVolume] FROM Quotes WHERE [QuoteDate] BETWEEN ‘20100101’ AND ‘20101231’.
You need to ensure that the indexing strategy meets the requirements.
The strategy must also minimize the number and size of the indexes.
What should you do?

A.    Create one columnstore index that contains [ID], [Close], [High], [Low], [Volume],
and [QuoteDate].
B.    Create three coiumnstore indexes:
One containing [QuoteDate] and [Close]
One containing [QuoteDate], [High], and [Low]
One containing [QuoteDate] and [Volume]
C.    Create one columnstore index that contains [QuoteDate], [Close], [High], [Low], and [Volume].
D.    Create two columnstore indexes:
One containing [ID], [QuoteDate], [Volume], and [Close]
One containing [ID], [QuoteDate], [High], and [Low]

Answer: C
Explanation:
http://msdn.microsoft.com/en-us/library/gg492088.aspx
http://msdn.microsoft.com/en-us/library/gg492153.aspx

QUESTION 196
You are designing a data warehouse with two fact tables.
The first table contains sales per month and the second table contains orders per day.
Referential integrity must be enforced declaratively.
You need to design a solution that can join a single time dimension to both fact tables.
What should you do?

A.    Join the two fact tables.
B.    Merge the fact tables.
C.    Create a time dimension that can join to both fact tables at their respective granularity.
D.    Create a surrogate key for the time dimension.

Answer: D
Explanation:
With dimensionally modeled star schemas or snowflake schemas, decision support queries follow a typical pattern: the query selects several measures of interest from the fact table, joins the fact rows with one or several dimensions along the surrogate keys, places filter predicates on the business columns of the dimension tables, groups by one or several business columns, and aggregates the measures retrieved from the fact table over a period of time.
The following demonstrates this pattern, which is also sometimes referred to as a star join query:
– select ProductAlternateKey,
– CalendarYear,sum(SalesAmount)
– from FactInternetSales Fact
– join DimTime
– on Fact.OrderDateKey = TimeKey
– join DimProduct
– on DimProduct.ProductKey =
– Fact.ProductKey
– where CalendarYear between 2003 and 2004
– and ProductAlternateKey like ‘BK%’
– group by ProductAlternateKey,CalendarYear

QUESTION 197
You develop three Microsoft SQL Server 2012 databases named Database1, Database2, and Database3.
You have permissions on both Database1 and Database2.
You plan to write and deploy a stored procedure named dbo.usp_InsertEvent in Database3. dbo.usp_InsertEvent must execute other stored procedures in the other databases.
You need to ensure that callers that do not have permissions on Database1 or Database2 can execute the stored procedure.
Which Transact-SQL statement should you use?

A.    USE Database2
B.    EXECUTE AS OWNER
C.    USE Database1
D.    EXECUTE AS CALLER

Answer: B
Explanation:
http://msdn.microsoft.com/en-us/library/ms188354.aspx http://blog.sqlauthority.com/2007/10/06/sql-server-executing-remote-stored-procedure-calling- storedprocedure-on-linked-server/


2015 All 189 Microsoft 70-462 Exam Dumps Questions are the New Checked and Updated! In recent years, the 70-462 certification has become a global standard for many successful IT companies. Looking to become a certified Microsoft professional? Download Braindump2go 2015 Latest Released 70-462 Exam Dumps Full Version and Pass 70-462 100%!

1522

http://www.braindump2go.com/70-462.html