Nhờ tư vấn - Nguyên nhân và cách khắc phục file MSDBData.mdf dung lượng lớn bất thường | VN-Zoom | Cộng đồng Chia Sẻ Kiến Thức Công Nghệ và Phần Mềm Máy Tính

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add https://vn-z.vn to your ad blocking whitelist or disable your adblocking software.

×

Nhờ tư vấn Nguyên nhân và cách khắc phục file MSDBData.mdf dung lượng lớn bất thường

sugarkim


Junior Moderator
Thành viên BQT
Em cần giúp đở vấn đề file Data file SQL MSDBData.mdf dung lượng rất cao 50Gb Có sếp nào có cách khắc phục để không bị vấn đề trên không ạ.
SQL server 2014:
- Đang chạy Backup tự động ngày 2 lần.
- Có 400 data MDF
Em cảm ơn
 

Attachments

  • Screenshot_5.png
    Screenshot_5.png
    10.7 KB · Lượt xem: 13,387

hr.trung

Rìu Sắt Đôi
Mình search thấy câu hỏi này
 

sugarkim


Junior Moderator
Thành viên BQT
Mình search thấy câu hỏi này
use msdb
--select count(start_time) from sysmaintplan_logdetail with (nolock) where start_time < '2021-01-01'
--sp_maintplan_delete_log @oldest_time='2021-01-01'
--select * from sysmaintplan_logdetail where start_time < '2019-02-01'
--delete sysmaintplan_logdetail where start_time < '2019-02-01'
SELECT
OBJECT_NAME(i.OBJECT_ID) AS TableName,
i.name AS IndexName,
i.index_id AS IndexID,
8 * SUM(a.used_pages) AS 'Indexsize(KB)'
FROM
sys.indexes AS i
JOIN sys.partitions AS p ON p.OBJECT_ID = i.OBJECT_ID AND p.index_id = i.index_id
JOIN sys.allocation_units AS a ON a.container_id = p.partition_id
WHERE
i.is_primary_key = 0 -- fix for size discrepancy
GROUP BY
i.OBJECT_ID,
i.index_id,
i.name
ORDER BY
(8 * SUM(a.used_pages)) desc
select * from sysmaintplan_logdetail where start_time < '2019-09-01'
Nên kiên nhẫn và xoá từ từ từng tháng.
 


Top