1

حجم ال (إل دي إف) أصبح أكبر بكثير من حجم قاعدة البيانات

LDF size has been 145 GB although the data base Backup size is 3 GB, and MDF size is 3 GB

Eldabbas's avatar
9.1k
Eldabbas
asked 2018-06-28 07:34:48 +0200, updated 2018-06-28 10:40:16 +0200
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Try to do the following:
1- Use the Shrink command
2- if the problem still exist, you can empty the log file by the following commands:

use DBNAME
DECLARE @SQLStatement VARCHAR(2000) 
BACKUP LOG [DBNAME]
TO DISK = 'nul:' WITH STATS = 1
DBCC SHRINKFILE(DBNAME_log, 1)
BACKUP LOG [DBNAME]
TO DISK = 'nul:' WITH STATS = 1
DBCC SHRINKFILE(DBNAME_log, 1)
BACKUP LOG [DBNAME]
TO DISK = 'nul:' WITH STATS = 1
DBCC SHRINKFILE(DBNAME_log, 1)
BACKUP LOG [DBNAME]
TO DISK = 'nul:' WITH STATS = 1
DBCC SHRINKFILE(DBNAME_log, 1)


/////////////////Change the Database name by the real one.

Eldabbas's avatar
9.1k
Eldabbas
answered 2018-06-28 07:40:53 +0200
Ahmed Qasid's avatar
5.8k
Ahmed Qasid
updated 2018-06-28 08:04:04 +0200
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer