精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>电脑技术>>● 认证工程师>>Microsoft 认证>>试题回忆>>70-228>>70-228模拟试题(十八)

主题:70-228模拟试题(十八)
发信人: reynolds(雷龙.DBA中)
整理人: reynolds(2002-03-06 15:54:22), 站内信件
86. You are the administrator of a SQL Server 2000 computer. The server contains a database named Inventory. Users report that several storage locations in the UnitsStored field contain negative numbers. You examine the database's table structure. The table properties are configured as shown below:


Key ID Name    Data Type Size
Y SotrageLocationID    int 4
LocationDescription  varchar 50
PartID    int 4
UnitsStored    bigint 8
DateStored    datetime 8
TagID    int 4

You correct all the negative numbers in the table. You must prevent the database from storing negative numbers. You also want to minimize use of server resources and physical I/O. Which Transact-SQL statement should you execute?

A. ALTER TABLE dbo.StorageLocations ADD CONSTRAINT CK_StorageLocations_UnitsStored CHECK (UnitsStored >= 0)
B. CREATE TRIGGER CK_UnitsStored On StorageLocations
FOR INSERT, UPDATE AS IF INSERTED.UnitsStored < 0 ROLLBACK TRAN
C. CREATE RULE CK_UnitsStored As @Units >= 0
   GO
   sp_bindrule 'CK_UnitsStored' 'StorageLocations.UnitsStored'
   GO
D. CREATE PROC UpdateUnitsStored (@StorageLocationID int, @UnitsStored bigint) AS
IF @UnitsStored < 0
RAISERROR (50099, 17)
ELSE
UPDATE StorageLocations SET UnitsStored = @UnitsStored
WHERE StorageLocationID = @StorageLocationID

Answer: A
Reason: 题目臭长,其实和85题一个意思。



87. You are the administrator of a SQL Server 2000 computer. You have two new hard disks on which you will create a database named Inventory. You want to insert, update, and delete data as quickly as possible. Which two actions should you take? (Each correct answer represents part of the solution. Choose two.)

A. Configure the hard disks as two mirrored NTFS volumes.
B. Configure the hard disks as one mirrored NTFS volume.
C. Configure the hard disks as two independent NTFS volumes.
D. Configure the hard disks as one extended NTFS volume.
E. Place Inventory_data.mdf on the first volume and FInventory_log.ldf on the second volume.
F. Place Inventory_data.mdf and Inventory_log.ldf on the first volume and Inventory_data2.ndf and Inventory_log2.ldf on the second volume
G. Place Inventory_data.mdf and Inventory_log.ldf on the same volume.

Answer: C E
Reason: 2块硬盘是无法形成2个镜像卷的。所以A排除。数据日志分离当然是性能优化的首选,因此B D F G都不符合。



88. You are the administrator of a SQL Server 2000 computer. The server contains a database named Inventory. The database has a Parts table that has a field named InStock. When the parts have shipped, a table named PartsShipped is updated. When the parts are received, a table named PartsReceived is updated. The relationship of these tables is shown below:

See http://www.cheet-sheets.com/228/image14.jpg



You want the database to update the InStock field automatically. What should you do?

A. Add triggers to the PartsShipped and the PartsReceived tables that update the InStock field in the Parts table.
B. Create a user-defined function that calculates current inventory by running aggregate queries on the PartsShipped and PartsReceived tables.
C. Use a view that creates an InStock field as part of an aggregate query.
D. Create stored procedures for modifying the PartsShipped and PartsReceived tables that also modify the InStock field in the Parts table.
Use these procedures exclusively when modifying data in the PartsShipped and PartsReceived tables.

Answer: A
Reason: 连带操作(更新、删除等等)用触发器最合适不过了。


 
89. You are the administrator of a SQL Server 2000 computer. The server is configured as shown below:

See http://www.cheet-sheets.com/228/image15.jpg



You need to create a new database named Inventory. Employees in your company will use the Inventory database to track inventory data. Users will require immediate responses to queries that help them locate where parts are stored. The tables in the database will be configured as shown below:

See http://www.cheet-sheets.com/228/image16.jpg

The database will consume 14 GB of disk space. You must configure the data files and transaction log to accelerate query response time. Which two courses of action should you take? (Each correct answer represents part of the solution. Choose two.)

A. On drive C, create a transaction log.
   On drive D, create a data file in the PRIMARY filegroup.
   On drive E, create a data file in the SECONDARY filegroup.
B. On each drive, create a transaction log.
   On each drive, create a data file in the PRIMARY filegroup.
C. On drive D, create a transaction log.
   On drive E, create a data file in the PRIMARY filegroup.
D. On the PRIMARY filegroup, create all tables and all indexes.
E. On the PRIMARY filegroup, create all tables. On the SECONDARY filegroup, create all indexes.
F. On the PRIMARY filegroup, create the Parts table and its indexes.
   On the SECONDARY filegroup, create all other tables and their indexes.
 
Answer: A E
Reason: 优化的两个方面这里都用上了:数据和日志分离存放、索引单独存放在一个文件组中。



90. You are the administrator of a database that contains 64 lookup tables. These tables store static data that should not change. However, users report that some of this data is being changed. You need to prevent users from modifying the data. You want to minimize changes to your security model and to your database applications. How should you modify the database?

A. Create a filegroup named LOOKUP.
   Move the lookup tables to this filegroup.
   Select the read only check box for the filegroup.
B. Create a database role named DataModifier.
   Grant the SELECT permissions to the DataModifier role.
   Add all users to the role.
C. Deny INSERT, UPDATE and DELETE permissions for all users.
   Create stored procedures that modify data in all tables except lookup tables.
   Require users to modify data through these stored procedures.
D. Create a view of the lookup tables.
   Use the view to allow users access to the lookup tables.
 
Answer: A
Reason: 在这一到题目中没有什么比设置文件只读更让人放心了。


----
         /
    <>< o /| /
   <>< (o / |/|
    ) ) <@ <
   ( O )( \ |\| <><
  ) <>< () \| \
         \

   天在ICQ:6074713           

[关闭][返回]