RSS

Category Archives: Database Development

Estimate Table Size based on the Metadata from INFORMATION_SCHEMA.COLUMNS

Estimate Table Size based on the Metadata from INFORMATION_SCHEMA.COLUMNS

A problem I face often is not knowing the size of a new table that I’m creating. I put some basic code together that pulls the column information from INFORMATION_SCHEMA.COLUMNS and with some basic math gets the approximate size of the table based on the estimated number of rows.

Read the rest of this entry »

 

Tags: , , , , ,

Free SQL Server 2012 Installation Guide

Free SQL Server 2012 Installation Guide

Everyone’s favorite four letter word is back, FREE! Yes, it is time I gave back to the community since I’ve been mooching off them them for so long. I’ve put together a short Installation Guide for those interested in getting their feet wet with SQL Server. I’m trying to encourage those that have no experience to get a little curious and try to install SQL Server and play with it.  Maybe afterward you can even try to set up your own Clustered SQL Server Virtual Lab with Hyper-V. Just trying to rub off some of the enthusiasm and passion, did it work?

Anyway you can view the guide Here on Google Docs or Download it Here as PDF. It is just a first draft, so please feel free to add your suggestions or point out mistakes and I will try to fix it ASAP.

You can also read it right off of this page… check it out by clicking “Read the rest of this entry”

Read the rest of this entry »

 

Tags: , , ,

Finding and removing hidden characters in your data using dynamic T-SQL


It has been a long morning for me. It was supposed to be a standard run for our quarterly data aggregations but one of the data import SSIS packages kept failing. The problem was a conversion problem from varchar type to float and I kept getting the following error:

Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to float.

However, my data was numeric I checked it many times… or was it really 100% numeric?

Read the rest of this entry »

 

Tags: , ,

Running a SQL Server Environment at Home Using Native Boot Virtual Hard-Drives (VHD)

Running a SQL Server Environment at Home Using Native Boot Virtual Hard-Drives (VHD)

I’ve run into a road block. As a Microsoft Certified Trainer, I have all the software I need to get hands on with SQL Server. I even have Virtual Hard Drives (VHDs) that I can download directly from Microsoft; there are even publicly available ones HERE. My problem is on the hardware end. Since I’m not a millionaire that can throw money around and buy an entirely new server to put Windows Server on with SQL Server, I had to find another way… and I did 🙂

Read the rest of this entry »

 

Tags: , , , , , , , ,

SQL SERVER – Beginning of SQL Server Architecture – Terminology – Guest Post


Great post

 

Tags: , , ,

8 Habits/Skills/Traits of Highly Effective DBAs

8 Habits/Skills/Traits of Highly Effective DBAs

The whole “7 Habits” title is so cliché so I decided to make it eight! Plus that will probably relieve me from any copyright violations as well. So anyway, these are the eight habits/skills of Highly effective Database Administrators in my humble opinion. Although I come from the Microsoft SQL Server world, I believe most of these traits or skills can be adapted cross-platform.

Feel free to add your feedback in the comments section, this is after all just my own opinion.

Read the rest of this entry »

 

Tags:

Jump start your SQL 2012 Certification for FREE

Jump start your SQL 2012 Certification for FREE

Hey all you proactive SQL junkies, want to jump start your SQL 2012 Certification? Or are you just here because you saw the world’s most favorite four letter word – FREE? Either way I got your fix right here.

Read the rest of this entry »

 

Tags: ,

SQL Server 2012 New Feature – The Sequence Object

SQL Server 2012 New Feature – The Sequence Object

One of the cool new features with SQL 2012 is the Sequence Object.  One of the worst parts of this feature is that whenever I mention it’s a cool new feature a lot of people say “that has been in Oracle forever.” Patience is a virtue!!

Anyway, so I like to consider the Sequence Object as a “Global Identity” that can be shared by many objects in the same database, or even across databases on the same server (I have not tried it via Linked Servers because I only have one test SQL 2012 server). You can take values from the Sequence Object and insert them into tables or you can have a column in a table default to a value from the Sequence Object. A warning to the wise: If you assign a default value for the table as a Sequence Object then you cannot drop it because of dependencies. That is actually a pretty good security measure.

I have included a code snippet so that you can play around with this new feature and I’ve put a few screen shots to show how you can manage it via the GUI. Make sure you run the code section by section; I have included a lot of comments to let you know what to expect while running it.

Read the rest of this entry »

 

Tags: , , ,

SQL SERVER – Find Column Used in Stored Procedure – Search Stored Procedure for Column Name


Good way to find a column being used in a stored procedure rather quickly.

 

Tags: ,

SQL Server 2012 New Features Presentation

SQL Server 2012 New Features Presentation

Professional Association for SQL Server Presentation
Topic: SQL Server 2012 New Features
Presenter: Ayman El-Ghazali

SQL Server Presentations with PASS (Professional Association for SQL Server) Virtual DBA Chapter.

http://dba.sqlpass.org/MeetingArchive.aspx

January 11, 2012 – SQL 2012 New Features. Click here to start streaming.

Slides and Code for all Presentations can be found here

 

Tags: , , , ,

 
%d bloggers like this: