1楼兄弟。。。。。。。。。。to 草原骏马 不是日志文件占用空间的,是数据文件里未用空间大。我用的这个脚本查询的:--查看各个表占用空间的大小if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tablespaceinfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)create table tablespaceinfo --创建结果存储表(nameinfo varchar(50) , rowsinfo int , reserved varchar(20) , datainfo varchar(20) , index_size varchar(20) , unused varchar(20) )delete from tablespaceinfo --清空数据表declare @tablename varchar(255) --表名称declare @cmdsql varchar(500)DECLARE Info_cursor CURSOR FOR select o.name from dbo.sysobjects o where OBJECTPROPERTY(o.id, N'IsTable') = 1 and o.name not like N'#%%' order by o.nameOPEN Info_cursorFETCH NEXT FROM Info_cursor INTO @tablename WHILE @@FETCH_STATUS = 0BEGINif exists (select * from dbo.sysobjects where id = object_id(@tablename) and OBJECTPROPERTY(id, N'IsUserTable') = 1)execute sp_executesql N'insert into tablespaceinfo exec sp_spaceused @tbname',N'@tbname varchar(255)',@tbname = @tablenameFETCH NEXT FROM Info_cursor INTO @tablename ENDCLOSE Info_cursorDEALLOCATE Info_cursorGO--itlearner注:显示数据库信息sp_spaceused @updateusage = 'TRUE' --itlearner注:显示表信息select nameinfo as 表名,rowsinfo as 行数,reserved as 保留空间,datainfo as 数据大小 ,index_size as 索引大小,unused as 未用空间 from tablespaceinfo order by cast(left(ltrim(rtrim(reserved)) , len(ltrim(rtrim(reserved)))-2) as int) desc