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 |
daunce
Starting Member
11 Posts |
Posted - 2008-11-07 : 23:07:37
|
Hi,I have a database of 500meg and an ldf of 30gig. The db is using full recovery, and i noticed the transaction log backups stopped 2 months ago.I need to do a transaction log backup to reduce the size of the ldf, but there's not enough space free, and i tried to map a drive to another server, but the mapped drive didn't show up in the backup screen. Do mapped drives work for this?I've read i can truncate the log file, can I do this in the gui?Thanks. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-11-08 : 03:39:54
|
Tara, what will be the best way to avoid such huge expansions of log files in future. Should we use DBCC SHRINKFILE regularly or something else, really effective. |
 |
|
daunce
Starting Member
11 Posts |
Posted - 2008-11-08 : 04:54:32
|
To avoid huge log files, if the database is set to FULL, ensure you do regular transaction log backups. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
itsonlyme4
Posting Yak Master
109 Posts |
Posted - 2008-11-10 : 09:40:19
|
Shrink Transaction log FILE--sp_helpdb to verify log size, FileID and recovery Mode of the logsp_helpdb [database]--If necessary, change recovery mode to SimpleUse [database]alter database [database] set recovery simple--Backup LOG with NO_LOGUse [database]BACKUP LOG [database] WITH NO_LOG--Shrink log fileUse [database]DBCC SHRINKFILE (2)--If necessary, change recovery mode back to FULLUse [database]alter database [database] set recovery FULL--be sure to perform a FULL database backup when completed |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-11-10 : 11:42:48
|
quote: Originally posted by itsonlyme4 Shrink Transaction log FILE--sp_helpdb to verify log size, FileID and recovery Mode of the logsp_helpdb [database]--If necessary, change recovery mode to SimpleUse [database]alter database [database] set recovery simpleYou don't need this--Backup LOG with NO_LOGUse [database]BACKUP LOG [database] WITH NO_LOG--Shrink log fileUse [database]DBCC SHRINKFILE (2)--If necessary, change recovery mode back to FULLUse [database]alter database [database] set recovery FULL--be sure to perform a FULL database backup when completed
|
 |
|
|
|
|
|
|