CMS专题

单选题You received complaints about the degradation of SQL query performance. You identified top SQL queries that consume time. What would be your next step to find out recommendations about statistics collection and restructuring of the SQL statement to imp

题目
单选题
You received complaints about the degradation of SQL query performance. You identified top SQL queries that consume time. What would be your next step to find out recommendations about statistics collection and restructuring of the SQL statement to improve query performance?()
A

run Segment Advisor

B

run SQL Tuning Advisor on top SQL statements

C

run the Automatic Workload Repository (AWR) report

D

run the Automatic Database Diagnostic Monitor (ADDM)on top SQL statements

参考答案和解析
正确答案: B
解析: 暂无解析
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

A new report process containing a complex query is written, with high impact on the database. You wantto collect basic statistics about query, such as the level of parallelism, total database time, and the number of I/O requests.For the database instance STATISTICS_LEVEL, the initialization parameter is set to TYPICAL and theCONTROL_MANAGEMENT_PACK_ACCESS parameter is set to DIAGNOSTIC+TUNING.What should you do to accomplish this task?()

A. Execute the query and view Active Session History (ASH) for information about the query.

B. Enable SQL trace for the query.

C. Create a database operation, execute the query, and use the DBMS_SQL_MONITOR. REPORT_SQL_MONITOR function to view the report.

D. Use the DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS procedure to monitor query execution and view the information from the V$SESSION_LONGOPS view.


参考答案:C

第2题:

You are maintaining your OLTP database in Oracle10g. You are performing the Flashback Transaction Query to find the undo SQL statements that can be used to undo the changes made to the database in the specific time period. Which pseudocolumn will you use to perform the Flashback Transaction Query?()

  • A、 VERSIONS_STARTSCN
  • B、 VERSIONS_STARTTIME
  • C、 VERSIONS_XID
  • D、 VERSIONS_OPERATION

正确答案:C

第3题:

You have an SQL query that takes one minute to execute. You use the following code segment to execute theSQL query asynchronously.Dim ar As IAsyncResult = cmd.BeginExecuteReader()You need to execute a method named DoWork() that takes one second to run while the SQL query is executing.DoWork() must run as many times as possible while the SQL query is executing.Which code segment should you use?()

A.

B.

C.

D.


参考答案:B

第4题:

By mistake, you ran the batch job (for updating the BILL_DETAILS table) twice. You are not sure which rows in the BILL_DETAILS table were affected. You need to identify:  a) A list of changes made along with the transaction identifier of each change.  b) The necessary SQL statements to undo the erroneous changes.  Which option would you choose?()

  • A、 RMAN only.
  • B、 Flashback Table only.
  • C、 Flashback Version Query only.
  • D、 Flashback Database and Flashback Transaction Query.
  • E、 Flashback Version Query and Flashback Transaction Query.

正确答案:E

第5题:

You find that the execution time of reports in your datawarehouse application is significantly high. You suspect the lack of indexes to be the reason for the degradation in performance.  Which advisory component would you refer to, in order to determine the appropriate indexes?() 

  • A、Memory Advisor
  • B、Segment Advisor
  • C、SQL Access Advisor
  • D、Automatic Workload Repository (AWR)
  • E、Automatic Database Diagnostic Monitor (ADDM)

正确答案:C

第6题:

You are the administrator of a SQL Server 2000 computer. One of the databases on the server contains a table named complaints. This table is used to store information about customer complaints.

The customer service representatives in your company add and edit the information in the complaints table. They work with this table by using a number of client applications, including a web-based application and a Microsoft Windows 32-bit application.

The customer service manager discovers that some customer complaints are marked as closed before they are resolved to the customer’s satisfaction.

You need to notify the customer service manager whenever a complaint is marked as closed. You do not want to make any changes to the client applications.

What should you do?

A.Create an UPDATE trigger that sends an e-mail message.

B.Create a stored procedure that sends an e-mail message. Use the stored procedures to make changes to the data.

C.Create a user-defined function that sends an e-mail message. Use the function to make changes to the data.

D.Create a rule that validates data entry. Bind the rule to the CompliantClosed column.


正确答案:A
解析:Explanation: Adding an appropriate UPDATE trigger that notifies the service manager whenever a complaint is marked is closed would accomplish the requirements. The client applications application would not have to be changed.

Note: In SQL Server 2000, triggers are a special type of stored procedure that fire automatically when an UPDATE, INSERT, or DELETE statement is issued against a table or view. Triggers are powerful tools that can be used to enforce business rules automatically when data is modified and can automate the processing for a company. Like stored procedures, triggers contain Transact-SQL statements which can include instructions to send an e-mail message when a particular column is updated

Incorrect Answers:
B: If a stored procedure is created and used the client application would have to be adjusted
accordingly. But we don’t want to make any changes in the client application.

Note: A stored procedure is a set of Transact-SQL statements compiled into a single execution plan and can return data as output parameters, which can return either data or a cursor variable; return codes, which are always an integer value; a result set for each SELECT statement contained in the stored procedure or any other stored procedures called by the stored procedure; or as a global cursor that can be referenced outside the stored procedure.

Stored procedures assist in achieving a consistent implementation of logic across applications as the SQL statements and logic needed to perform. a task can be coded and tested once in a stored procedure. Thereafter each application or user that needs to perform. that task can execute the stored procedure.

Coding business logic into a single stored procedure also offers a single point of control for ensuring that business rules are correctly enforced. Stored procedures can also be used to customize security permissions in much the same way as views. Stored procedure permissions can be used to prevent users from modifying data in certain columns and then grant users permissions to execute the procedure.

C: If a user defined function is created and used the client application would have to be adjusted accordingly. But we don’t want to make any changes in the client application.

Note: In programming languages, functions are subroutines used to encapsulate frequently performed logic. Any code that must perform. the logic incorporated in a function can call the function rather than having to repeat all of the function logic. SQL Server 2000 supports built-in functions and user-defined functions.

Built-in functions operate as defined in the Transact-SQL Reference and cannot be modified while user-defined functions allow the user to define their own Transact-SQL functions using the CREATE FUNCTION statement. User-defined functions take zero or more input parameters, and return a single value. Some user-defined functions return a single, scalar data value, such as an int, char, or decimal value.

D: Just creating a rule would only check the input, it would not notify the service manager as required.

Note: Rules are a backward-compatibility feature of SQL Server 2000 and performs the same functions as CHECK constraints. CHECK constraints are the preferred, standard way to restrict the values in a column as they are more concise than rules.

第7题:

Which statement is true when you run the SQL Tuning Advisor with limited scope?()

  • A、Access path analysis is not performed for the SQL statements.
  • B、SQL structure analysis is not performed for the SQL statements.
  • C、SQL Profile recommendations are not generated for the SQL statements.
  • D、The staleness and absence of the statistics are not checked for the objects in the query supplied to the SQL Tuning Advisor.

正确答案:C

第8题:

You define a multiple-row subquery in the WHERE clause of an SQL query with a comparison operator "=". What happens when the main query is executed? ()

A. The main query executes with the first value returned by the subquery.

B. The main query executes with the last value returned by the subquery.

C. The main query executes with all the values returned by the subquery.

D. The main query fails because the multiple-row subquery cannot be used with the comparison operator.

E. You cannot define a multiple-row subquery in the WHERE clause of a SQL query.


参考答案:D

第9题:

You define a multiple-row subquery in the WHERE clause of an SQL query with a comparison operator "=".What happens when the main query is executed?()

  • A、The main query executes with the first value returned by the subquery.
  • B、The main query executes with the last value returned by the subquery.
  • C、The main query executes with all the values returned by the subquery.
  • D、The main query fails because the multiple-row subquery cannot be used with the comparison operator.
  • E、You cannot define a multiple-row subquery in the WHERE clause of a SQL query.

正确答案:D

第10题:

You are a database administrator for your company. The company uses a vendor company’s application that is based on a proprietary database. You query data from the application database and import the data into a SQL Server 2005 database. The application vendor provides you with a new OLE DB driver to be used when querying the application database. Company policy prohibits connections between the SQL Server database and the application database, except when querying this data. You need to provide a way to query data from the application database. What should you?()

  • A、Configure a Linked Server connection to the application database.
  • B、Write a query that uses an OPENDATASOURCE command.
  • C、Write a query that uses an OPENQUERY command.
  • D、Configure a Remote Server connection to the application database.

正确答案:B

更多相关问题