Thursday, July 26, 2007

HTML Email in outlook 2007

Now that Outlook 2007 uses word as it's rendering engine, following link can be handy when you are designing HTML emails targeting Outlook 2007.

http://www.edialog.com/pdf/ED803_Outlook2007_limitations_external_POV.pdf

Sunday, July 22, 2007

Getting the size of each table in SQL 2000/2005

Declare @SourceDB varchar(50)
SET @SourceDB = 'GSR'
set nocount on
declare @sql varchar(128)
create table #tables(name varchar(128))
select @sql = 'insert #tables select TABLE_NAME from ' + @SourceDB + '.INFORMATION_SCHEMA.TABLES where TABLE_TYPE = ''BASE TABLE'''
exec (@sql)
create table #SpaceUsed (name varchar(128), rows varchar(11), reserved varchar(18), data varchar(18), index_size varchar(18), unused varchar(18))
declare @name varchar(128)
select @name = ''
while exists (select * from #tables where name > @name)
begin
select @name = min(name) from #tables where name > @name
select @sql = 'exec ' + @SourceDB + '..sp_executesql N''insert #SpaceUsed exec sp_spaceused ' + @name + ''''
exec (@sql)
end
select * from #SpaceUsed
drop table #tables
drop table #SpaceUsed