发信人: reynolds(雷龙.DBA中)
整理人: reynolds(2002-02-21 11:25:28), 站内信件
|
46. You are the administrator of a SQL Server 2000 computer. The server contains a database named sales. Users report that they cannot add new data to the database. You examine the properties of the database. The database is configured as shown in the sales properties exhibit (exhibit not available). You examine drive E. The hard disk is configured as shown in the local disk properties exhibit (exhibit not available). You want the users to be able to add data, and you want to minimize administrative overhead. What should you do?
A. Increase the maximum file size of Sales_Data to 1,500MB.
B. Use the DBCC SHRINKDATABASE statement.
C. Set automatic file growth to 10 percent.
D. Create another data file named Sales_Data2 in a new SECONDARY filegroup.
Answer: A
Reason: 没有Exhibit什么都不用说了。
47. You are the administrator of a SQL server 2000 computer that contains a database named Acct. the database contains 1.5 GB of data. The server has one 9-GB hard disk that is configured as shown in the exhibit (exhibit not available). You need to import data into the database without adversely affecting database performance. The data will require an additional 2GB of storage space. What should you do?
A. Add another data file on drive E, and then add the file to the PRIMARY filegroup.
B. Move the transaction log file to drive E, and set the file growth of Acc_Data.mdf by selecting the ‘Unrestricted file growth’ option.
C. Rebuild all clustered indexes so that they have a fill factor of 100.
D. Compress drive D.
Answer: B
Reason: 没有Exhibit什么都不用说了。
48. You are the administrator of an SQL server 2000 computer. The server contains a database named MedicalRecords. Users access medical records by using the PatientID field. This field is the clustered primary key for the Patients table. When users try to access medical records, the database responds slowly. You examine the database options as shown in the exhibit (exhibit not available). You want to accelerate query response time and minimize administrative overhead. How should you reconfigure the database?
A. Create a SQL Server agent job to execute the UPDATE STATISTICS statement, and schedule the job to run weekly.
B. Select the ‘Auto update statistics’ check box.
C. Run the Database Maintenance Plan Wizard, and accept the default settings.
D. Rebuild the primary key as a non-clustered primary key.
E. Clear the ‘Auto create statistics’ check box.
Answer: B
Reason: 需要更新索引统计。
======================================================================
持续时间意外地长的查询和更新可能由下列原因引起:
网络通讯速度慢。
服务器计算机的内存不足或 Microsoft® SQL Server™ 2000 可用的内存不足。
缺少有用的统计数据。
统计数据过期。
缺少有用的索引。
缺少有用的数据条带化。
查询统计信息是否为最新?统计信息是否自动更新?
SQL Server 自动在索引列上创建并更新查询统计(只要没有禁用自动查询统计更新特性)。另外,可以使用 SQL 查询分析器或 UPDATE STATISTICS 语句在非索引列上手工更新统计;或者如果 auto update statistics 数据库选项设置为 true,则自动在非索引列上更新统计。最新的统计不取决于日期或时间数据。如果尚未进行 UPDATE 操作,则查询统计信息仍是最新的。
======================================================================
49. You are the administrator of a SQL Server 2000 computer. The server contains a database named Sales. Your company uses the database to store the sales department’s responses to requests for price quotations.
Developers in your company create an application used for saving quotations. The application executes the following transact-SQL statement:
UPDATE QuotationSummary SET CustomerName=‘Jean-Paul Deloria’WHERE QuotationID = 12
When the application executes the statement, the developers receives the following error:
Server: Mrh4402, Level 16, Stats 1, Line 1
View or function ‘Quotation/Summary’ is not updateable because it contains aggregates:
You want developers to be able to use this UPDATE statement without generating errors. What should you do?
A. Create an INSTEAD OF trigger on the view to update the composite tables.
B. Grant the developers UPDATE permissions on each base table.
C. Add a cascading update trigger on each base table.
D. Create a QuotationSummary table and populate the table with data from the base tables.
Answer: A
Reason:
======================================================================
INSTEAD OF 触发器替代触发语句的标准操作(INSERT、UPDATE 或 DELETE)。例如,可以定义 INSTEAD OF 触发器在一列或多列上执行错误或值的检查,然后在插入记录之前执行其它操作 例如,当工资表中小时工资列的更新值超过指定值时,可以定义触发器或者产生错误信息并回滚该事务,或者在审核日志中插入新记录(在工资表中插入该记录之前)。有关更多信息,请参见设计 INSTEAD OF 触发器。
可以在表或视图上定义 INSTEAD OF 触发器;然而,INSTEAD OF 触发器对扩展视图能支持的更新类型最有用。例如,INSTEAD OF 触发器能够提供逻辑以通过视图修改多个基表,或者修改包含以下列的基表:
>timestamp 数据类型
>计算列
>标识列
======================================================================
50. You are the administrator of a SQL Server 2000 computer. The server contains a database that is heavily indexed and that company users query extensively. The database has grown and query response time has slowed. The database is stored in a single data file. You want to accelerate query response time. What should you do?
A. On a new hard disk, create a new filegroup.
Drop the existing nonclustered indexes, and then re-create them on the new filegroup.
B. On a new hard disk, add a new file to the PRIMARY filegroup.
Drop the existing nonclustered indexes, and then re-create them on the PRIMARY filegroup.
C. On the existing hard disk, create a new filegroup.
Drop the existing nonclustered indexes, and then re-create them on the new filegroup.
D. On the existing hard disk, add a new file to the primary filegroup.
Drop the existing nonclustered indexes, and then re-create them on the PRIMARY filegroup.
Answer: A
Reason: 和41题理由一样,添加一个物理磁盘是解决问题的关键。
---- /
<>< o /| /
<>< (o / |/|
) ) <@ <
( O )( \ |\| <><
) <>< () \| \
\
每天在网易游水的鱼 |
|