![]() |
lin2world_Log.LDF
The file lin2world_Log.LDF (Lin2world transaction file) grows to 30+ GB in size, is there any way to disable/limit this file? because in the SQL i have tried setting a limit, and it automatically raises the limit of the file.
|
this is an sql-transaction log, and you can limit it (db properties -> transaction log-> limit to..) but you can't delete it or shrink. then this file grow up to a limit - it raises many errors in sql (like nonwriteable data). When i meet this problem, i tried to limit this file.. and as result - lin2world became read only.. =(
only way that i see - clearing garbage data and adding more free space... but you can try to delete this file then MSSQL is stopped. make backup before =) |
Code:
Backup log lin2world with truncate_only |
Or
Code:
DBCC SHRINKDATABASE([lin2world],2) |
How do i run these scripts? I'm a n00b with sql :(
|
Here u go :
1.- Stop your SQL Server Service Manager and manually delete the lin2world_log.LDF file 2.- Restart The SQL Server Service Manager, you can see the database in "suspictious mode" or something like that 3.- Open query analyzer 4.- Now we are going to change that "suspictious mode" to emergency mode, use that code: Code: -------------------------------- USE master go sp_configure 'allow updates',1 go reconfigure with override go update sysdatabases set status=-32768 where dbid=DB_ID('Lin2World') go sp_configure 'allow updates',0 go reconfigure with override go ------------------------------------------ 5.- Now we are going to rebuild the transaction log file: Code: ------------------------------------------------- USE master go dbcc rebuild_log('Lin2World',C:\Program Files\Microsoft SQL Server\MSSQL\Data\lin2world_log.ldf') go dbcc checkdb('Lin2World') ---------------------------------------------------- If you have the database files in another directory, just change C:\Program Files\Microsoft SQL Server\MSSQL\Data\lin2world_log.ldf' for yours. 6.- Now your Lin2World database only allows access to DBO, to enable multiple logins use that code: Code: ------------------------------------------------------ alter database Lin2World set multi_user ------------------------------------------------------ |
| All times are GMT. The time now is 15:40. |