Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
simondeutsch
Aged Yak Warrior
547 Posts |
Posted - 2002-06-03 : 11:16:06
|
| Hiya,Is there any way to turn logging off temporarily? I'm trying to run lots of inserts (data to be used for testing purposes) of approx. 500,000 rows, and it takes very long. I'm running it out of a Perl script for randomness reasons.Sarah Berger MCSD |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-06-03 : 11:33:11
|
| How bout having your Perl Script output to a file which you can bcp or dts or bulk insert in....To my knowledge an INSERT statment will always be a logged operation.<O> |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2002-06-03 : 11:47:41
|
| FROM BOL:If BULK_LOGGED is specified, protection against media failure is combined with the best performance and least amount of log memory usage for certain large scale or bulk operations. These operations include SELECT INTO, bulk load operations (bcp and BULK INSERT), CREATE INDEX, and text and image operations (WRITETEXT and UPDATETEXT).You need to change your recovery mode to BULK_LOGGED it seems, but like Page47 suggested, you need to do a BCP, or bulk insert.Examples:To see what model your database is using, you can use the new property function DATABASEPROPERTYEX:SELECT databasepropertyex('<database_name>', 'recovery')ALTER DATABASE <database_name> SET RECOVERY [FULL | BULK_LOGGED | SIMPLE]select DATABASEPROPERTYEX('vohcss', 'recovery')ALTER DATABASE vohcss SET RECOVERY SIMPLEselect DATABASEPROPERTYEX('vohcss', 'recovery')Michael |
 |
|
|
|
|
|
|
|