Archive for the 'SQL Server' Category

SQL Server Analysis Look At’s

End of March, I had a chance to dig a bit deeper into MS SQL Server analysis. The german chapter of PASS (http://www.sqlpass.org) organized one of their “Essentials”, a condensed training day with a specific topic. This one was named “SQL Server Analysis” and was held by Andreas Wolter (MCSM) in Nuremberg. Here comes my “look-at’s” – the usual public scratchpad of what I want to review as follow-up of an event.

  • There are two SQL Server related IO benchmark tools (like ORION that I’m familiar with, by Oracle): SQLIOSIM and SQLIO.
  • Event Tracing for Windos (ETW) is supported for MSSQL since Version 2008, use Windows Performance Recorder for that.
  • Try “perfmon /report”
  • Windows Server 2008R2 and above supports “mountpoints” in addition to drive letters. Nice, finally aligning POSIX?
  • Profiler can load PERFMON data and correlate them (old style / deprecated)
  • SQL Server reports: Disk Usage Report shows, for example, resizing operations. So check your file sizing policy this way.
  • Extended Events (XEvents) take 2µs, Profiler events take 4ms (=> Profiler is factor 2000 slower; source: SQL Server & BI blog)
  • SQL Server index growth is different from Oracle: They have no 90/10 split on the growth end of the leaf list, SQL Server adds empty leaf nodes
  •  Extended Events editor to be found under “Administration” in SQL Server Managament Studio (SSMS)
  • Setting up a Performance Data Warehouse brings historical performance data. Do the following:
    1. Create a Data Collection Set
    2. Create a Performance DWH
    3. Create a data Collector
  • Look at tools:
    1. Event Notifications
    2. SQL Diag (Log/Trace collector)
    3. RML Utilities

So for sure this is not everything – the more you dig into a RDBMS, the more surprises and fields of knowledge-to-learn you will find. Let’s go ahead, next time.

Good luck
Martin Klier

Edit: Version supporting ETW



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.