Archive for the 'SQL Server' Category

Microsoft SQL server fragmentation and reorganization

Oh really, there ARE guys with deep insight into Microsoft SQL server. This notes absolutely look like a willing professional who did learn something new: http://blogs.technet.com/b/josebda/archive/2009/03/20/sql-server-2008-fragmentation.aspx

But what about me? I am still looking for a course or material giving me the SQL Server architecture and logic in a way I can understand. At least one resource that looks promising in this sense: http://www.akadia.com/services/sqlsrv_data_structure.html

Sad feeling: SQL Server seems to be much, much more an oracle than Oracle is to me.

Struggeling on ;)
Martin

 



How to find out the (biggest) table size in MS SQL Server?

How to find out the (biggest) table size in MS SQL Server? To find the answer in your preferred search engine is difficult – not because there are no hits, but there is that lot of crap to see, it’s just unbelievable. If you don’t want to enjoy this experience, maybe have a look into this page: http://blogs.technet.com/b/mdegre/archive/2009/10/14/determining-sql-server-table-size.aspx

The author, Michel Degremont, did a good job, but his post is ranked way too badly for the quality provided. Give credit where credit is due!

Standing on the shoulders of giants,
Yours, Martin
Read more…



CREATE TABLE AS SELECT (CTAS) in MS SQL Server

In Oracle often we are using

CREATE TABLE TABLE_B AS SELECT * FROM TABLE_A;

But in SQL Server, this syntax does not work. Use

SELECT * INTO TABLE_B FROM TABLE_A;
COMMIT;

instead.

Hope this helps
Martin



Glancing into MS SQL Server

I have not been able to blog for a while. My family has grown, and so there have been different priorities.

In the meantime, I was told to become responsible for a few MS SQL Server databases as well. I took it for a challenge, and started digging into a different world. Well, sometimes different, sometimes similar.

One of the first questions I will have to answer for myself is the penalty for using snapshot read consistency – you know, avoiding read locks in the Microsoft way: Copy the block into tempdb, maybe anybody will need it. As an IO- and performance junkie, my backside notices pain in advance. We will see.

Take care
Martin Klier




You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.