What is SQL Server

If you are reading this post you have of course heard the term DataBase… Depending who you are and what you do for a living that term may or may not mean anything to you. If you are a DBA (DataBase Administrator) look away! This post is not for you. lol This post is intended for those who have no idea what a database is or what Microsoft SQL Server is or why they should care.
OK so now that we’ve got that out of the way on with the definition.

What is SQL Server? 
SQL Server is Microsoft’s RDBMS (Relational DataBase Management System). Like its competitor Oracle, Microsoft’s SQL Server is the database applications that a website or other application might use to store its list of Customers, Orders, Products and Employees. If you have booked a flight reservation on line (or by phone) or you have a Costco or Netflix member ship then you have no doubt been exposed to a database and perhaps even had your purchasing habits stored in the database and used to market products to you that the vendor knows you want. Put simply Microsoft SQL Server is a DataBase product used to store the data collected and used by a variety of computer software applications. It is a giant electronic file cabinet for your computer based data.
These days most organizations (Microsoft shops) are running Microsoft SQL Server 2005, Microsoft SQL Server 2008 or Microsoft SQL Server 2008R2. You can install Microsoft SQL Server 2008R2 software on a server in your office or you can run SQL Server in the Cloud! For more information about Microsoft SQL Server in the cloud see the following article: Introduction to the Cloud and Windows Azure

Advertisements

SQL Server Bulk Updates and Locking

When doing a large update of a table in a SQL Server database you may gain some performance by locking at the Table level instead of allowing SQL Server to do Page or Row level locking.
This can be accomplished using Table Hints. Table hints override the query optimizer default plan for the executed query. Table hints apply to data manipulation language (DML) statements such as Select, Insert, Update and Delete. Table hints should be specified in the FROM clause. Table hints allow the user to choose a specific locking method, indexes to use, or other options for DML statements.
It should be noted however that you are second guessing the query optimizer and if conditions change in the database that might make the query work better SQL Server may still use your less efficient table hint.
The ProDataMan way
If you use Optimizer Hints AKA Table Hints make sure to document any scripts or procedures that use table hints so they can be reviewed when changes to the database schema are made that might affect the Table Hint.

Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

This is an error that you get when you try to view the built-in reports in SQL Server 2008 when the database compatibility is set to anything less than 2005(90).
To fix this and make the built-in reports work:
Right click on the database
Select properties
On the options tab change the compatibility level to SQL 2005 or later.

Auto File Growth by Percentage of file size

In SQL 2000 and before setting auto file growth to a percentage meant that the file would grow by 10% of the initial file size (regardless of how large the file had grown since its creation).
In SQL 2005 and later the growth by percentage setting is based on the “current” file size and not the “initial” file size.  The means the amount that the file grows will vary greatly from the time that the file is created to its size 2 years later.
The ProDataMan way
In SQL 2005 and later do not use a percentage setting used a fixed Megabyte setting based on the amount of data that your users typically add between maintenance periods.

Fix for SharePoint Search error: The search service is currently offline

psconfig -cmd upgrade -inplace b2b -wait
Fix is in the comments by “maxmorgan” on the link below
http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/02/24/the-search-service-is-currently-offline-visit-the-services-on-server-page-in-sharepoint-central-administration-to-verify-whether-the-service-is-enabled-this-might-also-be-because-an-indexer-move-is-in-progress.aspx

SQL Server 2005 Bug

I was just made aware of a new bug (oops I mean undocumented feature) in SQL 2005 that prevents the backup of File Groups that scroll beyond the viewable area of the Backup Dialog box.
This is not a problem if you have only a few file groups but if you have enough that you can’t see them all without scrolling then you will only be able to back up the ones that you can see before you touch the scroll bar.
Thanks Peter!!