|
Home > Archive > SQL server exams > October 2002 > Coco's Question of the Week #10
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Coco's Question of the Week #10
|
|
| cocolocopolo 2002-09-30, 12:53 am |
| RE: Bulk Copy
You are about to bulk load a BCP export file into your database. You want the data to be loaded as quickly as possible. Which of the following must be met to ensure that your BCP load is as fast as possible?
a. Enable Select into/Bulk copy
b. The table cannot have an index.
c. The table can be replicated.
d. The filegroup of the database cannot have more than one file.
[a] is correct. This option must be enabled on your database to allow fast data load. If you want all of your databases to have this option enabled when they are created, 'enable this option on your model database'.
How can we 'enable this option on model database'??? | |
| 2lazybutsmart 2002-09-30, 2:29 am |
| the 'sp_dboption' stored procedure is used to change db options. not only for the model db, but for all other databases in your sql server. i think there is a way to do it through the enterprise manager. but, since i'm not a frequent user of it, i can't give u info for that.
anywayz, sp_dboption takes 3 parameters.
i.e. dbname (database name), optname (option name), and optvalue (true/false or on/off with a default of NULL)
once we're through with that, what remains is the 'select into/bulk copy' option. you would write TSQL code as follows:
-----------------------------------
EXEC sp_dboption 'model', 'select into/bulkcopy', TRUE
-----------------------------------
if you specify the sp_dboption with the option parameter only (and ommit the option value parameter), sql sever will return the current settings for the option. for example:
EXEC sp_dboption 'model', 'select into/bulkcopy'
would return the current settings for the 'select into/bulkcopy' option for the model database.
cheeers,
2lazybutsmart | |
| cocolocopolo 2002-10-02, 1:44 am |
| Thanks dear 2lazybutsmart
You are my walking-dictionary. |
|
|
|
|