April 26, 2004 at 1:55 am
Hi
Could any one tell me how to shut of the transaction log while doing a large batch load??
The log file fill up really fast and we don't need to use it during are large batch load, but how do we turn it off during this time???
Please help
Regards Mattias
April 26, 2004 at 2:46 am
alter database db_name set recovery sample
April 26, 2004 at 4:50 am
Hi
Could you explain a little more, please!!
April 26, 2004 at 5:13 am
this was ripped from BOL
With the Simple Recovery model, the database can be recovered to the point of the last backup. However, you cannot restore the database to the point of failure or to a specific point in time. To do that, choose either the Full Recovery or Bulk-Logged Recovery model.
The backup strategy for simple recovery consists of:
Note This model is similar to setting the trunc. log on chkpt. database option in Microsoft® SQL Server™ version 7.0 or earlier.
To recover in the event of media failure
Changes since the last database or differential backup are lost.
cheers
dbgeezer
April 26, 2004 at 5:17 am
Actually - a better rip from BOL is :
Microsoft® SQL Server™ provides three recovery models to:
These models each address different needs for performance, disk and tape space, and protection against data loss. For example, when you choose a recovery model, you must consider the tradeoffs between the following business requirements:
Depending on what operations you are performing, more than one model may be appropriate. After you have chosen a recovery model or models, plan the required backup and recovery procedures.
This table provides an overview of the benefits and implications of the three recovery models.
Recovery model | Benefits | Work loss exposure | Recover to point in time? |
---|---|---|---|
Simple | Permits high-performance bulk copy operations. Reclaims log space to keep space requirements small. | Changes since the most recent database or differential backup must be redone. | Can recover to the end of any backup. Then changes must be redone. |
Full | No work is lost due to a lost or damaged data file. Can recover to an arbitrary point in time (for example, prior to application or user error). | Normally none. If the log is damaged, changes since the most recent log backup must be redone. | Can recover to any point in time. |
Bulk-Logged | Permits high-performance bulk copy operations. Minimal log space is used by bulk operations. | If the log is damaged, or bulk operations occurred since the most recent log backup, changes since that last backup must be redone. Otherwise, no work is lost. | Can recover to the end of any backup. Then changes must be redone. |
When a database is created, it has the same recovery model as the model database. To alter the default recovery model, use ALTER DATABASE to change the recovery model of the model database. You set the recovery model with the RECOVERY clause of the ALTER DATABASE statement. For more information, see ALTER DATABASE.
Simple Recovery requires the least administration. In the Simple Recovery model, data is recoverable only to the most recent full database or differential backup. Transaction log backups are not used, and minimal transaction log space is used. After the log space is no longer needed for recovery from server failure, it is reused.
The Simple Recovery model is easier to manage than the Full or Bulk-Logged models, but at the expense of higher data loss exposure if a data file is damaged.
Important Simple Recovery is not an appropriate choice for production systems where loss of recent changes is unacceptable.
When using Simple Recovery, the backup interval should be long enough to keep the backup overhead from affecting production work, yet short enough to prevent the loss of significant amounts of data.
For more information, see Simple Recovery.
Full Recovery and Bulk-Logged Recovery models provide the greatest protection for data. These models rely on the transaction log to provide full recoverability and to prevent work loss in the broadest range of failure scenarios.
The Full Recovery model provides the most flexibility for recovering databases to an earlier point in time. For more information, see Full Recovery.
The Bulk-Logged model provides higher performance and lower log space consumption for certain large-scale operations (for example, create index or bulk copy). It does this at the expense of some flexibility of point-in-time recovery. For more information, see Bulk-Logged Recovery.
Because many databases undergo periods of bulk loading or index creation, you may want to switch between Bulk-Logged and Full Recovery models. For more information, see Switching Recovery Models.
cheers
dbgeezer
April 26, 2004 at 7:07 am
Thank you Steve....
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply