网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL query asynchronously.IAsyncResult ar = cmd.BeginExecuteReader( );You need to execute a method named Do Work( ) 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、while(ar.AsyncWaitHandle==null){DoWork();}dr=cmd.EndExecuteReader(ar);
  • B、while(!ar.IsCompleted){DoWork();}dr=cmd.EndExecuteReader(ar);
  • C、while(Thread.CurrentThread.ThreadState==ThreadState.Running){DoWork();}dr=cmd.EndExecuteReader(ar);
  • D、while(!ar.AsyncWaitHandle.WaitOne()){DoWork();}dr=cmd.EndExecuteReader(ar);

参考答案

更多 “You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL query asynchronously.IAsyncResult ar = cmd.BeginExecuteReader( );You need to execute a method named Do Work( ) 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、while(ar.AsyncWaitHandle==null){DoWork();}dr=cmd.EndExecuteReader(ar);B、while(!ar.IsCompleted){DoWork();}dr=cmd.EndExecuteReader(ar);C、while(Thread.CurrentThread.ThreadState==ThreadState.Running){DoWork();}dr=cmd.EndExecuteReader(ar);D、while(!ar.AsyncWaitHandle.WaitOne()){DoWork();}dr=cmd.EndExecuteReader(ar);” 相关考题
考题 You are writing a method that accepts a string parameter named message.Your method must break the message parameter into individual lines of text and pass each line to a second method named Process.Which code segment should you use?()A.B.C.D.

考题 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.

考题 To generate recommendations to improve the performance of a set of SQL queries in an application, you execute the following blocks of code:The blocks of code execute successfully; however, you do not get the required outcome. What could be the reason?()A. A template needs to be associated with the task.B.A workload needs to be associated with the task.C. The partial or complete workload scope needs to be associated with the task.D. The type of structures (indexes, materialized views, or partitions) to be recommended need to be specified for the task.

考题 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.

考题 You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL 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、While ar.AsyncWaitHandle Is Nothing DoWork()End Whiledr = cmd.EndExecuteReader(ar)B、While Not ar.IsCompleted DoWork()End Whiledr = cmd.EndExecuteReader(ar)C、While T hread.CurrentThread.ThreadState = ThreadState.Running DoWork()End Whiledr = cmd.EndExecuteReader(ar)D、While Not ar.AsyncWaitHandle.WaitOne() DoWork()End Whiledr = cmd.EndExecuteReader(ar)

考题 You are the network administrator for your company. The network consists of a single Active Directorydomain. The functional level of the domain is Windows Server 2003.Some user accounts have expiring passwords and some do not. You need to identify all user accounts that do not have expiring passwords. You need to modify the passwordproperty to allow the passwords on these accounts to expire. You must complete this task by using the minimum amount of administrative effort.First, you create a saved query to obtain a list of all user accounts that do not have expiring passwords.What should you do next? ()A、Export the query results to a comma-delimited file. Use a CSVDE script to modify the password property of each user account.B、From the Results pane of the query, select all user accounts and modify their password properties simultaneously.C、Export the query results to a comma-delimited file. Use an LDIFDE script to modify the password property of each user account.D、From the Results pane of the query, select each user account and modify the password property, one by one.

考题 Your application must access data that is located on two SQL Server 2005 computers. One of these servers is named SQL1 and the other is SQL2. You have permissions to create a stored procedure on SQL1 to support your application. However,on SQL2 you only have permissions to select data. You write the stored procedure on SQL1. The stored procedure accesses SQL2 by using the OPENQUERY Transact-SQL statement. However,the query fails when executed.You need to troubleshoot the cause of the error. What should you do?()A、Join the two servers by using the four-part syntax of server.database.schema.table.B、Reference SQL2 by using an alias.C、Add SQL2 as a remote server to SQL1.D、Add SQL2 as a linked server to SQL1.

考题 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.

考题 Which method would you use to undo the changes made by a particular transaction without affecting the changes made by other transactions?()A、point-in-time recoveryB、execute the ROLLBACK command with transaction numberC、flashback the database to before the transaction was committedD、determine all the necessary undo SQL statements from FLASHBACK_TRANSACTION_QUERY and use them for recovery

考题 You have created a resource plan, DAY. You execute the following code:        SQL BEGIN        DBMS_RESOURCE_MANAGER.CREATE_SIMPLE_DIRECTIVE   ( PLAN = ’DAY’,        COMMENT = ’DEPARTMENTS PLAN’,   GROUP_OR_SUBPLAN = ’DEPARTMENTS’,        CPU_P1=0);        END;   Then, you issue the following code:        SQL BEGIN   DBMS_RESOURCE_MANAGER.CREATE_SIMPLE_DIRECTIVE        ( PLAN = ’DAY’,        COMMENT = ’DEPARTMENTS PLAN’,        GROUP_OR_SUBPLAN = ’DEVELOPERS’,        CPU_P2=100);        END;   What will be the impact of executing the above code?()  A、 The DEVELOPERS and DEPARTMENTS subplans will be allocated CPU equally.B、 The DEVELOPERS subplan will be allocated 100 percent CPU if there are no resources allocated to the DEPARTMENTS subplan.C、 The DEPARTMENT subplan will be allocated 100 percent CPU if there are no resources allocated to the DEVELOPERS subplan.D、 The second code will not execute because one resource plan cannot be used by more than one subplan.

考题 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 AdvisorB、run SQL Tuning Advisor on top SQL statementsC、run the Automatic Workload Repository (AWR) reportD、run the Automatic Database Diagnostic Monitor (ADDM)on top SQL statements

考题 You have lost all your database control files. To recover them, you are going to use the results of the alter database backup controlfile to trace command. Your datafiles and your online redo logs are all intact.  Which of the following is true regarding your recovery?()  A、 You will need to open the database with the resetlogs command.B、 All you need to do is execute the trace file from SQL*Plus and it will perform the recovery for you.C、 You will use the resetlogs version of the create controlfile command.D、 You will use the noresetlogs version of the create controlfile command.E、 You will use the trace file to create a backup control file, and then you will recover the database with the recover database using backup controlfile command

考题 You need to resolve the blocking issue that is affecting the performance of the CRM system. What should you do?()A、Replace the named query with an SQL view.B、Set the transaction isolation level to serializable in the named query.C、Set the source database to use snapshot isolation.D、Set the transaction isolation level to repeatable read in the named query.

考题 You need to design the consolidation plan for SQL1, SQL2, and SQL3. You need to identify the appropriate combination of SQL Server instances and SQL Server 2005 computers that are needed to fulfill the company’s consolidation plans and security requirements.Which combination should you use?()A、one SQL Server 2005 computer with one instanceB、two SQL Server 2005 computers, each with two instancesC、two SQL Server computers, one with one instance and one with three instancesD、one SQL Server 2005 computer with two instances

考题 TestKing.com has multiple servers in a distributed environment. You work with two SQL Server 2005 computers named SQL1 and SQL2. Each server uses SQL Server Authentication and they use different logins.You need to write a distributed query that joins the data on SQL1 with the data on SQL2. What should you do?()A、Ensure that both SQL1 and SQL2 use the same login name as the security context for each server.B、Configure SQL2 as a remote server. Write the query on SQL1.C、Configure SQL2 as a linked server to impersonate the remote login.D、Configure SQL2 as a distributed server. Use pass-through authentication.

考题 You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. A user reports that when he runs a query, it takes a quite long time and it is still unfinished. As the IT support, you have to verify whether the query is blocked.  Which tool should you use? () A、You should use the Database Engine Tuning Advisor tool B、You should use the Windows System Monitor tool C、You should use the Job Activity Monitor tool in Microsoft SQL Server Management Studio D、You should use the Activity Monitor tool in Microsoft SQL Server Management Studio

考题 You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance which contains a database. Now your company CIO assigns a task to you. You have to check the performance of the SQL Server 2008 instance. You have to find out which common language runtime (CLR) queries takes the longest-running time.  So in the options below, which dynamic management view should you choose to use?()  A、sys.dm_os_wait_stats B、sys.dm_exec_requests C、sys.dm_exec_sessions D、sys.dm_exec_query_stats

考题 You work with a database named DB1, which is located on a SQL Server 2005 computer. You discover that a table scan on Table1 in DB1 causes a slow query. Table1 is a very large table that is used frequently. You ascertain that the query contains the following statement. SELECT col1, col2 FROM table1 WHERE col3 =  You need to provide maximum query performance. Table1 must remain available to users. What should you do?()A、Update all statistics on Table1 in DB1.B、Use the CREATE STATISTICS statement in DB1 to create missing statistics on col3of Table1.C、Set the priority boost server option to 1.D、Execute the following statement.USE DB1GOCREATE INDEX index1 ON table1(col3)INCLUDE(col1, col2) WITH (ONLINE = ON)GO

考题 You work in a company which is named Wiikigo Corp. The company uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. Today you notice that applications that run on the server have poor performances. You doubt that this has something to do with table scans. You have to capture the appropriate information by using an appropriate Windows System Monitor object. In the options below, which performance object should you use? () A、You should use SQLServer:Buffer ManagerB、You should use SQLServer:Memory Manager C、You should use SQLServer:Databases D、You should use SQLServer:Access Methods

考题 You are the network administrator for The network consists of a single Active Directory domain named The functional level of the domain is Windows Server 2003. Some user accounts have expiring passwords and some do not. You need to identify all user accounts that do not have expiring passwords. You need to modify the password property to allow the passwords on these accounts to expire. You must complete this task by using the minimum amount of administrative effort. First, you create a saved query to obtain a list of all user accounts that do not have expiring passwords. What should you do next?()A、Export the query results to a comma-delimited file. Use a CSVDE script to modify the password property of each user account.B、From the Results pane of the query, select all user accounts and modify their password properties simultaneously.C、Export the query results to a comma-delimited file. Use an LDIFDE script to modify the password property of each user account.D、From the Results pane of the query, select each user account and modify the password property, one by one.

考题 单选题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.

考题 单选题You create a method that runs by using the credentials of the end user. You need to use  Microsoft Windows groups to authorize the user. You must add a code segment that identifies whether a user is in the local group named Clerk.Which code segment should you use?()A AB BC CD D

考题 单选题You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL query asynchronously.IAsyncResult ar = cmd.BeginExecuteReader( );You need to execute a method named Do Work( ) 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 while(ar.AsyncWaitHandle==null){DoWork();}dr=cmd.EndExecuteReader(ar);B while(!ar.IsCompleted){DoWork();}dr=cmd.EndExecuteReader(ar);C while(Thread.CurrentThread.ThreadState==ThreadState.Running){DoWork();}dr=cmd.EndExecuteReader(ar);D while(!ar.AsyncWaitHandle.WaitOne()){DoWork();}dr=cmd.EndExecuteReader(ar);

考题 单选题Which method would you use to undo the changes made by a particular transaction without affecting the changes made by other transactions?()A  point-in-time recoveryB  execute the ROLLBACK command with transaction numberC  flashback the database to before the transaction was committedD  determine all the necessary undo SQL statements from FLASHBACK_TRANSACTION_QUERY and use them for recovery

考题 单选题You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. A user reports that when he runs a query, it takes a quite long time and it is still unfinished. As the IT support, you have to verify whether the query is blocked.  Which tool should you use? ()A You should use the Database Engine Tuning Advisor tool B You should use the Windows System Monitor tool C You should use the Job Activity Monitor tool in Microsoft SQL Server Management Studio D You should use the Activity Monitor tool in Microsoft SQL Server Management Studio

考题 单选题You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL 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 While ar.AsyncWaitHandle Is Nothing DoWork()End Whiledr = cmd.EndExecuteReader(ar)B While Not ar.IsCompleted DoWork()End Whiledr = cmd.EndExecuteReader(ar)C While T hread.CurrentThread.ThreadState = ThreadState.Running DoWork()End Whiledr = cmd.EndExecuteReader(ar)D While Not ar.AsyncWaitHandle.WaitOne() DoWork()End Whiledr = cmd.EndExecuteReader(ar)

考题 单选题You work in a Organization which is named Wiikigo Corp. The Organization uses SQL Server 2008. You are the administrator of the Organization database. Now you are in charge of a SQL Server 2008 instance. Look at the following query: SELECT s.*, i.* FROM SensitiveTbl AS s INNER JOIN InsensitiveTbl AS iON i. OrganizationName = s.OrganizationName You use the above query to join two tables on a column named OrganizationName. The following error is returned when you execute the query. "Msg 468, Level 16, State 9, Line 17 Cannot resolve the collation conflict between 'SQL_Latin1_General_CP1_CS_AS' and 'SQL_Latin1_General_CP1_CI_AS' in the equal to operation." The ON clause of the query has to be modified so that it can perform a case-sensitive joinsuccessfully. What should you do? ()A ON LOWER(i.OrganizationName) = LOWER(s.OrganizationName)B ON UPPER(i.OrganizationName) = UPPER(s.OrganizationName) C ON i.OrganizationName = s.OrganizationName COLLATE SQL_Latin1_General_CP1_CS_AS D ON i.OrganizationName = s.OrganizationName COLLATE SQL_Latin1_General_CP1_CI_AS