You are transferring records from one database to another. Y

题目
单选题
You are transferring records from one database to another. You need to decide whether you can use the SqlBulkCopy class to transfer the records. What should you do? ()
A

Ensure that the source database is Microsoft SQL Server.

B

Ensure that the destination database is Microsoft SQL Server.

C

Ensure that the column names in the source table match the column names in the destination table.

D

Ensure that the bulk copy program (bcp) utility is installed on the destination server.

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are the database administrator for a retail company. The company owns 270 stores. Every month, each store submits approximately 2,000 sales records, which are loaded into a SQL Server 2000 database at the corporate headquarters.

A Data Transformation Services (DTS) package transforms the sales records, as they are loaded. The package writes the transformed sales records to the Sales table, which has a column for integer primary key values. The IDENTITY property automatically assigns a key value to each transformed sales record.

After loading this month's sales data, you discover that a portion of the data contains errors. You stop loading data, identify the problem records, and delete those records from the database.

You want to reuse the key values that were assigned to the records that you deleted. You want to assign the deleted key values to the next sales records you load. You also want to disrupt users' work as little as possible.

What should you do?

A.Export all records from the Sales table to a temporary table. Truncate the Sales table, and then reload the records from the temporary table.

B.Export all records from the Sales table to a text file. Drop the Sales table, and then reload the records from the text file.

C.Use the DBCC CHECKIDENT statement to reseed the Sales table's IDENTITY property.

D.Set the Sales table's IDENTITY_INSERT property to ON. Add new sales records that have the desired key values.


正确答案:C
解析:Explanation: DBCC CHECKIDENT is used to check the current identity value for the specified table. It can be set to correct the identity value by specifying the RESEED option with DBCC CHECKIDENT.

Note: Example:
Assume that we have a table called test with an identity column with seed (1,1) and 1000 rows and that we delete row 901 to 950. We could then issue the command
DBCC CHECKIDENT (test, reseed, 900)

And load the 50 missing rows. These rows would get the values 901, 902, …,950 in the identity column.
We should then set the identity value to 1000 again:
DBCC CHECKIDENT (test, reseed, 1000)

So that the next new row will have identity 1001.

Incorrect Answers:
A: Exporting the data from the Sales table and then reloading the data will not correct errors contained in the table as these errors will also be exported as they are part of the data already in the table.
B: Exporting the data from the Sales table and then reloading the data will not correct errors contained in the table as these errors will also be exported as they are part of the data already in the table.

D: The SET IDENTITY_INSERT command allows explicit values to be inserted into the identity column of a table. To reuse the old key values from the rows that was deleted would require manual commands and would be awkward. This is not the best solution.

第2题:

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.

第3题:

One of the properties of light is () traveling in wave form. as it goes from one place to another.

A.it

B.it’s

C.its

D.their


参考答案:C

第4题:

You are planning to import customer data from the Customer table and the Country table in your SQL Server 2000 database into a SQL Server 2005 database. You want to ensure that during the import process,each value in the CountryCode column of the Customer table has a corresponding record in the CountryCode column in the Country table of the SQL Server 2005 database. You define a foreign key between these two tables. Thus,referential integrity will guarantee that the import routine fails if there are any records where a CountryCode value does not exist in the Country table but does exist in the Customer table. You need to ensure that the import process does not fail if records are encountered that do not exist in the Country table. What should you do?()

  • A、Drop the foreign key. Import the data by using the script. Re-create the foreign key.
  • B、Create a CHECK constraint.
  • C、Create a DML INSTEAD OF trigger that writes the failed records to a file or table.
  • D、Create a DML AFTER trigger that writes the failed records to a file or table.

正确答案:C

第5题:

At database startup, you discover that one of the disks containing an index tablespace has been lost due to a media failure. A backup of the lost index tablespace is not available. You have all the necessary scripts to recreate the indexes. You need to re-create the indexes in a new index tablespace. Which action must you perform before re-creating the indexes?()

  • A、 Start the database in OPEN mode, and create a new index tablespace.
  • B、 Start the database in OPEN mode, and drop the lost index tablespace from the database.
  • C、Start the database in MOUNT mode, create a new index tablespace, and drop the lost index tablespace from the database.
  • D、 Start the database in MOUNT mode, drop the lost index tablespace from the database, open the database, and create a new index tablespace.

正确答案:D

第6题:

The supply chain is the flow of () and services from one business to another.

A、money

B、intermediate goods

C、EC

D、TPN


正确答案:B

第7题:

Let’s have a run through.This sentence means let’s run from one side to another.


正确答案:错误

第8题:

Importing and exporting is transferring goods from one country to another while _______ attention to the laws and requirements of bringing goods out or into that country.

A、to pay

B、paying

C、being paid


参考答案:B

第9题:

Redo log files are multiplexed in your database. The disk in which you have one of the redo log members is highly fragmented. In the process of defragmentation you lose the redo log member, which is not a member of the current group. How would you recover from the loss of the redo log member?()

  • A、SMON would automatically restore the lost file.
  • B、You would need to restore the whole database from the last backup.
  • C、You would need to restore the file from the last full database backup.
  • D、You would need to use flashback technology to restore the lost redo log member.
  • E、You would need to use Recovery Manager (RMAN) to restore the lost redo log member.
  • F、You would need to restore the missing log file by copying one of the remaining files from the same group.

正确答案:F

第10题:

You have a single Active Directory domain. AlI domain controllers run Windows Server 2008 and are configured as DNS servers. The domain contains one Active Directory-integrated DNS zone. You need to ensure that outdated DNS records are automatically removed from the DNS zone. What should you do()

  • A、From the properties of the zone, enable scavenging.
  • B、From the properties of the zone, disable dynamic updates.
  • C、From the properties of the zone, modify the TTL of the SOA record.
  • D、From the command prompt, run ipconfig /flushdns.

正确答案:A

更多相关问题