???? ID: 307487 - ????? ???????: 04 ?????? 2010 - ??????: 2.0 ??? SQL Server ??????? tempdb ?? ???? ???? ?? ??? ???? ????
?? ????? ?????????? ???? ??? ??????? ??? ???? ???? ?? ??? ????? ?? ???? ??? ?? ????? ???? ??tempdb??????? ???????? ???? ????? ???? ?? ???? ???? ?? ??? ??? ???? ???? ???? ??? ?? ???? ?? ???? ????????tempdb??????? ?? ????? ??? SQL ????? ?? ???????? ???? ?? ??? ??????? ????? ???? shrinkstempdb??? ?????? ?? ???, ?? ????? ?? ??? ??? ?????? ????? ?? ???? ??? SQL Server ???????? ????? ????? ?????? ??? ???-??? ??????? ?? ???? ???? ?? ??? ???? ???? ??tempdb. ????? ?? ??????? ?? ???????? ?? ?? ??? ?? ??????? ??? ??tempdb??????? shrink ???????? ?? ????? ??? ???:??? ?? SQL Server 2005 ?? ????? ?? ??? ???, ?? ????? ??????? ??? ?? ???? ??? ?? ??? ??, ?? ????? ???? ????? SQL Server ??????? Studio ?????????? ??????? ?? ?????? ???????? ?? ????? ?? ?? ???????? ???? ?? ???? ??? ??? ???? ?? SQL ????? ??????? ???????? ??? 2005 ???? ?????? tempdb ??????? ?? ??? ???? ?? shrink ???????? ???? ?? ???? '??????? ??? ?????? ?????' ??? ?? sys.master_files DMV pulled ????? ??, ?? ?? ??? ?????? ???? ?? ??? tempdb ??????? ?? ??? ??? shrink ???????? ???? ???? ??? Tempdb ?? ??? ???? ?? ?????? ?? ??? ??? shrink ???????? ???? ?? ??? ??????? ??????? ???????? ??? ????? ??? ?? ????????? ????: ???:SQL Server 2008 is not affected by this problem (GUI showing incorrect size.) Tempdb InformationThetempdbis a temporary workspace. Among other uses, SQL Server uses thetempdbfor:
???????? ??? ??, tempdb ??????? ?? ???????? ???? ?? ??? autogrow ?????????????; ?????, ?? ??????? ?? ???? ?? ????? ??? ??? ???? ???? ?? ??? ?????? ?? ???? ??? SQL ????? ?? ??? ?????? ???????? ???? ?? ??? ???????? ???? ??? ???? ????? ???? tempdb ?? ???? ?? ????? ???? ??? ???????? ???? ??? ???? ??????? FILE ?????? ?? DBCC SHRINKFILE ??? ?? ??? ???? ???????? ??????? ???????? ????? ???? ???? ?? ??? ??? ????? ?????? ???? ??? ?? ???? presents ??? ??????? tempdb ?? ???? ???????? ???? ?? ???? ???? ???? ???? ?? ??? ????? ?? ???? ???? ???? 1 Tempdb ?? ???? ???? ?? ????? ???? SQL ????? ?? ???????????? ???? ?? ???????? ???
Method 2 to Shrink TempdbUse the DBCC SHRINKDATABASE command to shrink thetempdbdatabase as a whole. DBCC SHRINKDATABASE receives the parametertarget_percent, which is the desired percentage of free space left in the database file after the database is shrunk. If you use DBCC SHRINKDATABASE, you may have to restart SQL Server.??????????: If you run DBCC SHRINKDATABASE, no other activity can be occurring with thetempdb???????:. To make sure that other processes cannot usetempdbwhile DBCC SHRINKDATABASE is run, you must start SQL Server in single user mode. For more information refer to theEffects of Execution of DBCC SHRINKDATABASE or DBCCSHRINKFILE While Tempdb Is In Use?? ???? ?? ????
Method 3 to Shrink TempdbUse the command DBCC SHRINKFILE to shrink the individualtempdb???????? DBCC SHRINKFILE provides more flexibility than DBCC SHRINKDATABASE because you can use it on a single database file without affecting other files that belong to the same database. DBCC SHRINKFILE receives thetarget sizeparameter, which is the desired final size for the database file.??????????: You must run DBCC SHRINKFILE command while no other activity occurs in thetempdb???????:. To make sure that other processes cannot usetempdbwhile DBCC SHRINKFILE executes, you must restart SQL Server in the single user mode. For more information about DBCC SHRINKFILE, see theEffects of Execution of DBCC SHRINKDATABASE or DBCCSHRINKFILE While Tempdb Is In Use?? ???? ?? ????
In SQL Server 7.0 a transaction log shrink is a deferred operation and you must issue a log truncation and backup to help the shrink operation in a database. However, by default,tempdbhas thetrunc log on chkpt???? ?????? ??? ????; ?????, ???? ???? ???? ?? ??????? ?? ??? ???? ??? truncation ????? ???? ?? ??? ??????????? ??????? ?? ??? ???? ???? ??????? ?? ???? ???? ?? ??? ????????? ??? SQL Server 7.0 ???, ????? ???? ?????? ????? ???? ?? Microsoft ???????? ??? ?????: 256650
(http://support.microsoft.com/kb/256650/EN-US/
)
INF: SQL Server 7.0 ????????? ??? ?? ???? ???? ?? ??? ???? DBCC SHRINKDATABASE ?? ??? ????? ??? ?? Tempdb DBCCSHRINKFILE ?? ???????? ?? ?????????tempdb????? ??? ?? ???? DBCC SHRINKDATABASE ?? ????? ???? ?? ?????? ???? ??? ?? DBCC SHRINKFILE ????, ?????? ?????? ????????? ????? ?????? ?? ???? ??????? ?? ???? ?? ?? shrink ???????? ???? ?? ???? ??:?????: ????? 2501, ???? 16, ?????? 1, ?????? 1 ??? ???? ?????? '1525580473' ???? ?????? ??? Sysobjects ?? ???? ????? -??- ????? ?????: 8909, ???? 16, ?????? 1, 0 ???? ?????? ?????: ???????? ID 1, 0, ??????????? ID ID % S_PGID ?????? ????? ????? ??? ??? PageId = % S_PGID. ??????SQL ????? ???????? ??????; ????: "DBCC SHRINKFILE"; "DBCC SHRINKDATABASE"???? ???? ???? ??:
???? ?????? ??????????????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??. ?????????? ?? ??????? ????????? ??????? ??:307487
(http://support.microsoft.com/kb/307487/en-us/
)
| ???? ?????? ???? ?????? ??????
????????? ?????? ??????? ???????? ??????
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email

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