Yet another SQL Server DBA…

Just another SQL Server DBA blog

Archive for November, 2011

My presentation at local SQL Server User Group

Posted by Szymon Wójcik on November 24, 2011

I will be preseting at local SQL Server User Group meeting on 13.12.2011. The meeting is in Krakow, on Kijowska 14 (WSZiB building), room 406.
The topic of my presentation will be high availability in SQL Server. I will start with availability concept (based on ITIL), move on to high availability and present how to implement HA solutions using SQL Server. The presentation is going to take about 90 minutes, which will be followed by a short lab (also 90 minutes). Once the slides are ready, I will also make them available on the blog (together with some scripts/examples). Official confirmation will be available on PLSSUG site for Krakow.
We are also planning more advanced session on HA in January, hopefully participants will have an opportunity to test the concepts themselves. This will be confirmed, as the date for January meeting is not yet fixed.

Posted in SQL Server | Leave a Comment »

DBA Quiz – an answer

Posted by Szymon Wójcik on November 16, 2011

I had announced a question at  DBA Quiz held at beyondrelational.com in mid-September, so now it’s about time to provide an answer expected.

First of all, there were two parts of it – a location of data on a disk and a method of obtaining it. The answer has two parts – first find page ID, then find the data inside the page.

In order to get a page ID for data you can use undocumented functions %%physloc%% and sys.fn_PhysLocFormatter:

SELECT sys.fn_PhysLocFormatter (%%physloc%%) AS [Physical RID], * 
FROM TableLocateTest.dbo.t2

Returned Physical RID format is FileID:PageID:Offset – FileID may be used to join to sys.files or sys.sysfiles to get database file name.
Note – if it was SQL Server 2005, DBCC IND could be used.

Then you can use another undocumented DBCC command – DBCC PAGE - to inspect contents of the page identified by ID found above. Remember to enable trace flag 3604 (send trace output to the client) before issuing DBCC PAGE.

DBCC PAGE('TableLocateTest', FileID, PageID, [2 | 3]) 

And that’s it – using those two commands you can retrieve physical location of data on disk.

Posted in SQL Server | Tagged: , , | Leave a Comment »

Catch-up and some things to do

Posted by Szymon Wójcik on November 7, 2011

Well, I haven’t been posting for quite a while. I had some busy time so some catching-up is in order.
First of all, I had a lot of work which will hopefully be reflected – I have designed and implemented a monitoring for replication (based on SQL Server Agent alerts), what may not be the most challenging task, but given the corporate environment around, all approvals and management involved, it grew up to a heroic task at some point. I will definitely share some of my experiences, as much as I hate replication.

Second, the DBA quiz is finished, and it is in order to provide an answer I expected. I guess the question itself was hard, since there were only 6 answers. I’m happy that all of them were correct and consistent up to some details.

I would also like to carry on the index subject since I promised four parts of index theory, posted only one, second and third are still unfinished. I’d like to complete part two this week and part three and four next week.

I have also proposed to my manager two courses on databases for colleagues – one called “Database 101″, second – “Database 301″. Initial idea had a warm reception, I’m looking for some details now. I will check if I can share my materials here, since it’s not even decided if it’s going to be in Polish or English.

And I can boast for a moment – I won a first thing for a long, long time. Kalen Delaney posted a competition on her twitter (@sqlqueen) where Microsoft SQL Server 2008 Internals books were prizes. I managed to forget about it but I got a very nice e-mail yesterday morning which cheered me up for whole week, saying that a book is waiting for me. I can’t wait to get it into my hands, definitely I will read it  once again.

Posted in Uncategorized | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 45 other followers