发信人: reynolds(雷龙.DBA中)
整理人: reynolds(2002-03-05 11:22:47), 站内信件
|
156. You are the administrator of a SQL Server 2000 computer. Each night you need to send a copy of the server's msdb database in an e-mail message to the administrator of another SQL Server computer.
You create a job that contains the following steps:
· Detach the msdb database
· Send the database to the administrator in an e-mail message
· Reattach the msdb database
You test the job, and it fails on the first step. You need to ensure that the msdb database is mailed to the administrator every night. What should you do?
A. Ensure that the SQLServerAgent service is running under a user account that has database owner access to the msdb database
B. Delete the first and last steps in the job
C. Configure the job to back up the msdb database to a temporary file
Send the file to the administrator in an e-mail message
D. Insert a new job step before the first step
Configure the new step to terminate all processes that use the msdb database
Answer: C
Reason: msdb不是可以象用户数据库那样可以随意卸载的。
157. You are the administrator of a SQL Server 2000 computer. The server contains a database named MedicalRecords. Users query the database using the following stored procedure:
CREATE PROC GetManyVisits
(@PatientID INT,
@MadeTable TINYINT OUTPUT)
AS
DECLARE @Visits INT
SET @Visits = (SELECT COUNT(*) FROM Cases
WHERE PatientID = @PatientID)
IF @Visits > 5
BEGIN
SELECT P.PatientName, D.PhysicianName,
V.DateVisited, V.VisitDuration,
INTO ##ClientVisits
FROM Patients P
JOIN Physician D ON P.PhysicianID = D.PhysicianID
JOIN Visits V ON P.PatientID = V.PatientID
WHERE P.PatientID = @PatientID
SET @MadeTable = 1
END
ELSE SET @MadeTable = -1
Users report that queries to the database respond slowly. You use System Monitor to measure the system and discover that SQL Compilations/sec average 50 per minute. You need to modify the server to accelerate query response time. What should you do?
A. Execute sp_recompile on the stored procedure
B. Replace the stored procedure with a user-defined function
C. Convert the stored procedure into two procedures--one procedure to decide if the ##ClientVisits table should be populated and one to populate the ##ClientVisits table
D. Replace the stored procedure with a temporary stored procedure created by the user
Answer: A
Reason:
158. You are the administrator of three SQL Server 2000 computers at Five Lakes Publishing. One server, FLPSQL01, stores order data. You want to be able to use the other two servers, FLPSQL02 and FLPSQL03, to answer queries and run reports. The planned network configuration is shown in the exhibit (exhibit not available).
You want to use the Database Maintenance Plan Wizard to configure log shipping from FLPSQL01 to FLPSQL02 and FLPSQL03. You do not want users to add any new data on FLPSQL02 or FLPSQL03, but they must be able to run queries and reports.
Which two actions should you take?
A. Set the database load state for each destination server to ‘No recovery’ mode.
B. Set the database load state for each destination server to ‘Standby’ mode.
C. Enable the ‘Allow database to assume primary role’ option for both destination servers.
D. Enable the ‘Allow database to assume primary role option for one destination server,’ and then disable this option for the other destination server.
E. Disable the ‘Allow database to assume primary role’ option for both destination servers.
Answer: B C
Reason: 在不恢复模式下,数据是不可恢复的。
159. You are the administrator of a SQL Server 2000 computer. You configure the SQLServerAgent service as shown below:
Service Startup account
q System Account
q This Account: CORP\SQLAgent
Mail Session
Mail Profile
Save copies of the sent items in the Sent folder
Error Log
File Name: E:\Program files\MicrosoftSQLService
You configure several SQL Server Agent jobs to perform maintenance tasks. These jobs delete old database records and copy files from the server to file servers on your network. You discover that none of the jobs will execute. You use SQL Server Enterprise Manager to check the jobs and discover that the SQLServerAgent service will not start. You need to allow the SQL Server Agent service to start and execute the jobs. What should you do?
A. Configure the SQL Server Agent service to start by using the local system account.
B. Grant the SQLAgent domain user account ‘Log on as a service’ rights.
C. Add the SQLAgent domain user account as a Microsoft Windows login account on the server.
D. Configure permissions on the master database to allow full access to the SQLAgent user account.
Answer: B
Reason:
160. You are the administrator of a SQL server 2000 computer. The server contains a database named SalesTransactions. The database handles sales transactions for a network of retail outlets. The primary table is shown below:
Column Name Data Type Length Allow Nulls
SalesTransID int 4 blank
CustomerName varchar 50 checked
CustomerAddress varchar 50 checked
CustomerCity varchar 50 checked
CustomerState char 10 checked
CustomerZip char 10 checked
DateSold datetime 8 checked
PaymentMethod char 10 checked
Item1SKU char 10 checked
Item1Qty int 4 checked
Item2SKU char 10 checked
Item2Qty int 4 checked
Item2Price money 8 checked
Item3SKU char 10 checked
Item3Qty int 4 checked
Item3Price money 8 checked
SalesTax money 8 checked
Users report that when they add new sales, their inserts often time out. You examine the indexes on the table. The indexes are shown below:
Index_name index_description
IX_CustomerName nonclustered located on PRIMARY
IX_CustomerState nonclustered located on PRIMARY
IX_CustomerZip nonclustered located on PRIMARY
IX_PaymentMethod nonclustered located on PRIMARY
PK_SalesTransactions_1 nonclustered, unique, primary on PRIMARY
You want to decrease the time required to store purchases made at the retail outlets. What are two possible ways to achieve this goal?
A. Normalize the data structure of the table.
B. Drop the nonclustered indexes of the table.
C. Drop the primary key.
D. Add nonclustered indexes to the item 1SKU, item2SKU, and item3SKU fields in the table.
E. Re-create the PK_Sales Transactions index as a clustered index.
Answer: A E
Reason: 规则化数据结构属于范式类基础操作,是数据库设计优化的原则。E 的理由前面的索引题目已经说过了,就不再说了。
---- /
<>< o /| /
<>< (o / |/|
) ) <@ <
( O )( \ |\| <><
) <>< () \| \
\
每天在网易游水的鱼 |
|