detox1978
asked on
SQL 2000: Shrink LDF file
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The recovery mode is set to FULL
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sure you can if no business rule is asking for FULL recovery mode where you can take T-log backups beside FULL backup for faster recovery.
In SQL 2000, you don't even technically need to go to SIMPLE mode.
Just shrink the log (first), using the "BACKUP" command, then take a full backup immediately (or as soon as you reasonably can).
BACKUP LOG baandb WITH TRUNCATE_ONLY;
BACKUP DATABASE baandb TO DISK = '...' WITH ...;
Just shrink the log (first), using the "BACKUP" command, then take a full backup immediately (or as soon as you reasonably can).
BACKUP LOG baandb WITH TRUNCATE_ONLY;
BACKUP DATABASE baandb TO DISK = '...' WITH ...;
ASKER
Hi Scott,
So do I run
then take a backup? It's a virtual server, would a virtual snapshot be ok?
So do I run
BACKUP LOG baandb WITH TRUNCATE_ONLY;
then take a backup? It's a virtual server, would a virtual snapshot be ok?
Yes, shrink the log, then take a full backup. I'm not sure what specifically a virtual snapshot means on your server. But however you normally take a full backup of your dbs.
ASKER
Running the following reduced the size.
[code]USE baandb
GO
CHECKPOINT
GO
DBCC SHRINKFILE (N'baandblog' , 0, TRUNCATEONLY)
GO[/code]
Many thanks
[code]USE baandb
GO
CHECKPOINT
GO
DBCC SHRINKFILE (N'baandblog' , 0, TRUNCATEONLY)
GO[/code]
Many thanks
ASKER
Hi All,
Sorry to be a pain. But the server is running low on space again. So I run the code below in query analyser on the server
..and get the following...
Any ideas what I've done wrong / differently?
I've opened a new question for it here
Many thanks
D
Sorry to be a pain. But the server is running low on space again. So I run the code below in query analyser on the server
USE baandb
GO
CHECKPOINT
GO
DBCC SHRINKFILE ('baandblog' , 0, TRUNCATEONLY)
GO
..and get the following...
Any ideas what I've done wrong / differently?
I've opened a new question for it here
Many thanks
D
ASKER
Can I switch to simple (to reduce the size) then switch it back on (ideally with circular logging at 40GB)?