You work as the database administrator at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All client computers run Windows XP Professional. The Domain.com network contains an Oracle 9i database server named Certkiller -DB01 that hosts a database named CK_Data. The CK_Data database consists of five comma-delimited files. Domain.com wants to migrate the CK_Data database to SQL Server 2005. You install a new SQL Server 2005 database server named Certkiller -DB02. You want to create a new database named CK_Data and all the required tables on Certkiller -DB02. You must import the data into the CK_Data database on Certkiller -DB02. You want to accomplish this task as quickly as possible.
What should you do?
A.
Use the bcp command to import the required data.
B.
Use a BULK INSERT statement to import the required data.
C.
Use a SELECT statement with an INTO clause to import the required data.
D.
Use the Data Transformation Services (DTS) to import the required data.
Explanation:
The bcp command and the
BULK INSERT statement can be used to import data from a text file into a SQL Server 2005 database; however, the BULK INSERT statement provides the best performance.
Incorrect Answers:
A: The bcp command can be used to import data from a text file into a SQL Server 2005 database; however, the BULK INSERT statement provides the best performance.
C: The SELECT statement can be used to retrieve data from a SQL Server 2005 database. It cannot be used to retrieve data from a text file.
D: Data Transformation Services (DTS) can be used to import data from a single text file but BULK INSERT statement provides the best performance when data from multiple text files must be imported.
Reference:
Microsoft SQL Server 2005 Books Online (2006), Index: bcp utility [SQL Server], about bcp utility
Microsoft SQL Server 2005 Books Online (2006), Index: BULK INSERT statement Microsoft SQL Server 2005 Books Online (2006), Index: Bulk Insert task