SHRINKFILE DBCC ?????? SHRINKDATABASE ?? ?? ???? ???? ?? ???? sparsely ntext ?? ??? ????? ???

?????? ????????? ?????? ?????????
???? ???????: 324432 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

???????

???? ??? ?????? SHRINKFILE DBCC ?????? SHRINKDATABASE DBCC ?? ??? ?????? ??? ????? ??? ???? ?????? EstimatedPages ????? ???? MinimumSize ???? ??? ????? ??? ?????? ?????. ????? ????????? ????? ???????? ?? ??????? ?? ????? ?????? ???? ????? ???? (BLOB) (?? ?? ntext??????) ? ??? ??????? ?? ???? ???? ?????? ?? ????? ???????? ??????? ???? sparsely ????????(SSP) ???????? (??? ???? ??????? 1 ??? ??????? 8 ???? ??? ????? ????? ???? ??????) ? ??? ???? ??? SHRINKFILE DBCC ????? SHRINKDATABASE DBCC over-estimate ??? EstimatedPages ?? ??? ????? ??????? ?????? ???????. ????? ?? ???? ?? ??????? ??? ???? ??? ?????? ??? ????? ????????? ?????? ???????? ?????? ??? 8 ???? ???? ?? ??????? ????? ????? ???????? ??? ????? SHRINKFILE DBCC ??? ????? ????? ????????.

????

??? ?? ??? ??? ??????? ???????? ?? ??? ?????? ???? ????? ????? ????? ??? ?????? ????? ??????? ??? ?????? ??????? ??? ??? ???????:
  • ??????? ????? SELECT INTO ???? ?????? ?????? ??? ???? ???? ?? ??? ????? ????????. ????? ?????? ?????? ?? ?? ?????? ???? SHRINKFILE DBCC. ????? ????? ?????? ?????? ??? ?????? ??????.
  • ??????? ????? SELECT INTO ???? ?????? ?????? ??? ???? ???? ?? ????? ?????? ??????. ?????? ?????? ?????? ?? ?? ?????? ???? SHRINKFILE DBCC. ??? ???????? ??? ?????? ??????.
  • ??????? ?????? ??? ????? ????? ??? ?????? ?? ????? ??????. ?????? ??? ?????? ? ??????? ?? ?????? ???????. ????? ????? SHRINKFILE DBCC. ????? ???? ???? ?? ?? ???????? ?????? ??? ????? ????? ??? ??? ???????? ??? ??????.
  • ??????? ????? ????? ???????? (DTS) ?? ???? ????? ?????? ??????? ??? ????? ?????? ?????. ????? SQL Server 7.0 ???????? ????? ?? ?? ??? ??? ?? ????? ???????? ???? ?? 64 ???? ???? ???? ????. ?? ????? ??? ??????? ??? ????? SQL Server 2000 ????? ????? ????????. ?????? ??? ??????? ??????? ???? ??? ??? ??????? ????? ?????? ?? "????? ??????? ?? Microsoft:
    257425FIX: ??? ???? DTS ??? ??? ???????? BLOB ???? ?? 64
    ????? ????? ?? ?? ????? ??????? ???? ???? ?? 64 ???? ???? ?? ????????? ??????:
    SELECT MAX (DATALENGTH (TextImageColumn)) FROM TableName
    ??? ???? ???????? ?? ????? ???? ?? 64 ???? ???? ????? ?????? ???????? ??? ?? ??? ?? ??? ???? ??? ?? DTS ????? ?????. ??? ??? ???? ?????? ???? ?? ?????? ???? ?? 64 ???? ???? ?????? ????????? ???????? ?? ?????? ?????? ?????? ??????? ???? ????? ??? ?????? ???? ?? ??????. ??? ???? ?????? DTS ???? ??????? ?? ????? ????????.
??? ??? ??? ?? ???? ????? ???????? ??? ?????? ?? ??? ????? ???????? ????? ???? ???? ?? ???? ??? ???????? ??? ??? ????? ?? ????? ?????? ????? ????? ??????? ????? SHRINKFILE DBCC ?? ?????? EMPTYFILE. ???????? ??? ????? ???? ???? ??????? ???????:
  1. ??? ??? ???? ?????? Microsoft SQL Server 7.0 ?????? ????? ?????? Service Pack 3 ?????? ?????? ?????? 1180 ? 1197.
  2. ??? ??? ?????? Microsoft SQL Server 7.0 ?????? ????? ?????? Service Pack 3 ????? 7.00.987 ?? ??????? ??????, ??? ?? ??? Service Pack 4 ????? ?????? ??? ????? 1180.
  3. ??? ?????? "????? ???????? ??? ?????? ?? ??????? ????? ????? ???? ??????? ?? ????? ??????" ? ????? ????? 1 ?? ???? ?????? ?? ????? ???????? ???????? ????? ALTER ????? ?????? ?? ??? ?????? ?????? ????? ????????? ??????.
    select 'size in MB'=ceiling(sum(ei.pg_alloc)/128.000), sfg.groupname
    from extentinfo ei inner join sysfiles sf on ei.[file_id] = sf.fileid and ei.[file_id] != 1
     inner join sysfilegroups sfg on sf.groupid = sfg.groupid
    group by sfg.groupname
    ??????: ?????? ????????? ?????? ?????? ???? ??? ?????? ?????? ????????? ?? ????? "???? ?? ?????????" ?? ??? ???????. ???????? ??? ???? ??? ????? ?????? ??? ??? ??? filegroup.

  4. ????? ??????? SHRINKFILE DBCC ?? ?????? EMPTYFILE ?????? ?????? ??? ?? ??? ?? sparsely ????? blob ?????? ?????.
  5. ????? ???? ???? ????? SRHINKFILE DBCC ?? ???? ????? ???? ???? ?? ???? ?? ???? ??? ????? extentinfo ?? ????? "???? ?? ?????????" ?? ??? ???????. ?? ?????? "INSERT.. EXEC import_extentinfo "????????? ?????? ???????? ??? ????? ?????. ??????? ????????? ?????? ?????? ???????:
    select [file_id], 'page count'=sum(pg_alloc), 'min page'=min(page_id), 'max page'=max(page_id) from extentinfo group by [file_id]
    ???????? ??? ???? ???? ??????? ????????? ?????? ??????? ???? ??? ????? ????? EXTENTINFO DBCC ??? ??????? ??? ?? ??? ??? ?????? ??? ????? ????? ??? ????? EXTENTINFO DBCC:
    select crdate, [name] from sysobjects where type = 'U' and [name] like 'extent%' order by crdate
  6. ??? ?????? ????????? SHRINKFILE DBCC ????? ALTER ??????? ????? ?????? ????? ??????? ??????? ?? ????? ????????.
  7. ???? ????? ????? ????? ?????? ?? ???? ????? ??????? SHRINKFILE DBCC ?? ?????? TRUNCATEONLY ??? ??????? ??????? ???? ?? ??????? ?? ?????? 3.
  8. ??? ??? ???? ?????? Microsoft SQL Server 7.0 ????? ????? ???????? ?????? ??? ??????? ?? ?????? 1 ?? 2.

??????? ????

????? ????? ????????? SQL ???????? ?????? ?? ??? ???? ??????? ??? "???? ???????" ??? ?? ????? ????? ??????? ???? ???? ????? ??????. ?? ?????? ??????? SQL ???????? "SQL Server ?????? ?? ??? ??? ????? SHRINKDATABASE DBCC ? SHRINKFILE DBCC ????? ????? ????? ??????? ???? sparsely ????? BLOB ?????? ?????.

??????: ????? ??? ?? ??????? '< ??? ????? ???????? >' ??? ??? ????? ?????? ??????? ???????? ????? ????? ??????? ?????? ?????.

use pubs
go
if convert(int,substring(convert(binary(4), @@microsoftversion),1,1)) = 8
begin 
   create table extentinfo 
   (
   [file_id] smallint,
   page_id int,
   pg_alloc int,
   ext_size tinyint,
   obj_id int,
   index_id tinyint,
   pfs_bytes varbinary(10)
   )
end
go
if convert(int,substring(convert(binary(4), @@microsoftversion),1,1)) = 7
begin
   create table extentinfo 
   (
   [file_id] smallint,
   page_id int,
   pg_alloc int,
   ext_size tinyint,
   obj_id int,
   index_id tinyint,
   pfs_bytes varbinary(10),
   avg_used tinyint
   )
end
go
create procedure import_extentinfo as
dbcc extentinfo('<database name>')
go
insert extentinfo exec import_extentinfo
go

select [file_id],obj_id, index_id, ext_size, 'actual extent count'=count(*), 'actual page count'=sum(pg_alloc),
 'possible extent count'=ceiling(sum(pg_alloc)*1.0/ext_size),
 'possible extents / actual extents' = (ceiling(sum(pg_alloc)*1.00/ext_size)*100.00) / count(*)
 from extentinfo where ext_size != 1 and index_id = 255
 group by [file_id],obj_id, index_id, ext_size
 having count(*)-ceiling(sum(pg_alloc)*1.0/ext_size) > 0
 order by obj_id, index_id, [file_id]
??? ??? ??? ?????? ????? ?? ????????? ?????? ???? ????? ??? ??? index_id 255 ? ? ?? ???? / ?????? ??? ?????? ?? ??? ?? 75 ? sparsely "?? ???? ???? ????? ?????? BLOB ????? ???????? ??? ???? ????? ??? ?????? ???????? ??????? ?? ???"????"?? ??? ???????.

??????: ??? ????????? ????? ??? ????? EXTENTINFO DBCC ?????. ?? ?????? ????? EXTENTINFO DBCC ???? ??? ?????? ???? ??????? ?? ??? ????? ?? ??? ??? ????? ?? ????????? ?????????? ?? Microsoft SQL Server.

?????

?????? ??? ??????? ??????? ???? ??? ???? ????????? ????????? ??????? ?? "????? ??????? ?? Microsoft:
272220FIX: TEXT/IMAGE ???????? ????? ????? ??? ??????? ???? ????
308627FIX: SHRINKDATABASE DBCC ?? SHRINKFILE DBCC ???? ????? ????? ???????? ?? ?? ?? ?????? ??????

???????

???? ???????: 324432 - ????? ??? ??????: 07/?? ??????/1426 - ??????: 5.1
????? ???
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 7.0 Standard Edition
????? ??????: 
kbmt kbprb KB324432 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????324432

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

 

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