Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 17.08.2005, 06:19   #1
dosmac
Архивный участник
 
Join Date: Jul 2005
Posts: 21
Default 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.
dosmac is offline  
Old 17.08.2005, 06:27   #2
darkagent
Архивный участник
 
Join Date: Aug 2005
Posts: 54
Default

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 =)
darkagent is offline  
Old 17.08.2005, 07:17   #3
hr
Архивный участник
 
Join Date: Jun 2005
Posts: 285
Default

Code:
Backup log lin2world with truncate_only 
Go 

Use lin2world 
DBCC Shrinkfile (lin2world_log, 1) 
Go
Wonderful things around you....
hr is offline  
Old 17.08.2005, 07:35   #4
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Or

Code:
DBCC SHRINKDATABASE([lin2world],2)
BACKUP LOG [lin2world] WITH TRUNCATE_ONLY
DBCC SHRINKDATABASE([lin2world],2)
cycle script
HF is offline  
Old 17.08.2005, 09:27   #5
dosmac
Архивный участник
 
Join Date: Jul 2005
Posts: 21
Default

How do i run these scripts? I'm a n00b with sql
dosmac is offline  
Old 17.08.2005, 09:47   #6
djvogans
Архивный участник
 
Join Date: Apr 2005
Posts: 306
Default

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
------------------------------------------------------
djvogans is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 15:29.