????? ????? ???????? ?????? ????????? ?? MSDB ?????? ??????

?????? ????????? ?????? ?????????
???? ???????: 152354 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

???????

??? ?????? ???????? ??? ??????? SQL ?? ??? ????? ????? ????? ???????:
1105 ???: ???????: 17, ?????? 2
?? ???? ????? ????? ?????? ' %. * s '?? ????? ????????' %. * s ' ????
' %. * s ' ???? ?????. ??? ??? ?????? ????? ?? Syslogs ?????
??? ?????????. ????? ?????? ALTER ????? ?????? ?? sp_extendsegment ???
????? ??? ??????.
?????? ????????? SQL ???????? ?? ???? ?????:
  1. ?????? ????? ???????? "?" ??????? ".
  2. ????? ?????? ????? ????????.
  3. ?????????.
  4. ?????? ???????? ?? ???.

?????

????? ???????? MSDB ?????.

???? ??????

?? SQL Server 6.5 ??? ????? ??????? ??????? ??? ????? ???????? MSDB ???????? ?? ???????? ???????? ????? ?????????:

sysbackupdetail: ????? ???? ?? ??????? ????????? ?? ????? ????????? (?????).
sysbackuphistory: ????? ?????? ??? ????? ????? ????????? (?????).
sysrestoredetail: ????? ???? ?? ??????? ????????? ???????? (load).
sysrestorehistory: ????? ?????? ??? ????? ????????? (load).

????? SQL Server ???????? ???? ??? ?????? ????? ????????? ?????????? ??????? ?? ????? ?????? MSDB. ????? ??? ????????? ????? ????? ????? ????????? ??? ??? ?? ????????, ? ?? ????? ?? ????? ?? ??????? ???.

??? "????? ??????" ??????? ??? ??????? ???? ??????? ?????? ?? ??? ??????? ???? ?? ?? ????? ???????? MSDB ?? ??? ?????.

???? ??????? ??????? ?????? ??? ??????? ?? ??? ??????? ?????? ?? ????? ?????? MSDB.
use master
go
sp_configure 'allow', 1
go
reconfigure with override
go
drop proc sp_cleanbackupRestore_log
   go
   create proc sp_cleanbackupRestore_log
   @DeleteBeforeDate datetime
   as
   begin
      Delete from msdb.dbo.sysbackupdetail where backup_id
         in (Select backup_id from msdb.dbo.sysbackuphistory where backup_start <=
   @DeleteBeforeDate)
      Delete from msdb.dbo.sysbackuphistory where backup_start  <=
   @DeleteBeforeDate
      Delete from msdb.dbo.sysrestoredetail where restore_id
         in (Select restore_id from msdb.dbo.sysrestorehistory where backup_start <=
   @DeleteBeforeDate)
      Delete from msdb.dbo.sysrestorehistory where backup_start <=
   @DeleteBeforeDate
   end
go
sp_configure 'allow', 0
go
reconfigure with override
				
?? ?????? ??? ????? ??????? ?????? ?? ?????? ??????. ??? ???? ??????? ??? ???? ??? ???? ????????? ???????? ?? ??????? ???????? ?? ??????? ?????? ???? ???? ??? 2 ?????, 1997 ? ?? ?????? ??????:
exec sp_cleanbackupRestore_log  '1/2/97'
				
??? ??? ???? ?? ????? ????????? ???????? ????? ??????? ????? ????? ??? ???:
declare @DeleteBeforeDate datetime
-- Modify the second parameter as necessary.
-- It is currently set to delete anything older than 60 days.
select  @DeleteBeforeDate = DATEADD(day, -60, getdate())
select  @DeleteBeforeDate

   exec sp_cleanbackupRestore_log  @DeleteBeforeDate

				
??????: ??? ????? 1105 ??? ?????? 'syslogs' ?????? ?????? ??????? ??????? ?? "????? ??????? ?? Microsoft: 110139 - INF: Causes of SQL Transaction Log Filling Up.

???????

???? ???????: 152354 - ????? ??? ??????: 28/???? ?????/1435 - ??????: 4.0
????? ???
  • Microsoft SQL Server 6.5 Standard Edition
????? ??????: 
kbnosurvey kbarchive kbmt kbprb KB152354 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????152354

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com