You are a database administrator for your company. You are responsible for a SQL Server 2005 database that has several indexes. You need to write a stored procedure that checks the indexes for fragmentation. Which Transact-SQL statement should you use?()A

题目

You are a database administrator for your company. You are responsible for a SQL Server 2005 database that has several indexes. You need to write a stored procedure that checks the indexes for fragmentation. Which Transact-SQL statement should you use?()

  • A、DBCC DBREINDEX
  • B、SELECT * FROM sys.dm_db_index_physical_stats
  • C、DBCC INDEXDEFRAG
  • D、SELECT * FROM sys.indexes
参考答案和解析
正确答案:B
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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.

正确答案:D

第2题:

You are a professional level SQL Server 2005 database administrator in an international corporation named Wiikigo. You are experienced in implementing high-availability solutions, monitoring the database server, and design deployment. In the company, you major job is the deployment, maintenance and support of Microsoft SQL Server 2005. You work as a database administrator for your company. The users report the slow performance of a SQL Server 2005 application. You are required to identify the queries which perform slowly because of blocking. Which action should you perform?()

  • A、In a SQL Trace log file, you should look for queries with low duration values and high read and write values.
  • B、In a query execution plan, you should look for queries with missing or out-of-date statistics.
  • C、In a SQL Trace log file, you should look for queries with high duration values and low read and write values.
  • D、In a query execution plan, you should look for queries with a large number of table scans.

正确答案:C

第3题:

You are the administrator of a SQL Server computer. Users report that the database times out when they attempt to modify data. You use the Current Activity window to examine locks held in the database as shown in the following screenshot.

You need to discover why users cannot modify data in the database, but you do not want to disrupt normal database activities. What should you do?

A.Use the spid 52 icon in the Current Activity window to discover which SQL statement is being executed

B.Use the sp_who stored procedure to discover who is logged in as spid 52

C.Use SQL Profiler to capture the activity of the user who is logged in as spid 52

D.Use System Monitor to log the locks that are granted in the database


正确答案:A
解析:Explanation: The current activity window in SQL Server Enterprise Manager can be used to perform. ad hoc monitoring of an instance of SQL Server. This allows for the quick analysis of the volume and general types of activity on the system and can indicate current blocked and blocking transactions, currently connected users on an instance of SQL Server and the last statement executed and locks that are in effect on the database.

In the screen shot of current activity window the icon, labeled spid 51, indicates that a database lock is in place; the second icon, labeled spid 52, can be used to identify the process that is blocking one or more connections; and the third icon, labeled spid 53, can be used to identify the process that is being blocked by another connection

Incorrect Answers:
B: The system stored procedure sp_lock can be used to return a result set that contains information about resources that are locked and the sp_who stored procedure provides information about current SQL Server 2000 users and processes. The information returned by the sp_who procedure can be filtered to return only current non-idle processes. This makes it possible to identify which resources are being locked and which processes are responsible for creating those locks. These stored procedures require more resources and more administrative effort than the Current Activity window. It is therefore not the best answer.

C: The SQL profiler is not the best tool to immediately solve the locking problem. It could be used at a later moment if a long-term solution to the problem is required. SQL profiler would require more system resources and might impact normal database activities.

Note: SQL Profiler is a graphical tool that allows system administrators to monitor events in an instance of SQL Server. Data pertaining to an event can be captured and saved to a file or SQL Server table to be analyzed at a later date. It can be is used to step through problem queries to find the cause of the problem; to find and diagnose slow-running queries; to capture the series of SQL statements that led to a problem; and to monitor the performance of SQL Server to tune workloads.

D: SQL Server provides objects and counters that can be used by System Monitor in a Windows 2000 or by Performance Monitor in Windows NT 4.0 to monitor the system performance of computers running an instance of SQL Server. However, these counters are used for statistics and alerts and they cannot, in a direct way, be used to track down the cause of the locking problem.

第4题:

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. There is a database named DB1 in the instance. TheDB1 database includes spatial data types. On DB1 databse, you have to perform a database consistency check to include the spatial indexes. Besides this, you must make sure that you can reduce the effect on the database concurrency to the least.  So which Transact-SQL statement should you run? () 

  • A、DBCC CHECKCATALOG (DB1); 
  • B、DBCC CHECKALLOC (DB1) WITH TABLOCK; 
  • C、DBCC CHECKDB (DB1) WITH TABLOCK, PHYSICAL_ONLY; 
  • D、DBCC CHECKDB (DB1) WITH EXTENDED_LOGICAL_CHECKS; 

正确答案:D

第5题:

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. There is a computer which hosts several applications in your company. The instance runs on the computer. A job named DiliveryList is created by you. This job requires a file to be written to a file server. But because the job cannot access the file server, it fails to run. You intend to configure the SQL Server Agent service so that only the SQL Server Agent service has read and write access to the file server. Which account type should you use? () 

  • A、You should use local Service account
  • B、You should use network Service account
  • C、You should use domain account
  • D、You should use local System account

正确答案:C

第6题:

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

第7题:

You are a professional level SQL Server 2005 database administrator in an international corporation named Wiikigo. You are experienced in implementing high-availability solutions, monitoring the database server, and design deployment. In the company, you major job is the deployment, maintenance and support of Microsoft SQL Server 2005.You work as a database administrator for your company. A SQL Server 2005 database is utilized in your company. And a table named Inventory is contained by the database. A column named Price is included by the table. According to the company policy, you cannot reduce more than 10 percent the value in the Price column in any single database operation. Through many kinds of method, the company makes updates to the Price column. For instance, the utilization of ad hoc queries is one of the methods. Since you are the database administrator, you should confirm that this company policy takes its effect. Which action should be performed?()

  • A、A stored procedure should be created, and changes are disallowed by the procedure to the Price column that violates company policy.
  • B、On the Price column, a check constraint should be created, and a specified minimum value is required by the check constraint.
  • C、A trigger should be created, and changes are rolled back by the trigger to the Price column that violates company policy.
  • D、On the Price column, a foreign key constraint is created to a table that valid prices are included.

正确答案:C

第8题:

You are a professional level SQL Server 2005 database administrator in an international corporation named Wiikigo. You are experienced in implementing high-availability solutions, monitoring the database server, and design deployment. In the company, you major job is the deployment, maintenance and support of Microsoft SQL Server 2005.You work as a database administrator for your company. Your job is to manage a SQL Server 2005 database, and there are several indexes in the SQL Server 2005. A stored procedure should be written, and the procedure should be utilized to check the indexes for fragmentation.  From the following four Transact-SQL statements, which one should be utilized achieve the goal?()

  • A、To achieve the goal, DBCC DBREINDEX should be utilized.
  • B、To achieve the goal, SELECT * FROM sys.indexes should be utilized.
  • C、To achieve the goal, SELECT * FROM sys.dm_db_index_physical_stats should be utilized.
  • D、To achieve the goal, DBCC INDEXDEFRAG should be utilized.

正确答案:C

第9题:

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. There is an internal application which uses Analysis Services and Reporting Services. You use the application on the basis of SQL Server 2008. According to the requirement of company security policy, the surface area for all the deployed components of SQL Server 2008 should be configured. You have to implement the security policy and devise a method to evaluate the security policy against other database servers. What should you do?()  

  • A、You should create policies based on the appropriate facets. Apply the policies against a server group. The server group includes the database servers that need to be configured 
  • B、You should create a Transact-SQL script based on the sp_configure stored procedure. Use a configuration server to run the script against a server group that includes the database servers that need to be configured 
  • C、You should edit the RSReportServer.config configuration file. Distribute the file to all database servers that need to be configured 
  • D、You should analyze your database servers by using the SQL Server Best Practices Analyzer (BPA). Implement the recommendations of the BPA

正确答案:A

第10题:

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 remote SQL Server 2008 instance. You notice that the application has a poor performance. On the remote SQL Server instance, you capture a workload of the remote instance to a trace table by using SQL Profiler. Now you have to use the Database Engine Tuning Advisor to analyze the workload of the remote SQL Server instance on a local SQL Server instance.  So what action should you perform to achieve this goal?()

  • A、You should recapture the workload by using the data collector.
  • B、You should enable the XP_MSVER stored procedure on the local server.
  • C、You should enable the XP_MSVER stored procedure on the remote server
  • D、You should recapture the workload to a trace file by using SQL Profiler.

正确答案:D

更多相关问题