首页 >计算机类 >微软认证 > >You are the administrator of a SQL Server 2000 computer. The server contains confidential information about contracts on which your company has placed bids.

You are the administrator of a SQL Server 2000 computer. The server contains confidential information about contracts on which your company has placed bids.

时间:2019-11-03 06:45浏览次数:

Company policy requires that bid information be removed permanently from the database one year after the bid closes. You need to comply with this policy and minimize server overhead.

What should you do?

A.Create a Data Transformation Services (DTS) package to remove bids that have a closing data older than one year.

B.Create a trigger to delete any bids that have a closing data older than one year. Bind the trigger to the bids table for all INSERT, UPDATE, and DELETE events.

C.Create a stored procedure to delete any bids that have a closing data order than one year. Use SQL server agent to schedule the stored procedure to run every night.

D.Create a view that contains a WHERE clause to exclude bids that have a closing date older than one year.

参考答案

正确答案:C
解析:Explanation:Thisscenariorequiresustoremoveoldinformationonaregularbasis.Firstwecreateastoredprocedurewhichremovesallrowswherethebidinformationdateisolderthanthecurrentdateminusoneyear.Thenweschedulethisproceduretoruneveryday.Wewouldthenbesuretoneverhaveanyrowsolderthanayearinthetable.Note:Storedproceduresalsoimproveperformanceasthestoredprocedureiscachedafteritisrun.ThisresultsinareductionofphysicalI/O.WecanfurtherreduceServeroverheadbyschedulingthestoredproceduretorunduringoff-peakhours.IncorrectAnswers:A:ADataTransformationServices(DTS)packageprovidesasetoftoolsthatallowsustoextract,transform,andconsolidatedatastoredinavarietyofformatsandindifferentlocationsintosingleormultipledestinationssupportedbyDTSconnectivity.Thissolutionisinappropriate,asthedataexistsontheserverandnotinnumerouslocationsandwouldthusbecorrectlyformattedforuseonaninstanceSQLServer2000.B:TriggersareaspecialtypeofstoredprocedurethatexecutesautomaticallywhenanUPDATE,INSERT,orDELETEstatementisrunagainstatableorview.Inthisscenariohowever,thedatestampofthedatainthedatabasemustbecheckedandthedatadeletedoneyearafterthebidhasclosed.Thiscannotbeaccomplishedthroughtheuseofconstraintsortriggers.D:Creatingaviewthatexcludesthebidsthathaveaclosingdateolderthanoneyeardoesnotaddressthecompanypolicythatrequiresthatbidinformationberemovedpermanentlyfromthedatabaseoneyearafterthebidcloses.Thisdatawillstillexistinthebasetables.

    阅读排行