1/22/14

Kurser

Här nedan hittar du kurser jag håller. Det är länkar till både Informator där jag håller min majoritet av kurser samt till Microsofts egna produktsidor. Jag kommer lägga upp en lista med kursdatum där jag är bokad framöver i det fall du vill gå på kurs. Lite extra kul är det att nämna att första kursen på SQL Server 2014 finns tillgänglig, och att det är en uppgraderingskurs där vi tittar på hela produkten.

MS10977A: Upgrading Your SQL Server Skills to Microsoft SQL Server 2014Official
T618: Informationsbehandling med SQL
MS10774A: Querying Microsoft SQL Server 2012Official
MS10775A: Administrating Microsoft SQL Server 2012 DatabasesOfficial
MS10776A: Developing Microsoft SQL Server 2012 DatabasesOfficial
MS10777A: Implementing a Data Warehouse with Microsoft SQL Server 2012Official
MS10778A: Implementing Data Models and Reports with Microsoft SQL Server 2012Official
MS20465B: Designing Database Solutions for Microsoft SQL Server 2012Official
MS20467B: Designing Business Intelligence Solutions with Microsoft SQL Server 2012Official
MS2778A: Writing Queries Using Microsoft SQL Server Transact-SQLOfficial
MS2784A: Tuning and Optimizing Queries using Microsoft SQL Server 2005/2008R2Official
MS6231B: Maintaining a Microsoft SQL Server 2008 DatabaseOfficial
MS6232B: Implementing a Microsoft SQL Server 2008 DatabaseOfficial
MS6234A: Implementing and Maintaining Microsoft SQL Server 2008 Analysis ServicesOfficial
MS6235A: Implementing and Maintaining Microsoft SQL Server 2008 Integration ServicesOfficial
MS6236A: Implementing and Maintaining Microsoft SQL Server 2008 Reporting ServicesOfficial
MS50399: Designing a Business Intelligence Solution by Using Microsoft SQL Server 2008
MS50400: Designing, Optimizing, and Maintaining a Database Administrative Solution for Microsoft SQL Server 2008
MS50401B: Designing and Optimizing Database Solutions with Microsoft SQL Server 2008Official

SQL Server 2008 SP3 Cumulative Update 15 Released

Read all about it at: http://support.microsoft.com/kb/2923520/en-us

11/26/13

Out of Memory exception, SQL Server 2012 hotfix

I'm back from the MVP Summit 2013 R2, a cool week of SQL nerdness in Bellevue, WA. I've Heard all the juicy, cool stuff about SQL Server now and the future and it really hurts not being able to talk much about it. Being a MVP is surrounded with much NDA and supersecrets that are not available for disclosure yet. I'll promise you all I'll get back on this when time is right.

Anyways, for this post I've chosen to give you readers a link, http://support.microsoft.com/kb/2769594.

It's for a hotfix, fixing something unusual. It fixes a Out of Memory Exception that occurs on SQL Server 2012. What happens is a memory leak by the MEMORYCLERK_SQLLOGPOOL which is used for transaction log activity. If you're running AlwaysOn and have a huge buch of availability databases this could occur in your setup.

Failed allocate pages: FAIL_PAGE_ALLOCATION 8
Error: 701, Severity: 17, State: 107.
There is insufficient system memory in resource pool 'internal' to run this query.
Error: 701, Severity: 17, State: 123.
There is insufficient system memory in resource pool 'PoolName' to run this query.
Error: 701, Severity: 17, State: 107. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
Error: 17312, Severity: 16, State: 1.
SQL Server is terminating a system or background task HADR Task due to errors in starting up the task (setup state 1).
AppDomain 3181 (<appdomain>) is marked for unload due to memory pressure.
AppDomain 3181 (<appdomain>) unloaded.
Error: 9602, Severity: 16, State: 1.
Failed to start a system task with error code 28709, state 19.
Error: 17300, Severity: 16, State: 1.
SQL Server was unable to run a new system task, either because there is insufficient memory or the number of configured sessions exceeds the maximum allowed in the server. Verify that the server has adequate memory. Use sp_configure with option 'user connections' to check the maximum number of user connections allowed. Use sys.dm_exec_sessions to check the current number of sessions, including user processes.
Error: 17312, Severity: 16, State: 1.
SQL Server is terminating a system or background task HADR Task due to errors in starting up the task (setup state 1).
Error: 18054, Severity: 16, State: 1.



7/21/13

Physical forms of a table

I just had this question in my email.

"
Dear dbguru,

How do I find which tables that are heaps and/or clustered?

Best regards,
XXX
"

Well, first of all the XXX person has probably been to TechEd 2013 in Madrid, and maybe seen the keynote day one when they did a great demo of GeoFlow. If you haven't seen it you have the link here, http://channel9.msdn.com/Events/TechEd/Europe/2013/Key01. The most juicy part is appr 1 hour into the keynote when Dandy Wein, @ilikesql, enters the scene and do a demo of GeoFlow. It's about ten to fifteen minutes... Anyway, I wore that jersey with pride all week!

Secondly, XXX, has a real name too. But I have decided to leave the person out of this.

Ok, let's get back on track.

In SQL Server the tables are either one of two basic physical forms; HEAP or CLUSTERED INDEX.
* A heap is a table without a clustered index, i.e. this table stores the rows in any order on data pages. This means that when you insert a row it ends up on any of the available data pages assigned to this table.
* A clustered index on the other hand has a clustered index key, which is one up to sixteen columns, with a width up to 900 bytes, that determines on which data page the inserted rows should end up on. This index clusters the rows on pages. This means that rows that is relating to each other can end up close to each other in the database.

Ok, how do I find out how my database is configured related to this?
Well, you could run the following query!

SELECT
QUOTENAME(s.name) + '.' + QUOTENAME(t.name) AS TABLE_OBJECT,
CASE
WHEN i.type = 0 THEN 'HEAP'
WHEN i.type = 1 AND i.is_primary_key = 1 THEN 'CLUSTERED INDEX (' + i.name + ') AS PRIMARY KEY'
WHEN i.type = 1 AND i.is_primary_key = 0 THEN 'CLUSTERED INDEX (' + i.name + ')'
END AS TABLE_PHYSICAL_FORM
FROM sys.Schemas s
INNER JOIN sys.Tables t ON s.schema_id = t.schema_id
INNER JOIN sys.Indexes i ON t.object_id = i.object_id
WHERE i.index_id < 2
If i.type equals 0 the table is a heap, 1 means a clustered index, 2 means a non clustered index and i.index_id is the sequential id of indexes on a table, 0 is heap, 1 is clustered index, 2 or larger *) is a non clustered index.

*) There are more types of indexes than I cover here. Just larger than 2 is not the whole truth, but it's Close enough in this blog post.

7/16/13

Updates

As from today you all can update your SQL Servers, at least 2008 SP3 and 2012 SP1.

Check these links out:
* SQL Server 2008 SP3 Cumulative Update 12
* SQL Server 2012 SP1 Cumulative Update 5

Enjoy!

A blog, to be continued...

For the last year I've been blogging on and off at my current employers blog and almost forgot about this blog. I have a lot of old blogposts from previous and old blogs I'm going to inject into this blog in a close future. Or at least having the ambition to...

Changes are about to happen, close to a month ago I decided to move on  as I got an offer from Claremont AB and to be their database guru from somewhere in the time frame of "late september/early october" this year. My future role will be database guru/trainer/mentor/speaker, and I'll continue on doing consultancy on Microsoft SQL Server.

So guys, see this post as a new start of this blog, this is where I'll continue to post stuff about SQL Server, databases, BI, and whatever that comes in mind.

5/25/12

Conferences to look for Autumn 2012

There are some nice SQL conferences upcoming:
SQLTuneIn 2012 in Zagreb, Croatia, 24-25 of September
http://www.sqltunein2012.com/

PASS SQLRally Nordic 2012 in Copenhagen, Denmark, 1-3 of October
http://www.sqlpass.org/sqlrally/2012/nordic/

And then it's:
Microsoft TechEd EMEA in Amsterdam, Netherlands, 26-29 of June
http://europe.msteched.com/

MCT Summit Europe in Warsaw, Poland, 6-8 of September
http://www.mctsummit.eu/

SEF 2012 in Stockholm, Sweden, 22-23 of October
http://www.seforum.se

And don't miss
Microsoft Sommarkollo 2012, Sweden, Summer of 2012
http://www.microsoft.com/sv-se/sommarkollo/default.aspx

I'll probably be on most of these as a speaker or other official role, if you're plan to visit one or more of these conferences. Check out this blog to see if I'm there aswell.