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

题目内容 (请给出正确答案)
单选题
你发现SQL Server 2005数据库中sales表的所有索引的碎片都很严重。现在,你要将sales表全部索引的碎片减到最小,同时却不影响任何用户使用sales表。该怎样做?()
A

对包含销售表的磁盘进行碎片整理

B

执行以下语句:USE master; GO  DBCC  CLEAN  TABLE (‘DB1’.’sales’);GO

C

执行以下语句:USE DB1;GO ALTER INDEX ALL ON sales REORGANIZE WITH LOB_COMPACTION=ON);GO

D

执行以下语句:USE DB1;GO ALTER  INDEX  ALL ON sales REBUILD;GO


参考答案

参考解析
解析: 暂无解析
更多 “单选题你发现SQL Server 2005数据库中sales表的所有索引的碎片都很严重。现在,你要将sales表全部索引的碎片减到最小,同时却不影响任何用户使用sales表。该怎样做?()A 对包含销售表的磁盘进行碎片整理B 执行以下语句:USE master; GO  DBCC  CLEAN  TABLE (‘DB1’.’sales’);GOC 执行以下语句:USE DB1;GO ALTER INDEX ALL ON sales REORGANIZE WITH LOB_COMPACTION=ON);GOD 执行以下语句:USE DB1;GO ALTER  INDEX  ALL ON sales REBUILD;GO” 相关考题
考题 You are the database administrator for a retail company. The company owns 270 stores. Every month, each store submits approximately 2,000 sales records, which are loaded into a SQL Server 2000 database at the corporate headquarters.A Data Transformation Services (DTS) package transforms the sales records, as they are loaded. The package writes the transformed sales records to the Sales table, which has a column for integer primary key values. The IDENTITY property automatically assigns a key value to each transformed sales record.After loading this month's sales data, you discover that a portion of the data contains errors. You stop loading data, identify the problem records, and delete those records from the database.You want to reuse the key values that were assigned to the records that you deleted. You want to assign the deleted key values to the next sales records you load. You also want to disrupt users' work as little as possible.What should you do?A.Export all records from the Sales table to a temporary table. Truncate the Sales table, and then reload the records from the temporary table.B.Export all records from the Sales table to a text file. Drop the Sales table, and then reload the records from the text file.C.Use the DBCC CHECKIDENT statement to reseed the Sales table's IDENTITY property.D.Set the Sales table's IDENTITY_INSERT property to ON. Add new sales records that have the desired key values.

考题 你发现SQLServer2005数据库中sales表的所有索引的碎片都很严重。现在,你要将sales表全部索引的碎片减到最小,同时却不影响任何用户使用sales表。该怎样做?() A.对包含销售表的磁盘进行碎片整理B.执行以下语句:USEmaster;GODBCCCLEANTABLE(‘DB1’.’sales’);GOC.执行以下语句:USEDB1;GOALTERINDEXALLONsalesREORGANIZEWITH LOB_COMPACTION=ON);GOD.执行以下语句:USEDB1;GOALTERINDEXALLONsalesREBUILD;GO

考题 你正在SQLSERVER2005服务器上一个名为DB1的数据库上进行着工作。你发现由于对DB1中Table1表的扫描导致了查询执行缓慢。已知,Table是一个使用频繁而且非常巨大的表,同时你又确定了查询中包含如下的语句:SELECTcol1,col2FROMtable1WHEREcol3=。在表保持对所有用户有效的情况下,为了最大化的提高查询性能,你应该怎么做?() A.更新DB1数据库中表Table1的所有统计信息B.在DB1数据库中,使用CREATESTATISTICS语句为表Table1的列col3创建缺少的统计信息C.设置优先值提升选项的值为1D.执行如下语句:USEDB1GOCREATEINDEXindex1ONtable1(col3)INCLUDE(col1,col2)WITH(ONLINE=ON)GOE.执行如下语句USEDB1GOCREATEINDEXindex1ONtable1(col3,col2,col1)

考题 你正在负责管理公司一个SQLSERVER2005数据库。公司使用一个连接客户和销售表的视图v_CustomerSales进行例行的业务分析。他们用这个视图按月按客户进行销售数据汇总。为了,提高视图的性能,你应该怎么做?() A.修改视图,在表Customers和Sales之间采用外连接(outerjoin)B.为视图v_CustomerSales新建一个聚集索引C.为Customers表和Sales表分别创建v_Customers和v_Sales视图,在每个视图中不包含任何的连接关系D.用v_CustomerSales视图创建一个存储过程来进行业务分析

考题 假设一连锁书店的数据库中有3个表:连锁分店信息表STORES(STOR ID,STOR NAME),书籍销售信息表SALES(STOR ID,TITLE ID,QTY)和书籍信息表TITLES (TITLE ID,TITLE)。要查询各分店销售某书的数量,相应的SQL语句应该是:SELECT STOR_NAME,QTY,TITLEFROM TITLES,STORES,SALESWHERE TITLES.TITLE_ID=SALES.TITLE_ID AND【 】。

考题 你是一个出版公司的数据库开发人员,对特定的书名的每天的销售情况建立了如下的存储过程:CREATE PROCEDURE get_sales_for_titletitle varchar(80), @ytd_sales int OUTPUTASSELECT @ytd_sales = ytd_salesFROM titlesWHERE title = @titleIF @@ROWCOUNT = 0RETURN(-1)ELSERETURN(0)另外建立了一个脚本执行这个存储过程,如果执行成功,将返回对应于书名的每天的销售情况的报表,如果执行失败,将返回“No Sales Found”,怎样建立这个脚本?A. DECLARE @retval intDECLARE @ytd intEXEC get_sales_for_title ‘Net Etiquette’, @ytdIF @retval 0PRINT ‘No sales found’ELSEPRINT ‘Year to date sales: ’ + STR (@ytd)GOB. DECLARE @retval intDECLARE @ytd intEXEC get_sales_for_title ‘Net Etiquette’, @ytd OUTPUTIF @retval 0PRINT ‘No sales found’ELSEPRINT ‘Year to date sales: ’ + STR (@ytd)GOC. DECLARE @retval intDECLARE @ytd intEXEC get_sales_for_title ‘Net Etiquette’,@retval OUTPUTIF @retval 0PRINT ‘No sales found’ELSEPRINT ‘Year to date sales: ’ + STR (@ytd)GOD. DECLARE @retval intDECLARE @ytd intEXEC @retval = get_sales_for_title ‘Net Etiquette’, @ytd OUTPUTIF @retval 0PRINT ‘No sales found’ELSEPRINT ‘Year to date sales: ’ + STR (@ytd)GO

考题 某企业人事管理系统中有如下关系模式,员工表EmpCenrcpename,age,sal,in属性分别表示员工号,员工姓名、年龄、工资和部门名称,部门表Dept(dnamephone),属性分别表示部门名称和联系电话。需要查询其它部门比销售部门(Sales)所有员工年龄都要小的员工姓名及年龄,对应的SQL语句如下:SELECT ename,age FROM EmpWHERE age( )(SELECT age FROM EmpWHERE dname=’Sales’)AND(请作答此空);A.dname等于’Sales’ B.dname小于大于’Sales’ C.dname小于’Sales' D.dname大于’Sales’

考题 你是一个跨国公司的数据库开发者。公司有一个在SQL Server 2005/2008的在线交易处理的数据库。这个数据库有一个销售表,它里面包含了公司的一些固定的信息。在过去的一年,已经有150,000行数据被加到销售数据库中。数据库使用者说数据库慢慢的变得不太好用了。你为了改变数据库的查询销售表的能力,在SQL的查询分析器中要执行哪个脚本语句?()A、EXECsp_updatestats ’resample’B、CREATE STATISTICS Sales WITH FULLSCANC、Sp_autostats ‘Sales’D、UPDATE STATISTICS Sales WITH FULLSCAN ALL

考题 You execute the following command to change the status of the SALES tablespace:  SQL ALTER TABLESPACE sales OFFLINE;  Which statements describe the effect of the command()A、The tablespace would require recovery to go back online.B、A checkpoint is taken on all data files that are associated with the SALES tablespace.C、The sessions that subsequently try to access the objects in the SALES tablespace receive an error.D、The new status of the SALES tablespace is recorded in the control file when the database instance is closed.

考题 You are responsible for maintaining a SQL Server 2005 database. Business analysts in the company routinely use a view named v CustomerSales to join the Customers and Sales tables in the database. They use the view to aggregate total sales by customer by month. You need to increase the performance of the view. What should you do?()A、Update the view to use an outer join between the Customers and Sales tables.B、Create a clustered index on the v CustomerSales view.C、Create two separate views that do not contain any joinsone view named Customers for the Customers table and another one named v Sales for the Sales table.D、Create a stored procedure for the business analysts that uses the v CustomerSales view.

考题 你发现SQL Server 2005数据库中sales表的所有索引的碎片都很严重。现在,你要将sales表全部索引的碎片减到最小,同时却不影响任何用户使用sales表。该怎样做?()A、对包含销售表的磁盘进行碎片整理B、执行以下语句:USE master; GO  DBCC  CLEAN  TABLE (‘DB1’.’sales’);GOC、执行以下语句:USE DB1;GO ALTER INDEX ALL ON sales REORGANIZE WITH LOB_COMPACTION=ON);GOD、执行以下语句:USE DB1;GO ALTER  INDEX  ALL ON sales REBUILD;GO

考题 有名为 Sales 的表,现需要按客户姓名(CustomerName)和销售日期(SalesDate)排序返回销售数据。为每个客户提供最近期的销售必须首先列出。应使用的查询语句为()A、selectCustomerName,SalesDate from Sales group by CustomerName,SalesDateB、select CustomerName,SalesDate from Sales order by CustomerName,SalesDateC、select CustomerName,SalesDate from Sales group by CustomerNameorderbySalesDateDESCD、select CustomerName,SalesDate from Sales order by CustomerName,SalesDateDESC

考题 You execute the following command to change the status of the SALES tablespace:SQL ALTER TABLESPACE sales OFFLINE; Which statements describe the effect of the command()A、The tablespace would require recovery to go back online.B、A checkpoint is taken on all data files that are associated with the SALES tablespace.C、The sessions that subsequently try to access the objects in the SALES tablespace receive an errorD、The new status of the SALES tablespace is recorded in the control file when the database instance isclosed

考题 你正在负责管理公司一个SQL SERVER 2005数据库。公司使用一个连接客户和销售表的视图v_CustomerSales进行例行的业务分析。他们用这个视图按月按客户进行销售数据汇总。为了,提高视图的性能,你应该怎么做?()A、修改视图,在表Customers 和 Sales之间采用外连接(outer join)B、为视图v_CustomerSales新建一个聚集索引C、为Customers表和Sales表分别创建v_Customers和v_Sales视图,在每个视图中不包含任何的连接关系D、用v_CustomerSales 视图创建一个存储过程来进行业务分析

考题 你正在SQL SERVER 2005 服务器上一个名为DB1的数据库上进行着工作。你发现由于对DB1中Table1表的扫描导致了查询执行缓慢。已知,Table是一个使用频繁而且非常巨大的表,同时你又确定了查询中包含如下的语句:SELECT col1,col2 FROM table1 WHERE col3 = 。在表保持对所有用户有效的情况下,为了最大化的提高查询性能,你应该怎么做?()A、更新DB1数据库中表Table1的所有统计信息B、在DB1数据库中,使用CREATE STATISTICS 语句为表Table1的列col3创建缺少的统计信息C、设置优先值提升选项的值为1D、执行如下语句:USE DB1 GO CREATE INDEX index1 ON table1(col3) INCLUDE(col1, col2) WITH (ONLINE = ON) GOE、执行如下语句 USE DB1GOCREATE INDEX index1 ON table1(col3, col2,col1)

考题 Your database is 5GB and contain satable named Sales History. Sales informationis frequently inserted and updated. You discover that excessive page splitting is occurring. You need to reduce the occurr enceof page splitting in the Sales History table. Which code segment should you use?()A、ALTER DATABASE Sales  MODIFY FILE(NAME = Sales dat3, SIZE = 10GB)B、ALTER INDEXALL ON Sales.Sales History REBUILD WITH (FILLFACTOR = 60)C、EXEC sys.sp_configure 'fill factor (%)', '60'D、UPDATE STATISTICS Sales.Sales History(Products)  WITH FULLSCAN, NORECOMPUTE

考题 You design a Business Intelligence (BI) solution by using SQL Server 2008. You create a SQL Server 2008 Reporting Services (SSRS) solution. The solution contains a report named Sales Details that displays sales information of all the employees. You create an SSRS report named Sales Summary that displays the total monthly sales of each employee. Users who view the Sales Summary report occasionally require the monthly sales details for a particular employee. You need to ensure that the users can click a value in the month column of the Sales Summary report to open and render the Sales Details report. What should you do?()A、 Use a subreport.B、 Use a bookmark link.C、 Use the drilldown functionality.D、 Use a drillthrough report link.

考题 你要关闭SALES表中UNIT_PRICE列的非NULL约束。下列哪个语句能完成这个操作?()A、alter table sales modify(unit_prices null)B、alter table sales modify(unit_prices not null)C、alter table sales add(unit_prices null)D、alter table sales add(unit_prices not null)

考题 单选题You are responsible for maintaining a SQL Server 2005 database. Business analysts in the company routinely use a view named v CustomerSales to join the Customers and Sales tables in the database. They use the view to aggregate total sales by customer by month. You need to increase the performance of the view. What should you do?()A Update the view to use an outer join between the Customers and Sales tables.B Create a clustered index on the v CustomerSales view.C Create two separate views that do not contain any joinsone view named Customers for the Customers table and another one named v Sales for the Sales table.D Create a stored procedure for the business analysts that uses the v CustomerSales view.

考题 单选题你要关闭SALES表中UNIT_PRICE列的非NULL约束。下列哪个语句能完成这个操作?()A alter table sales modify(unit_prices null)B alter table sales modify(unit_prices not null)C alter table sales add(unit_prices null)D alter table sales add(unit_prices not null)

考题 单选题你正在SQL SERVER 2005 服务器上一个名为DB1的数据库上进行着工作。你发现由于对DB1中Table1表的扫描导致了查询执行缓慢。已知,Table是一个使用频繁而且非常巨大的表,同时你又确定了查询中包含如下的语句:SELECT col1,col2 FROM table1 WHERE col3 = 。在表保持对所有用户有效的情况下,为了最大化的提高查询性能,你应该怎么做?()A 更新DB1数据库中表Table1的所有统计信息B 在DB1数据库中,使用CREATE STATISTICS 语句为表Table1的列col3创建缺少的统计信息C 设置优先值提升选项的值为1D 执行如下语句:USE DB1 GO CREATE INDEX index1 ON table1(col3) INCLUDE(col1, col2) WITH (ONLINE = ON) GOE 执行如下语句 USE DB1GOCREATE INDEX index1 ON table1(col3, col2,col1)

考题 单选题You design a Business Intelligence (BI) solution by using SQL Server 2008. You create a SQL Server 2008 Reporting Services (SSRS) solution. The solution contains a report named Sales Details that displays sales information of all the employees. You create an SSRS report named Sales Summary that displays the total monthly sales of each employee. Users who view the Sales Summary report occasionally require the monthly sales details for a particular employee. You need to ensure that the users can click a value in the month column of the Sales Summary report to open and render the Sales Details report. What should you do?()A  Use a subreport.B  Use a bookmark link.C  Use the drilldown functionality.D  Use a drillthrough report link.

考题 单选题你发现SQL Server 2005数据库中sales表的所有索引的碎片都很严重。现在,你要将sales表全部索引的碎片减到最小,同时却不影响任何用户使用sales表。该怎样做?()A 对包含销售表的磁盘进行碎片整理B 执行以下语句:USE master; GO  DBCC  CLEAN  TABLE (‘DB1’.’sales’);GOC 执行以下语句:USE DB1;GO ALTER INDEX ALL ON sales REORGANIZE WITH LOB_COMPACTION=ON);GOD 执行以下语句:USE DB1;GO ALTER  INDEX  ALL ON sales REBUILD;GO

考题 单选题你正在负责管理公司一个SQL SERVER 2005数据库。公司使用一个连接客户和销售表的视图v_CustomerSales进行例行的业务分析。他们用这个视图按月按客户进行销售数据汇总。为了,提高视图的性能,你应该怎么做?()A 修改视图,在表Customers 和 Sales之间采用外连接(outer join)B 为视图v_CustomerSales新建一个聚集索引C 为Customers表和Sales表分别创建v_Customers和v_Sales视图,在每个视图中不包含任何的连接关系D 用v_CustomerSales 视图创建一个存储过程来进行业务分析

考题 单选题你是一个跨国公司的数据库开发者。公司有一个在SQL Server 2005/2008的在线交易处理的数据库。这个数据库有一个销售表,它里面包含了公司的一些固定的信息。在过去的一年,已经有150,000行数据被加到销售数据库中。数据库使用者说数据库慢慢的变得不太好用了。你为了改变数据库的查询销售表的能力,在SQL的查询分析器中要执行哪个脚本语句?()A EXECsp_updatestats ’resample’B CREATE STATISTICS Sales WITH FULLSCANC Sp_autostats ‘Sales’D UPDATE STATISTICS Sales WITH FULLSCAN ALL

考题 多选题You execute the following command to change the status of the SALES tablespace:SQL ALTER TABLESPACE sales OFFLINE; Which statements describe the effect of the command()AThe tablespace would require recovery to go back online.BA checkpoint is taken on all data files that are associated with the SALES tablespace.CThe sessions that subsequently try to access the objects in the SALES tablespace receive an errorDThe new status of the SALES tablespace is recorded in the control file when the database instance isclosed

考题 多选题You execute the following command to change the status of the SALES tablespace:  SQL ALTER TABLESPACE sales OFFLINE;  Which statements describe the effect of the command()AThe tablespace would require recovery to go back online.BA checkpoint is taken on all data files that are associated with the SALES tablespace.CThe sessions that subsequently try to access the objects in the SALES tablespace receive an error.DThe new status of the SALES tablespace is recorded in the control file when the database instance is closed.

考题 单选题有名为 Sales 的表,现需要按客户姓名(CustomerName)和销售日期(SalesDate)排序返回销售数据。为每个客户提供最近期的销售必须首先列出。应使用的查询语句为()A selectCustomerName,SalesDate from Sales group by CustomerName,SalesDateB select CustomerName,SalesDate from Sales order by CustomerName,SalesDateC select CustomerName,SalesDate from Sales group by CustomerNameorderbySalesDateDESCD select CustomerName,SalesDate from Sales order by CustomerName,SalesDateDESC