Browsed by
Year: 2008

Working with your best friend

Working with your best friend

Yesterday my friend Jonas Bandi had his last working day at the company where I work too.
The conclusion after one year is not so bad as I thought it would be. Well, we had sometimes intensive discussions, but I think that is normal, when you are looking for a good solution.

But what is the real conclusion? Was it really a good year? Was the project on which he and I worked on successful? Should I go too to an other company? When I thought about this questions I found an interesting book:


I think this book can give some answers to my questions.

Get the size of your tables

Get the size of your tables

Recently my boss asked me, why the databases (Microsoft SQL Server 2005) of our customers are so big. With the following SQL-Statements I could give more or less an answer to my boss.

name varchar(255),
rows int,
reserved varchar(255),
data varchar(255),
index_size varchar(255),
unused varchar(255)

EXEC sp_MSforeachtable @command1="INSERT INTO PW_SPACE EXEC sp_spaceused '?'"

select * from PW_SPACE order by rows desc

select sum(rows) as Rows,
convert(varchar(255), sum(convert(int, substring(data,0,len(data)-2)))) + ' KB' as Data,
convert(varchar(255), sum(convert(int, substring(index_size,0,len(index_size)-2)))) + ' KB' as Indexsize