![]() |
|
|
#1 |
|
Архивный участник
Join Date: Jul 2005
Posts: 21
|
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.
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Aug 2005
Posts: 54
|
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 =) |
|
|
|
|
#3 |
|
Архивный участник
Join Date: Jun 2005
Posts: 285
|
Code:
Backup log lin2world with truncate_only Go Use lin2world DBCC Shrinkfile (lin2world_log, 1) Go |
|
|
|
|
#4 |
|
Архивный участник
Join Date: Aug 2005
Posts: 1,531
|
Or
Code:
DBCC SHRINKDATABASE([lin2world],2) BACKUP LOG [lin2world] WITH TRUNCATE_ONLY DBCC SHRINKDATABASE([lin2world],2) |
|
|
|
|
#5 |
|
Архивный участник
Join Date: Jul 2005
Posts: 21
|
How do i run these scripts? I'm a n00b with sql
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Apr 2005
Posts: 306
|
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 ------------------------------------------------------ |
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|