Monday, June 30, 2014

I like to move it, move it. Upload and download binary data to or from SQL Server using standard tools

Imagine that you have a huge collection of Hello Kitty images (I do).
One day you make a decision to organize your collection - sort it, label it, tag it, remove duplicates and so on. The first thing you need - sophisticated data storage, of course. And it is obvious that you choose SQL Server - the world's best database platform :)
And since SQL Server is already present in our Universe - how about to load binary data into it?

Monday, June 23, 2014

ExpressProfiler: Yet another "when and why" story.

Core of ExpressProfiler  was born about 8 years ago when I worked for a company whose mission was the migration of Oracle and Sybase to SQL Server. We used a tool for automated database code conversion and migration (a pretty good tool btw - SSMA).
If you already know what is the difference between an "automatic" and an "automated" conversion then you may guess that there were a lot of manual work involved on the rewriting and optimization of converted code.

Sunday, June 15, 2014

Script, store and transfer data using XML, XQuery and clipboard

When surfing SQL Server forums you might notice a lot of questions like "How do I script my data and transfer it to another server?". Of course these questions always have answers,  from "Nohow" to "Use SSMS 2012/ SSMSBoost/ SSMS Toolpack". But what can you do if you don't have neither SQL Server 2012 nor any 3rd party tools (quite useful by the way).

Monday, June 9, 2014

Don't mess with success or Everybody lies.

Imagine that you have a table of customers
create table Customer
(
Name varchar(30),
LastName varchar(30),
Title varchar(30)
);
go
insert into Customer values('Alex','Smith','Mr.');
insert into Customer values('John','Doe','Dr.');
go
Now you selecting list of customers
select    c.Title + ' '+ c.Name +' '+c.LastName as Name from dbo.Customer c
order by Name
Just as planned!
Here is a list of customers, perfectly sorted.

To be sure that your query has no issues you test it with SQL Code Guard.
What a pity!

Sunday, June 1, 2014

How to easily automate SQL Code Guard.


It may happen that you have a need to check the scripts that you have on your disk.  For example, it may be part of your build process.
So how you can run SQL Code Guard as a command-line tool?