E-Mail:

TSQL

Fixing Orphaned Users In SQL Server 2005

The other day i restored a QA database in compatibility level 90 (SQL Server 2005) to a production server that had SQL Server 2005 installed.  The restore went as expected however, the logins that were already there on the SQL Server had different SIDs than the users in the database that was restored.  We maintain three [...]

Bug with db_name?

The other day I was pulling data from the sysprocesses table on a remote SQL Server 2000 server. I was on a database server that has SQL Server 2005 Service Pack 2 on it and I have the destination (remote) SQL Server 2000 setup as a linked server on the SQL Server 2005 server. With [...]

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 [...]

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 [...]

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 [...]

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 [...]

25 queries / 0.137 seconds.