sysobjects 에 있는 항목들 중에서 사용자 테이블 인것만 가져와서
sp_spaceused를 이용하면 되겠네요.
sp_spaceused를 이용하면 되겠네요.
set nocount on
declare size_cursor cursor
for
select name from sysobjects where xtype = 'U'
declare @tblname varchar(30)
open size_cursor
fetch next from size_cursor into @tblname
while (@@fetch_status=0)
begin
EXEC sp_spaceused @tblname
fetch next from size_cursor into @tblname
end
close size_cursor
deallocate size_cursor
go
declare size_cursor cursor
for
select name from sysobjects where xtype = 'U'
declare @tblname varchar(30)
open size_cursor
fetch next from size_cursor into @tblname
while (@@fetch_status=0)
begin
EXEC sp_spaceused @tblname
fetch next from size_cursor into @tblname
end
close size_cursor
deallocate size_cursor
go

댓글목록
등록된 댓글이 없습니다.