[Free] 2018(Aug) Dumps4cert Microsoft 70-461 Dumps with VCE and PDF Download 71-80

Dumps4cert.com : Latest Dumps with PDF and VCE Files
2018 Aug Microsoft Official New Released 70-461
100% Free Download! 100% Pass Guaranteed!

Querying Microsoft SQL Server 2012

Question No: 71 DRAG DROP

You create the following stored procedure. (Line numbers are included for reference only.)

image

You need to ensure that the stored procedure performs the following tasks:

-> If a record exists, update the record.

-> If no record exists, insert a new record.

Which four Transact-SQL statements should you insert at line 07? (To answer, move the appropriate statements from the list of statements to the answer area and arrange them in the correct order.)

image

Answer:

image

Question No: 72 CORRECT TEXT

You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)

image

You need to create a view named uv_CustomerFullName to meet the following requirements:

-> The code must NOT include object delimiters.

-> The view must be created in the Sales schema.

-> Columns must only be referenced by using one-part names.

-> The view must return the first name and the last name of all customers.

-> The view must prevent the underlying structure of the customer table from being

changed.

-> The view must be able to resolve all referenced objects, regardless of the user#39;s default schema.

Which code segment should you use?

To answer, type the correct code in the answer area.

Answer: Please review the explanation part for this answer

Explanation:

CREATE VIEW Sales.uv_CustomerFullName WITH SCHEMABINDING

AS

SELECT FirstName, LastName FROM Sales.Customers

Question No: 73

You develop a Microsoft SQL Server 2012 database that contains a heap named OrdersHistorical.

You write the following Transact-SQL query:

-> INSERT INTO OrdersHistorical

-> SELECT * FROM CompletedOrders

You need to optimize transaction logging and locking for the statement. Which table hint should you use?

  1. HOLDLOCK

  2. ROWLOCK

  3. XLOCK

  4. UPDLOCK

  5. TABLOCK

Answer: E

Reference: http://technet.microsoft.com/en-us/library/ms189857.aspx Reference: http://msdn.microsoft.com/en-us/library/ms187373.aspx

Question No: 74

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 effort. What should you do?

  1. Create a custom database role that includes the users. Deny Delete permissions on the Sales schema for the custom database role.

  2. Include the Sales schema as an owned schema for the db_denydatawriter role. Add the users to the db_denydatawriter role.

  3. Deny Delete permissions on each table in the Sales schema for each user.

  4. Create a custom database role that includes the users. Deny Delete permissions on each table in the Sales schema for the custom database role.

Answer: A

Question No: 75

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 will return the correct results in the most efficient manner. Which Transact-SQL query should you use?

  1. SELECT COUNT(*) FROM Purchases

    WHERE PurchaseTime = CONVERT(DATE, GETDATE())

  2. SELECT COUNT(*)

    FROM Purchases

    WHERE PurchaseTime = GETDATE()

  3. SELECT COUNT(*) FROM Purchases

    WHERE CONVERT(VARCHAR, PurchaseTime, 112) = CONVERT(VARCHAR, GETDATE(), 112)

  4. SELECT COUNT(*) FROM Purchases

WHERE PurchaseTime gt;= CONVERT(DATE, GETDATE())

AND PurchaseTime lt; DATEADD(DAY, 1, CONVERT(DATE, GETDATE()))

Answer: D Explanation:

Two answers will return the correct results (the quot;WHERE CONVERT…quot; and quot;WHERE … AND … quot; answers).

The correct answer for Microsoft would be the answer that is most quot;efficientquot;. Anybody have a clue as to which is most efficient? In the execution plan, the one that I#39;ve selected as the correct answer is the query with the shortest duration. Also, the query answer with quot;WHERE CONVERT…quot; threw warnings in the execution plan…something about affecting CardinalityEstimate and SeekPlan.

I also found this article, which leads me to believe that I have the correct answer: http://technet.microsoft.com/en-us/library/ms181034.aspx

Question No: 76 DRAG DROP

You develop an SQL Server database. The database contains a table that is defined by the following T-SQL statements:

image

The table contains duplicate records based on the combination of values in the surName, givenName, and dateOfBirth fields.

You need to remove the duplicate records.

How should you complete the relevant Transact-SQL statements? To answer, drag the appropriate code segment or segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

image

Answer:

image

Explanation:

image

Example:

let us write a query which will delete all duplicate data in one shot. We will use a CTE (Common Table Expression) for this purpose. We will read in future posts what a CTE is and why it is used. On a lighter note, CTE#39;s can be imagined as equivalent to temporary result sets that can be used only in an underlying SELECT, INSERT, UPDATE, DELETE or CREATE VIEW statement.

;WITH CTE AS (

SELECT Name

, City

, [State]

, ROW_NUMBER() OVER(PARTITION BY Name, City, [State] ORDER BY [Name]) AS

Rnum

FROM Persons

)

DELETE FROM CTE WHERE Rnum lt;gt; 1

In the code by saying WHERE Rnum lt;gt; 1, we are asking SQL Server to keep all the records with Rank 1, which are not duplicates, and delete any other record. After executing this query in SQL Server Management Studio, you will end up with no duplicates in your table. To confirm that just run a simple query against your table.

Question No: 77

You have a vendor application that uses a scalar function.

You discover that the queries for the application run slower than expected. You need to gather the runtime information of the scalar function.

What are two possible ways to achieve this goal? Each correct answer presents a complete solution.

  1. Enable the Include Actual Execution Plan option.

  2. Enable the Display Estimated Execution Planoption.

  3. Create and then enable a profiler trace.

  4. Create and then enable an extended events trace.

  5. Run the Database Engine Tuning Advisor.

Answer: A,D Explanation:

A: An execution plan is the result of the query optimizer’s attempt to calculate the mostefficient way to implement the request represented by the T-SQL query you submitted. To generate the first execution plan, you can enable the Include Actual Execution Plan option.

D: SQL Server Extended Events can be used to capture User Defined Function(UDF) counts

References:https://www.mssqltips.com/sqlservertip/4100/how-to-find-udfs-causing-sql- server-performance-issues/

Question No: 78

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

  1. Create a SQL Server login that has VIEW SERVER STATE permissions. Create an application role and a secured password for the role.

  2. Modify the stored procedure to include the EXECUTE AS OWNER statement. Grant VIEW SERVER STATE permissions to the owner of the stored procedure.

  3. Create a SQL Server login that has VIEW SERVER STATE permissions. Modify the stored procedure to include the EXECUTE AS {newlogin} statement.

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

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

Answer: D,E

Question No: 79

You support a database structure shown in the exhibit. (Click the Exhibit button.)

image

You need to write a query that displays the following details:

-> Total sales made by sales people, year, city, and country

-> Sub totals only at the city level and country level

-> A grand total of the sales amount Which Transact-SQL query should you use?

  1. SELECT SalesPerson.Name, Country, City, DatePart(yyyy, SaleDate) AS Year, Sum(Amount) AS Total FROM Sale INNER JOIN SalesPerson

    ON Sale.SalesPersonID = SalesPerson.SalesPersonID

    GROUP BY GROUPING SETS((SalesPerson.Name, Country, City, DatePart(yyyy, SaleDate)), (Country, City), (Country), ())

  2. SELECT SalesPerson.Name, Country, City, DatePart(yyyy, SaleDate) AS Year, Sum(Amount) AS Total FROM Sale INNER JOIN SalesPerson

    ON Sale.SalesPersonID = SalesPerson.SalesPersonID

    GROUP BY CUBE(SalesPerson.Name, Country, City, DatePart(yyyy, SaleDate))

  3. SELECT SalesPerson.Name, Country, City, DatePart(yyyy, SaleDate) AS Year, Sum(Amount) AS Total FROM Sale INNER JOIN SalesPerson

    ON Sale.SalesPersonID = SalesPerson.SalesPersonID

    GROUP BY CUBE(SalesPerson.Name, DatePart(yyyy, SaleDate), City, Country)

  4. SELECT SalesPerson.Name, Country, City, DatePart(yyyy, SaleDate) AS Year, Sum(Amount) AS Total FROM Sale INNER JOIN SalesPerson

ON Sale.SalesPersonID = SalesPerson.SalesPersonID

GROUP BY ROLLUP(SalesPerson.Name, DatePart(yyyy, SaleDate), City, Country)

Answer: A Explanation:

Be careful with this question, because on exam can be different options for answer. And none of them is correct: D You should report this question.

Reference: http://www.grapefruitmoon.net/diving-into-t-sql-grouping-sets/

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

Question No: 80

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?

  1. BEGIN TRANSACTION BEGIN TRY

    EXEC dbo.ModifyData COMMIT TRANSACTION END TRY

    BEGIN CATCH

    IF @@ TRANCOUNT = 0 ROLLBACK TRANSACTION; END CATCH

  2. BEGIN TRANSACTION BEGIN TRY

    EXEC dbo.ModifyData COMMIT TRANSACTION END TRY

    BEGIN CATCH

    IF @@ERROR != 0 ROLLBACK TRANSACTION; THROW;

    END CATCH

  3. BEGIN TRANSACTION BEGIN TRY

    EXEC dbo.ModifyData COMMIT TRANSACTION END TRY

    BEGIN CATCH

    IF @@TRANCOUNT = 0 ROLLBACK TRANSACTION; THROW;

    END CATCH

  4. BEGIN TRANSACTION BEGIN TRY

EXEC dbo.ModifyData COMMIT TRANSACTION END TRY

BEGIN CATCH

IF @@ERROR != 0 ROLLBACK TRANSACTION; END CATCH

Answer: D

100% Dumps4cert Free Download!
Download Free Demo:70-461 Demo PDF
100% Dumps4cert Pass Guaranteed!
70-461 Dumps

Dumps4cert ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No


Leave a Reply

Your email address will not be published. Required fields are marked *

  • Categories

  • Tags

  • Hot Exams

  • Hot Exams

  • Hot Catageories

  • microsoft dumps

    62-193 Dumps
    70-243 Dumps
    70-246 Dumps
    70-247 Dumps
    70-331 Dumps
    70-332 Dumps
    70-333 Dumps
    70-334 Dumps
    70-339 Dumps
    70-341 Dumps
    70-342 Dumps
    70-345 Dumps
    70-346 Dumps
    70-347 Dumps
    70-348 Dumps
    70-354 Dumps
    70-355 Dumps
    70-357 Dumps
    70-383 Dumps
    70-384 Dumps
    70-385 Dumps
    70-398 Dumps
    70-410 Dumps
    70-411 Dumps
    70-412 Dumps
    70-413 Dumps
    70-414 Dumps
    70-417 Dumps
    70-461 Dumps
    70-462 Dumps
    70-463 Dumps
    70-464 Dumps
    70-465 Dumps
    70-466 Dumps
    70-467 Dumps
    70-469 Dumps
    70-470 Dumps
    70-473 Dumps
    70-475 Dumps
    70-480 Dumps
    70-481 Dumps
    70-482 Dumps
    70-483 Dumps
    70-484 Dumps
    70-485 Dumps
    70-486 Dumps
    70-487 Dumps
    70-488 Dumps
    70-489 Dumps
    70-490 Dumps
    70-491 Dumps
    70-492 Dumps
    70-494 Dumps
    70-496 Dumps
    70-497 Dumps
    70-498 Dumps
    70-499 Dumps
    70-517 Dumps
    70-532 Dumps
    70-533 Dumps
    70-534 Dumps
    70-535 Dumps
    70-537 Dumps
    70-640 Dumps
    70-642 Dumps
    70-646 Dumps
    70-673 Dumps
    70-680 Dumps
    70-681 Dumps
    70-682 Dumps
    70-684 Dumps
    70-685 Dumps
    70-686 Dumps
    70-687 Dumps
    70-688 Dumps
    70-689 Dumps
    70-692 Dumps
    70-694 Dumps
    70-695 Dumps
    70-696 Dumps
    70-697 Dumps
    70-698 Dumps
    70-703 Dumps
    70-705 Dumps
    70-713 Dumps
    70-734 Dumps
    70-735 Dumps
    70-740 Dumps
    70-741 Dumps
    70-742 Dumps
    70-743 Dumps
    70-744 Dumps
    70-745 Dumps
    70-761 Dumps
    70-762 Dumps
    70-764 Dumps
    70-765 Dumps
    70-767 Dumps
    70-768 Dumps
    70-773 Dumps
    70-774 Dumps
    70-775 Dumps
    70-776 Dumps
    70-778 Dumps
    70-779 Dumps
    70-980 Dumps
    70-981 Dumps
    70-982 Dumps
    74-343 Dumps
    74-344 Dumps
    74-409 Dumps
    74-678 Dumps
    74-697 Dumps
    77-418 Dumps
    77-419 Dumps
    77-420 Dumps
    77-421 Dumps
    77-422 Dumps
    77-423 Dumps
    77-424 Dumps
    77-425 Dumps
    77-426 Dumps
    77-427 Dumps
    77-428 Dumps
    77-600 Dumps
    77-601 Dumps
    77-602 Dumps
    77-603 Dumps
    77-604 Dumps
    77-605 Dumps
    77-725 Dumps
    77-726 Dumps
    77-727 Dumps
    77-728 Dumps
    77-729 Dumps
    77-730 Dumps
    77-731 Dumps
    77-853 Dumps
    77-881 Dumps
    77-882 Dumps
    77-883 Dumps
    77-884 Dumps
    77-885 Dumps
    77-886 Dumps
    77-887 Dumps
    77-888 Dumps
    77-891 Dumps
    98-349 Dumps
    98-361 Dumps
    98-362 Dumps
    98-363 Dumps
    98-364 Dumps
    98-365 Dumps
    98-366 Dumps
    98-367 Dumps
    98-368 Dumps
    98-369 Dumps
    98-372 Dumps
    98-373 Dumps
    98-374 Dumps
    98-375 Dumps
    98-379 Dumps
    98-380 Dumps
    98-381 Dumps
    98-382 Dumps
    98-383 Dumps
    98-388 Dumps
    AZ-100 Dumps
    AZ-101 Dumps
    AZ-102 Dumps
    INF-203x Dumps
    INF-204x Dumps
    INF-205x Dumps
    INF-206x Dumps
    MB2-700 Dumps
    MB2-701 Dumps
    MB2-702 Dumps
    MB2-703 Dumps
    MB2-704 Dumps
    MB2-706 Dumps
    MB2-707 Dumps
    MB2-708 Dumps
    MB2-709 Dumps
    MB2-710 Dumps
    MB2-711 Dumps
    MB2-712 Dumps
    MB2-713 Dumps
    MB2-714 Dumps
    MB2-715 Dumps
    MB2-716 Dumps
    MB2-717 Dumps
    MB2-718 Dumps
    MB2-719 Dumps
    MB2-877 Dumps
    MB5-705 Dumps
    MB6-700 Dumps
    MB6-701 Dumps
    MB6-702 Dumps
    MB6-703 Dumps
    MB6-704 Dumps
    MB6-705 Dumps
    MB6-884 Dumps
    MB6-885 Dumps
    MB6-886 Dumps
    MB6-889 Dumps
    MB6-890 Dumps
    MB6-892 Dumps
    MB6-893 Dumps
    MB6-894 Dumps
    MB6-895 Dumps
    MB6-896 Dumps
    MB6-897 Dumps
    MB6-898 Dumps