E-Mail:

2008 May

Author Avatar

How To Calculate If Hour Is Even Or Odd In T-SQL..

Hello there…
Today is going to be a short posting on how to calculate whether or not the hour in either the function getdate() or a datetime field in a table is either even or odd. I am using this to determine which tables (evenhour or oddhour) are recording page impressions. Here is the T-SQL script:  select datepart(hour,getdate())%2 […]

Author Avatar

Upgrading to SQL Server 2005?

Today I am going to share with you what I think is important to think about when upgrading to SQL Server 2005. I have done many successful upgrades from SQL Server 2000 and I have put together a checklist of things to consider when doing your implementation. The items in […]

Author Avatar

How To Turn Imported XML Into A Relational Format in SQL Server 2005..

Welcome back!
I hope you found my how to import XML into SQL Server 2005 helpful. Today I thought we would take a step further and turn that imported XML file into a relational format\table. In my previous post you created a table via T-SQL taht contais a field called xml_data with a data […]

Author Avatar

How To Import A XML File Into SQL Server 2005…

Hello again…
Today I wanted to share how to import a XML file into SQL Server 2005. There are different ways to import a XML file either through T-SQL, SSIS, VB Script, etc. I have found the easiest method for just getting and XML file into SQL Server 2005 is to use T-SQL.
I found […]

Author Avatar

Now Rebuild Indexes Online In SQL Server 2005!

Today I was looking for a “better way” to rebuild indexes in SQL Server 2005 and to minimize blocking\contention in the database. As I was looking through BOL I came across the ALTER INDEX statement. If you want to rebuild all indexes on a specified table you can run the following code:
ALTER INDEX […]

Author Avatar

SQL Server 2005 Undocumented Stored Procedures!

Today I was searching the internet for an easier way to see if a file exists. As I was searching I came across several undocumented SQL Server 2005 procedures. They are:

xp_fileexist
sp_MSforeachdb
sp_msforeachtable
sp_msdependencies

Now knowing that these undocumented extended and stored procedures exist, they will definitely make my job a lot easier. The source that […]

Author Avatar

Answers to the SQL Server 2005 Interview Questions!!

Welcome back…
Today I am going to give the answers to the interview questions that I received regarding SQL Server 2005.
Question 1
What are the different versions (editions) in SQL Server 2005
Answer
SQL Server Express Edition, Workgroup Edition, Standard Edition, Enterprise Edition
Question2
What is the difference between RAID 0 + 1 and RAID 1 + 0
Answer
Here the argument […]

Author Avatar

SQL Server 2005 Interview Questions!

Hi again…
I wanted to share with you my latest experience in interviewing for a Senior SQL Server Production (no development) DBA position in Southern California. As we all have come to learn that the “typical” process is a phone interview and then if they like you they invite you for an in person interview. Typically […]