Archive

Archive for September, 2009

What’s your personality type?

September 30, 2009 Leave a comment

Knowing your own strengths and weaknesses can really help in both work and private live, especially if you also know the personality type of the other people your dealing with. Certain personalities can clash if they don’t recognize and respect each others perspective. On the other hand, having different types of people in a group can create the balance that is needed for a project to be successful. Knowing your personality type can also help you explain your work preferences to your current or future employer or team members.

I have done a MBTI assessment and the result was that I am a ISTJ type. Since MBTI is an internationaly recognized methology, there are lots of websites with information. They can tell you your strengths, weakness, work place preferences, your role in relations, personal growth strategies, career options, etc. The site https://www.personalitypage.com/ gives a good amount of information, which was very accurate for my situation.

There are no official online tests available, as they need to be taken under supervision of an MBTI-certified official, but there are a few unofficial test available, like this one: Jung Typology Test.

Categories: SQL Server

SQL Core team visited SQLPASS NL meeting

September 18, 2009 Leave a comment

Yesterday I visited another SQLPASS NL meeting. This time we had a session with the SQLCAT team who brought with them 2 members of the SQL Core development team.

The purpose of the meeting was for the team to get feedback on the issues that there are out there amongst us.

I issued the following features requests:

- The ability to read from a mirrored database. For example through read snapshot isolation. This way you could use database mirroring for both high-availablity and scale-out purposes.

- The ability to switch in and switch out filegroups in a database, comparable to partition switching.

- The ability to set a filegroup to read-only without having to go into single-user mode.

- Better support for restore operations in the GUI. Just like the Guided Restore of Quest’s Litespeed (it will ensure that additional backup files are automatically added to the restore when a transaction log or differential backup is selected using the restore wizard.)

- GUI support for restore of partial backups.

What is high on your wishlist for the SQL Server DBMS?

 

P.S. : Although most of the issued raised where already on there priority list, we should not expect them to be in the next release (SQL 2008 R2), as they try not to introduce any major changes to the SQL Core engine with this release. R2 will be focused on BI (Gemini), Azure, Madison and StreamInsight.

Categories: SQL Server

Do-it-yourself scheduling in SQL Server

September 8, 2009 Leave a comment

I could have given this post the title "Resolving scheduler contention for concurrent BULK INSERT" like the original article, but I thought this one would be more ‘catchy’.

 Anyway, here’s another excellent article from Thomas Kejser, one of the hero’s from the SQLCat team with a good background of the internals of the SQLOS Scheduling mechanism.

You should definitely read it if you ever wondered something like ‘Why is there only one CPU core at work when I have 4 of them’.

http://sqlcat.com/technicalnotes/archive/2008/04/09/resolving-scheduler-contention-for-concurrent-bulk-insert.aspx

Categories: SQL Server

How to handle rotten bits

September 8, 2009 Leave a comment

Bit-rot? Yes,it exists..

A quote from the article DBCC Checks and Terabyte-Scale Databases:

“.. It turns out that there are rare circumstances in which data on storage media can become corrupted in the absence of I/O ("bit rot")…”

The article is a must read for any DBA that has not implemented a DBCC CheckDB as part of his maintenance schedules.

Categories: SQL Server

It’s NUMA time!

September 8, 2009 Leave a comment

I must confess; I didn’t know. I didn’t know  Non-Uniform Memory Architecture (NUMA) had arrived in the mainstream computer world. Sure I knew about NUMA; Expensive hardware systems, like Mainframes and large Unix system have been using it for years.

But in fact, since the arrival of the AMD Opteron, Intel’s Itanium and especially now with the new Nehalem processor (Core i7), even simple dual processor systems have NUMA onboard:

As an independent DDR3 IMC is integrated on each socket for the interface to access memory, the IMC platform remarkably increases the bandwidth (the peak bandwidth of DDR3-1333 can be up to 32GB/s, 4-6 times wider than previous platforms), reduces the memory latency, improves performance, and offers each CPU a fast channel to local memory. Unlike previous generation platform, IMC platform uses NUMA architecture for memory access, thus greatly advancing the performance of NUMA-aware applications. DDR3 IMC supports up to 96GB DDR3 memory capacity per CPU interface, and even up to 144GB in the future, which provides a strong memory support for high-end enterprise computing.

(Quote from Learning Experience of NUMA and Intel’s Next Generation Xeon Processor I)

Fortunately, MS SQL Server 2008 (as did 2005) fully supports NUMA.

Categories: SQL Server

Yes, you can truncate a table within a transaction!

September 7, 2009 Leave a comment

I sometimes wonder how some people can claim certain idea’s as the truth, without proper proof. In this case, I heared somebody say "Of course you can’t truncate a table within a transaction, because a truncate is not logged. You will have to use a delete statement.". Well, that’s just wrong, and Paul Randall provides the proof:

http://www.sqlskills.com/BLOGS/PAUL/post/Search-Engine-QA-10-When-are-pages-from-a-truncated-table-reused.aspx.

Categories: SQL Server

Windows 7 Virtual PC error message

September 5, 2009 Leave a comment

When using the new Windows 7 Windows XP Mode (or running any other Virtual Machine in the new Virtual PC version), you might run into the following error if you try to start some setup located on a external USB or network drive:

“The Windows Installer does not permit installation from a Remote Desktop Connection”

This is because the new Integration Features map your drives in the same way Remote Desktop does.

    

When you allow access to your local C:, it sees it as \\TSClient\c and the Windows installer disallows installs from anything in the \\TSClient namespace.

So the solution is to first copy all the setup files into the virtual environment and then run the setup!

Categories: SQL Server

Problem with cascading parameters in Reporting services 2008

September 3, 2009 Leave a comment

A colleague had an issue today with a report build in SSRS 2008. He was using multivalued cascading parameters, and noticed that the 3rd parameter would not refresh properly after changing the parent parameters.

This turns out to be a known problem which has been fixed in SQL 2008 SP1 Cumulative Update 3. Installing the CU that goes with kb/970058/ fixed the problem. According to the KB articles below, this could be a problem on SQL 2005 also.

FIX: Error message when you create a SharePoint subscription on a SQL Server 2008 Reporting Services report that uses cascading parameters: "This report requires a default or user-defined value for the report parameter ‘<Parameter>’"

FIX: Error message when you open a report by specifying a multivalued parameter in a URL in SQL Server 2005 or SQL Server 2008 Reporting Services: "Default value or value provided for the report parameter ‘<Parameter>’ is not a valid value".

Source: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/be4f5bc9-a170-49b9-966b-de1b29b3a3a5.

Categories: SQL Server

Microsoft Certified IT Professional (MCITP): Database Administrator 2008

September 1, 2009 Leave a comment

It has been a long time since my last blog post. I spend my work time at different customers, deep-diving in SQL Server, and my spare time with our little boy Tom, who was born on 12 October 2008. A planned project got delayed, so I have a bit of time to catch up on learning and blogging.

To prove to myself I gained appropriate skills, including all the new features of SQL 2008, to call myself a SQL Server expert, I’ve recently done a few exams and gained the resulting certifications. So far I’ve done the 70-432, 70-433 and 70-450 exams, which make me:

MCTS: SQL Server 2008, Implementation and Maintenance

MCTS: SQL Server 2008, Database Development

MCITP: Database Administrator 2008

 

When time permits, I will try to do the remaining 3 exams, so I can add the remaining SQL Server certifications to my CV too:

 

Certification

Exam

MCTS: SQL Server 2008, Implementation and Maintenance

Exam 70-432: TS: Microsoft SQL Server 2008, Installation and Maintenance

Note This exam is also required for the MCITP: Database Administrator 2008 certification.

MCTS: SQL Server 2008, Database Development

Exam 70-433: TS: Microsoft SQL Server 2008, Database Development

Note This exam is also required for the MCITP: Database Developer 2008 certification.

MCTS: SQL Server 2008, Business Intelligence Development and Maintenance

Exam 70-448: TS: Microsoft SQL Server 2008, Business Intelligence Development and Maintenance

Note This exam is also required for the MCITP: Business Intelligence Developer 2008 certification.

 

MCITP certification

Prerequisite MCTS certification

Exam

MCITP: Database Administrator 2008

MCTS: SQL Server 2008, Implementation and Maintenance

Exam 70-450: PRO: Designing, Optimizing and Maintaining a Database Server Infrastructure using Microsoft SQL Server 2008

MCITP: Database Developer 2008

MCTS: SQL Server 2008, Database Development

Exam 70-451: PRO: Designing Database Solutions and Data Access Using Microsoft SQL Server 2008

MCITP: Business Intelligence Developer 2008

MCTS: SQL Server 2008, Business Intelligence Development and Maintenance

Exam 70-452: PRO: Designing a Business Intelligence Infrastructure Using Microsoft SQL Server 2008

 

Categories: SQL Server

Performance audit: Wait stats

September 1, 2009 Leave a comment

The whitepaper  SQL Server 2005 Waits and Queues describes a methodology called Waits and Queues. By using this methodology one can identify the best opportunities to improve performance, the so called “biggest bang for the buck”. Definitely recommended reading for anyone that is into performance tuning.

There are a few issues with this approach if not properly understood. I therefore recommend reading the whitepaper thoroughly before jumping to conclusions.

First of all, the DMV Sys.dm_os_wait_stats are aggregated across all session ids since the last restart of SQL Server or since the last time that the wait statistics were reset manually using DBCC SQLPERF (‘sys.dm_os_wait_stats’, CLEAR). So the output of this DMV will be hugely influenced by maintenance tasks such as index rebuilds, database backups, etc that often run during out-of-office hours. So it is important to reset the waitstats before the start of any workload you’re trying to analyze.

Secondly, not all waits have an impact on performance.  For example the wait type SQLTRACE_BUFFER_FLUSH can be in the top of the list, but this simply the time the SQL Trace flush task spent sleeping between flushes. So don’t go and disable the default trace when you see this high in your list, as I have seen other people recommend! See http://sqlblog.com/blogs/linchi_shea/archive/2007/01/16/performance-impact-of-enabling-page-checksum-and-default-trace.aspx for a measure of the performance impact of the default trace.

A handy addition to a select on the wait stats, is the case-block below, which I extracted from one of the UDF’s of the SQL 2005 Peformance Dashboard Reports. Notice the conditions that result to a ‘Sleep’ Category.

 select

            case

                        when ws.wait_type like N’LCK_M_%’ then N’Lock’

                        when ws.wait_type like N’LATCH_%’ then N’Latch’

                        when ws.wait_type like N’PAGELATCH_%’ then N’Buffer Latch’

                        when ws.wait_type like N’PAGEIOLATCH_%’ then N’Buffer IO’

                        when ws.wait_type like N’RESOURCE_SEMAPHORE_%’ then N’Compilation’

                        when ws.wait_type = N’SOS_SCHEDULER_YIELD’ then N’Scheduler Yield’

                        when ws.wait_type in (N’LOGMGR’, N’LOGBUFFER’, N’LOGMGR_RESERVE_APPEND’, N’LOGMGR_FLUSH’, N’WRITELOG’) then N’Logging’

                        when ws.wait_type in (N’ASYNC_NETWORK_IO’, N’NET_WAITFOR_PACKET’) then N’Network IO’

                        when ws.wait_type in (N’CXPACKET’, N’EXCHANGE’) then N’Parallelism’

                        when ws.wait_type in (N’RESOURCE_SEMAPHORE’, N’CMEMTHREAD’, N’SOS_RESERVEDMEMBLOCKLIST’) then N’Memory’

                        when ws.wait_type like N’CLR_%’ or ws.wait_type like N’SQLCLR%’ then N’CLR’

                        when ws.wait_type like N’DBMIRROR%’ or ws.wait_type = N’MIRROR_SEND_MESSAGE’ then N’Mirroring’

                        when ws.wait_type like N’XACT%’ or ws.wait_type like N’DTC_%’ or ws.wait_type like N’TRAN_MARKLATCH_%’ or ws.wait_type like N’MSQL_XACT_%’ or ws.wait_type = N’TRANSACTION_MUTEX’ then N’Transaction’

                        when ws.wait_type like N’SLEEP_%’ or ws.wait_type in(N’LAZYWRITER_SLEEP’, N’SQLTRACE_BUFFER_FLUSH’, N’WAITFOR’, N’WAIT_FOR_RESULTS’) then N’Sleep’

                        else N’Other’

                  end as category, 

         ws.wait_type,

         ws.waiting_tasks_count,

         case when ws.waiting_tasks_count = 0 then 0 else ws.wait_time_ms / ws.waiting_tasks_count end as average_wait_time_ms,

         ws.wait_time_ms as total_wait_time_ms,

         convert(decimal(12,2), ws.wait_time_ms * 100.0 / sum(ws.wait_time_ms) over()) as wait_time_proportion,

         ws.wait_time_ms - signal_wait_time_ms as total_wait_ex_signal_time_ms,

         ws.max_wait_time_ms,

         ws.signal_wait_time_ms as total_signal_wait_time_ms,

         @tstamp as tstamp

      from

         sys.dm_os_wait_stats ws

      where 

         ws.waiting_tasks_count > 0 – Restrict results to requests that have actually occured.

      order by

         ws.wait_time_ms desc

Categories: SQL Server
Follow

Get every new post delivered to your Inbox.