Monday, March 26, 2012

SQL Server table size

Our BI environment is growing at a rapid rate.  I was looking for a script to give me the size of all the tables.  I found a good one here ( http://devio.wordpress.com/2007/10/11/how-much-space-do-my-sql-server-tables-use/).  A copy of the script is posted below.



create table #t
(
  name nvarchar(128),
  rows varchar(50),
  reserved varchar(50),
  data varchar(50),
  index_size varchar(50),
  unused varchar(50)
)

declare @id nvarchar(128)
declare c cursor for
select name from sysobjects where xtype='U'

open c
fetch c into @id

while @@fetch_status = 0 begin

  insert into #t
  exec sp_spaceused @id

  fetch c into @id
end

close c
deallocate c

select * from #t
order by convert(int, substring(data, 1, len(data)-3)) desc

drop table #t

Friday, March 16, 2012

This page is based on a file from the site's definition, and you do not have permission to customize it.

A developer was receiving the error "This page is based on a file from the site's definition, and you do not have permission to customize it. Contact your site collection administrator."  This was on our development site where all of IT was an owner of the site.  The problem was in the site collection administration settings ->  SharePoint Designer Settings.  Made sure all the boxes were checked and the error went away.