Archive for December 30th, 2008

Professional New Year’s Resolutions

Tuesday, December 30th, 2008

Well, I’ve been tagged.  SQLBatman has tagged me to post my New Years Resolutions.  I have so much room for professional development I’m not sure where to start.  So I’ll start with some pain points.  So here they are:

1.  Get Certified. I have been in the IT business for over 10 years and have not taken any certification exams since I was a NetWare 4.0 admin.  Since I think I’ll be hanging out in the database world for the foreseeable future, I think I should prove my skills.

2.  Learn to effectively use profiler. I hate how much time I spend setting up a trace because I really don’t know what I’m looking for I also need to increase my experience at reading traces to make correct resolutions to issues faster.

3.  Be able to resolve some of the basic, recuring Oracle issues I get paged with and must pass off to our Oracle DBAs. I share on-call with our Oracle & Sybase DBAs.  I feel so guilty to have to call them for any Oracle log I get.  One has been a DBA for 10 years and the other 30 years (going all the way back to our mainframe days) they can resolve out MSSQL logs most of the time without my assistance, I need to return the favor.

4.  Learn SQL Server Analysis Services. Judging from the keynotes at SQLPass, SSAS will have a much larger footprint during 2009.  I need to know how to troubleshoot and support it.

So it’s my turn to share the love.  I, like SQLBatman, do not know how has been blessed with this task.

You have been tagged:

Neil Watkins

Jimmy May

Susan Delaney

Michelle Ufford

Getdate() Formatting

Tuesday, December 30th, 2008

I get the occasional question from our Oracle DBAs on how do you do this in MSSQL.  Usually I have little to no idea, so I do what all new DBAs do:  Look it up.  Well, this situation came up today on how can I write a procedure that will query the table and give me all the enteries for today.  The column the date is stored in is varchar in this format 11/14/2008.  I found the answer is select convert(varchar,getdate(),101)  So I thought I’d add the sytle ID numbers for future reference.

Style ID

Style Type

0 or 100 mon dd yyyy hh:miAM (or PM)
101 mm/dd/yyyy
102 yyyy.mm.dd
103 dd/mm/yyyy
104 dd.mm.yyyy
105 dd-mm-yyyy
106 dd mon yyyy
107 Mon dd, yyyy
108 hh:mm:ss
9 or 109 mon dd yyyy hh:mi:ss:mmmAM (or PM)
110 mm-dd-yyyy
111 yyyy/mm/dd
112 yyyymmdd
13 or 113 dd mon yyyy hh:mm:ss:mmm(24h)
114 hh:mi:ss:mmm(24h)
20 or 120 yyyy-mm-dd hh:mi:ss(24h)
21 or 121 yyyy-mm-dd hh:mi:ss.mmm(24h)
126 yyyy-mm-dd Thh:mm:ss.mmm(no spaces)
130 dd mon yyyy hh:mi:ss:mmmAM
131 dd/mm/yyyy hh:mi:ss:mmmAM