欢迎您访问365答案网,请分享给你的朋友!
生活常识 专题栏目

You are the administrator of two SQL Server 2000 computers. One of these servers contains

时间:2017-07-26

You are the administrator of two SQL Server 2000 computers. One of these servers contains a 4-GB database named marketing. You want to remove the marketing database from one server and add it to the other as quickly as possible.

 

What should you do?

 

A.Detach the database from the original server by using the sp_detach_db stored procedure. Copy the database and the transaction log files to the new server, and attach them by using the sp_attach_db stored procedure.

 

B.Use the DTS export wizard to transfer all database objects from the original server to the new server. Drop the database from the original server.

 

C.Run a full backup of the database on the original server. Create a new database named marketing on the new server. Restore the backup in the new marketing database. Drop the database from the original server.

 

D.Shut down the original server. Copy the database and the transaction log files to the new server. Use the DISK INIT and DISK REFIT statements to attach the data file to the new server. Drop the database from the original server.

 

 

 

答案说明:本题目答案来自网络整理或转载,最终答案请以官网为准。


答 案:A
解析:Explanation:Detachingandattachingdatabasesissometimesausefultechniqueforquicklymovingadatabasefromonecomputertoanother.Tomoveadatabase,ordatabasefile,toanotherserverordiskthedatabasemustfirstbedetachedfromtheoriginalserverordisk;movedtotheotherserverordiskandthenattachedontheserverordisk.Inadditionthenewlocationofthemovedfile(s)mustbespecified.Thesp_detach_dbstoredprocedureisusedtodetachthedatabaseandcanrunUPDATESTATISTICSonalltablesbeforedetachingthedatabasewhilethesp_attach_dbstoredprocedureisusedtoattachthedatabaseinitsnewlocation.IncorrectAnswers:B:DTScanimportdatafromatextfileorfromanOLEDBdatasourcesuchasaMicrosoftAccess2000databaseintoSQLServer.ItcanalsoexportdatafromSQLServertoanOLEDBdatadestination.Itprovidesforhigh-speeddataloadingfromtextfilesintoSQLServertables.However,itisnotthefastestwaytomoveawholedatabasefromoneservertoanother.C:Beforeadatabasecanberestoredfromabackuptoanewlocation;thedatabasemustfirstberecreatedinthedestinationasthebackupholdsonlythedatafilesthatbelonginthevarioustables.Itdoesnotholdthetabledefinitions.Thisisnotthefastestmethodtomoveadatabase.D:TheDISKINITandDISKREFITcommandscannotbeusedtomoveadatabasefromoneservertoanother.Note:DISKINITandDISKREINITarefeaturesthatareusedinaSQLServer6.x.inSQLServer6.x,DISKINITisusedtocreatedatabaseortransactionlogdevicestostorethespecifieddatabaseortransactionlogwhenDISKINITfollowedeitheraCREATEDATABASEorALTERDATABASEstatementwhileDISKREINITisusedtorestoredeviceentriestoappropriatesystemtableswhenthedeviceentrywasmissingfromsysdevices.InSQLServer2000theCREATEDATABASEandALTERDATABASEstatementsallowforthecreationofseparatedataandlogfiles.BothCREATEDATABASEandALTERDATABASEcreateoperatingsystemfilesanddatabasesinasinglestep.ItisthusrecommendedthatallreferencestoDISKINITshouldberemovedinSQLServer2000andreplacedwithreferencestoeitherCREATEDATABASEorALTERDATABASE.

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。