SUSPECT_PAGES

One of the common administration tasks many DBAs seem to be unaware of is monitoring and maintenance of the suspect_pages table in the MSDB system database.

Caught Red Handed

This table was introduced in SQL Server 2005 and will be automatically populated when SQL Server encounters the following errors during a page read:

  • An 823 error – caused by a cyclic redundancy check issued by the O/S (a disk read error)
  • An 824 error – logical error – such as a torn page

This can include pages read during normal query operations, running DBCC CheckDB or a database backup for example.

The suspect_pages table is limited to 1,000 rows so it needs to be cleared or preferably archived once the issues have been addressed or new entries are not logged!

The event_types column is updated when a page is restored, or using DBCC – repaired or deallocated. Rows can be automatically deleted by dropping (probably not ideal!) or restoring the affected database.

A regular row count check on the table is a good idea to alert you to new entries which should be responded to immediately as there is potential corruption in the database. It is also possible to monitor the table using the ‘Database Suspect Data Page’ event class with tracing.

More info: http://msdn.microsoft.com/en-us/library/ms191301.aspx

Posted in SQLServerPedia Syndication | Leave a comment

SQL Bits 7 – Massive Discount!!!

Hopefully that got your attention!

I’ve blogged previously about the SQL Bits conference in York on September 30th – October 2nd.

http://www.iainkick.com/archive/2010/07/vote-now-sql-bits-%e2%80%93-the-7-wonders-of-sql/

Voting for sessions is now closed and it’s time to decide if you are going to go.

One of the advantages of working for a sponsor is that we can offer a discount for attendees. The Thursday and Friday sessions require payment to attend and Quest are able to offer a 20% discount – just use the code QST20 when you register. The Saturday is free for everyone.

A lot of people I talk to struggle to convince their bosses of the value of the time off and cost required to attend these events. I firmly believe the standard of speakers (including Kevin Kline – SQL Server MVP from Quest, Brent Ozar -MCM SQL Server from SQLSkills and Buck Woody – Program Manager from Microsoft) and content at SQLBits is second to none in the UK for SQL Server and attendance will enhance your ability to do your job. The added bonus is York is a lovely place to visit, so I highly recommend the event for all SQL Server professionals.

Posted in Events, Professional Development, SQLServerPedia Syndication | Leave a comment

Bring Your Friends

Thanks to the users of and contributors to SQLServerPedia, the powers that be within Quest have realised the benefits of such resources to the community and are expanding the concept for Oracle.

OraDBPedia has just launched, the Editor in Chief is my colleague Jeff Smith (Blog|Twitter). Once again the site will be independent of any 3rd party software (including Quest) and play host to Wiki style technical information pages and syndicate blogs with Oracle content. If you have colleagues who are interested in contributing then contact Jeff and the team at hello@oradbpedia.com.

The feedback we get for SQLServerPedia reaffirms our belief in the concept, I am interested to see if the Oracle community will embrace the idea as enthusiastically.

Posted in SQLServerPedia Syndication | Leave a comment

SQL Server User Groups – Manchester and Leeds – 15th/16th September 2010

I will be trying my best not to get involved in the War of the Roses whilst crossing the Yorkshire – Lancashire divide in September when I am presenting at the Leeds and Manchester UK SQL Server User Groups.

Managing SQL Server in a global economic meltdown

IT departments don’t make money, they spend it. As times are tough it’s important we all find ways to spend less yet still do an effective job. After 5 years as a DBA and then 5 years spent meeting with hundreds of DBA’s, Sysadmins, Developers, Managers and general IT people working with SQL Server I have identified some of the common tasks they could undertake to improve the performance, security and configuration of their environments with little or no cost to the business.

 Leeds – Wednesday 15th September 17:00 – 21:00

Anthony Brown with also be presenting on XML Data in SQL Server 

Location: Callcredit Information Group, One Park Lane, Leeds, West Yorkshire, LS3 1EP 

Register here 

Manchester – Thursday 16th September 17:00 – 21:00

Location: Westminster House, Reception, Minshull Street, Manchester, M1 3HU

Register here 

As will all these meetings, they are a great opportunity to share ideas and network with fellow SQL Server professionals.

Hope to see you there!

Posted in Events, SQLServerPedia Syndication | Leave a comment

The Dreaded UAC and SSRS 2008

I was performing the ‘simple’ task of deploying some Reporting Services (SSRS) reports and ran into a frustrating issue.

The environment was pre-configured with Windows Server 2008 and SQL Server 2008 with SSRS already deployed. I was logged into the server directly with full local and domain admin rights (this was not production before you ask!). The reports were pre-written templates and the datasource was configured correctly. So I didn’t envisage any problems.

Using Business Intelligence Development Studio (BIDS) the report deploy failed on a permissions issue, which seemed odd given my permissions on the box.
So I tried to access the SSRS Site Settings via the usual URL: http://servername/reports/ to check the permissions, the page loaded but there were no links available!

It suddenly struck me, the dreaded User Account Control (UAC) we have seen since Vista was first hatched also holds true for Windows Server 2008.

So simply right clicking on Internet Explorer (or your alternative browser of choice) when opening the browser and selecting ‘Run As Administrator‘ gave me access to the Site Settings and other links in SSRS. Also running BIDS as Administrator made sure the deployment was successful. We were then able to add users to SSRS and they could access reports as normal.

There are numerous options when working with UAC in Windows 2008 as detailed in the links below, unfortunately they are far too varied and complex to go into on this blog post, so I’ll leave you to the fun of reading them for yourself.

Sorry for the inevitable headaches and nausea.

User Account Control Step-by-Step Guide
http://technet.microsoft.com/en-us/library/cc709691(WS.10).aspx

User Account Control and SQL Server
http://technet.microsoft.com/en-us/library/cc512639.aspx

Posted in SQLServerPedia Syndication | Leave a comment

New SQLServerPedia Blog Syndication – Randall Neth

The high standard of those whose blogs we syndicate on SQLServerPedia is great, but to add another Microsoft Certified Master (MCM) for SQL Server 2008 to the list will serve to enhance standards even higher. Welcome to Randall Neth.

Randall Neth

Microsoft Certified Master: SQL 2008 and Microsoft Design Architect for Alexander Open Systems in Overland Park, KS.  Randall has worked in IT for nearly 15 years with over 10 years being in a consultancy role.  During this time he has worked with a variety of technologies such as SQL Server, SharePoint Server, Exchange Server, Citrix, VMWare, and Cisco networking.  Randall currently works as an Architect for a consulting firm and designs solutions for all Microsoft technologies, specializing in SQL Server, SharePoint Server, and Exchange Server.  Randall is the father of a 3 year old future engineer and just celebrated his 10 year wedding anniversary to his wife Jill.  In his spare time Randall enjoys playing with his son, reading up on SQL Server, answering items in forums, and posting to his blog at randallneth.com.  Randall currently holds a variety of certifications including his MCT (Microsoft Certified Trainer), Cisco Certified Networking Professional (CCNP), and Microsoft Office Communications Server R2 (OCS) with Voice Specializations.

  • Blog: http://randallneth.com
  • Twitter: http://twitter.com/randallneth
  • Posted in SQLServerPedia Syndication | Leave a comment

    Finger on the Pulse

    We have made some changes at SQLServerPedia, the main one being the Pulse page.

    There is a HUGE and ever expanding amount of information available online around SQL Server these days and this can be an amazing resource for everyone working with the platform. The challenge can be finding your way through all this information to the best quality content and the links, articles or blog posts you really care about.

    So at SQLServerPedia we have tried to find a way to filter the most relevant and useful stuff for you.

    The SQL Server community is very active on Delicious and Twitter, so the Pulse site will search the most relevant SQL Server topics for you and present them on the site.

    Users can then vote up or down their favourite topics using the buttons next to the post:

    Hmm, shall I vote for my own post?

    This allows users to search by the most popular or most recent posts.

    So the more users who vote the more useful the page becomes – so get voting!

    One thing to note, this page requires a seperate registration from the main SQLServerPedia site.

    Let us know your thoughts – hello@sqlserverpedia.com

    Posted in SQLServerPedia Syndication | Leave a comment

    SQL Server User Group – Ireland – September 28th

    I’m delighted to confrim I will be presenting at the SQL Server User Group in Ireland on September 28th 2010.

    There'll be none of that....well, maybe....ok, a lot.

    Managing SQL Server in a global economic meltdown

    IT departments don’t make money, they spend it. As times are tough it’s important we all find ways to spend less yet still do an effective job. After 5 years as a DBA and then 5 years spent meeting with hundreds of DBA’s, Sysadmins, Developers, Managers and general IT people working with SQL Server, I have identified some of the common tasks they could undertake to improve the performance, security and configuration of their environments with little or no cost to the business.

    Location

    Ground Floor, Microsoft Atrium Building Block B, Carmenhall Road, Sandyford Industrial Estate, Dublin 18 (close to the Sandyford Luas stop). Limited underground parking is available at the back of the building.

    18:30 – 20:00, then a pub and it’s free (not the pub)!

    Register here

    Posted in Events, SQLServerPedia Syndication | Leave a comment

    New SQLServerPedia Blog Syndication – Pradeep Adiga

    I’m pleased to announce another addition to our blog feeds on SQLServerPedia – Pradeep Adiga

    Pradeep is a Subject Matter Expert (SME) for SQL Server with one of the biggest MNCs in Information Technology field, where he works with highly critical OLTP systems and over 50 TB data warehouse. Pradeep has over a decade of IT experience, performing SQL Server Database Administration, System Administration. Pradeep specializes in problem management, high availability of MS SQL Server databases and provides technical leadership for SQL Server DBAs.

    His blog can be found here and he be found on twitter here.

    He has written some great posts recently on The Resource Database, Space isssues when running DBCC CheckDB and Hypothetical Indexes.

    If you would like to syndicate your blog on SQLServerPedia have a read of this article to explain how to get started.

    Posted in SQLServerPedia Syndication | Leave a comment

    Not another TempDB post!

    I realise the world and his wife has written articles, blogs and graffiti about tuning TempDB, but I had to search around a lot of places to find out the full picture. So, I thought I’d try and pull it all together into one place.

    What is TempDB and why should I care?

    Each instance of SQL Server has a single TempDB system database which is a shared resource for all the other databases on the instance and as such can become a resource bottleneck .

    TempDB is used for lots of operations within SQL Server, including:

    • Snapshot isolation and read committed snapshot (RCSI)
    • MARS
    • Online index creation, rebuilds with SORT_IN_TEMPDB
    • Temporary tables, table variables, and table-valued functions
    • DBCC CHECK
    • LOB parameters
    • Cursors
    • Service Broker and event notification
    • XML and LOB variable
    • Query notifications
    • Database mail
    • User-defined functions
    • Sort
    • Hash match
    • Spool
    • Version store

    How to find if TempDB is a bottleneck

    Paul Randal (Blog | Twitter) demonstrates that you need to identify if TempDB is experiencing PAGELATCH waits:                                                                        http://sqlskills.com/BLOGS/PAUL/post/A-SQL-Server-DBA-myth-a-day-%281230%29-tempdb-should-always-have-one-data-file-per-processor-core.aspx

    Glenn Berry (Blog | Twitter) provides a script to identify if TempDB has high PAGELATCH waits using the sys.dm_os_wait_stats DMV: http://glennberrysqlperformance.spaces.live.com/blog/cns!45041418ECCAA960!2991.entry?sa=873818292

    The important column here is the io_wait_time_ms as it subtracts the signal_wait_time_ms – which is time spent runnable rather than actually running.

    Glenn also provides a script to show which database data and log files are suffering from IO stalls – these are a sign of disk subsystem bottlenecks on the server.

    How to tune TempDB

    1. RAID – Place TempDB data and log files on seperate RAID 1 or preferably RAID 10 disk arrays.

     2. Implement Instant File Initialization – Windows 2003 and above and SQL 2005 and above allow SQL Server files to be initialized instantaneously. Instant file initialization reclaims used disk space without filling that space with zeros. Instead, disk content is overwritten as new data is written to the files. Log files cannot be initialized instantaneously.  http://msdn.microsoft.com/en-us/library/ms175935.aspx

     3. Implement Trace Flag -T1118
    http://support.microsoft.com/kb/328551

     4. Pre-size TempDB – By default TempDB is created with one data file of 8MB and one log file of 0.5 MB. When SQL Server is restarted TempDB is recreated and will return to the original size. Most production systems will need much more space in TempDB. By default both data and log files of TempDB are allowed to grow automatically. Keep in mind that allowing TempDB to Autogrow will take up some system resources. After a restart a heavily used TempDB which has not been pre-sized will have to grow very frequently causing significant overhead.

    It is recommend that you monitor the typical size of TempDB on your system. Once you have a good feel of the usual size of TempDB, make the TempDB data file larger than its usual size and turn off automatic growth of this data file. Ideally TempDB would reside on a dedicated disk and be pre-sized to the maximum space available.

    Script to check your TempDB size and growth parameters
    http://msdn.microsoft.com/en-us/library/ms175527.aspx

     
    Change TempDB data file size (1GB)

    USE [master]
    GO
    ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N‘tempdev’,SIZE = 1024000KB )
    GO
      

    Change TempDB log file size (0.5GB)

    USE [master]
    GO
    ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N‘templog’, SIZE = 512000KB )
    GO  

    5. Spilt TempDB data files – Only one file group in TempDB is allowed for data and one file group for logs, however you can configure multiple files. With SQL Server 2000 the recommendation is to have one data file per CPU core, however with optimisations in SQL Server 2005/2008 it is now recommend to have 1/2 or 1/4 as many files as CPU cores. This is only a guide and TempDB should be monitored to see if PAGELATCH waits increase or decrease with each change.

    Adding more data files may help to solve potential performance problems that are due to I/O operations. Having too many files increases the cost of file switching, requires more IAM pages, and increases the manageability overhead. The size of each file is configurable. More files can be added, moved, or removed. To better use the allocation mechanism (proportional fill), the size of the files should be equal.
    http://technet.microsoft.com/en-us/library/cc966545.aspx

     
    Add file to TempDB filegroup (with Autogrow OFF)

    USE [master]
    GO
    ALTER DATABASE [tempdb] ADD FILE ( NAME = N‘tempdev2′,
    FILENAME = N‘D:\Data\tempdev2.ndf’ , SIZE = 10240KB , FILEGROWTH = 0)
    GO
      

    References

    Posted in SQLServerPedia Syndication | 2 Comments