LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

A Week of SQL Server

April 6th starts a week of plenty of great SQL Server content. Much of which is being handed over to all that attend for free in the form of SQL Saturdays. If you are near the Chicago, IL, Madison, WI areas, make sure you take advantage of the following events. If you can, take advantage of all of them! SQL Saturday in Madison – This is our second SQL Saturday in Madison.

Read More...

BCP all tables into files from a database

Sometimes you want to dump the data from all the tables in a database into files. There is really no fast and easy way to do this. Fortunately it is very easy to roll your own solution. Let’s look at what we need to do 1) we need to grab all the tables in the database 2) we need to make sure that the table names are valid 3) we need to specify the output directory

Read More...

Messing with your friendly DBA on April Fools' Day

April Fools’ Day is a day when people play practical jokes and hoaxes on each other. Why not trying to play some practical jokes on your friendly DBA 🙂 The first thing we are going to do is to spoof the host and program name. This is easy to do. Click on Connect, choose Database Engine, you will see the following box Click on options >> Click on the Additional Connection Parameters tab and paste in the following

Read More...

Little used SSIS tasks: Data Profiling Task

I was in New York City yesterday, hanging out with fellow MVP and blogger Ted Krueger in Union Square. I asked him if he uses the Data Profiling Task task a lot, he said not really. I don’t use it a lot either but I decided to show you what you can do with it. When you do a lot of ETL type of work it is good to know what kind of data distribution you have, you might want to know how many NULLs you have, the statistics and more.

Read More...

SQL Server Management: Compatibility Levels

There was a conversation on twitter today about SQL Server Compatibility Levels because someone’s vendor wanted them to use level 80 (SQL 2000) on a SQL 2012 Instance. There are two issues with what that vendor wanted. The first is that SQL Server only supports Current Version + 2. Meaning SQL Server 2012 supports SQL Server 2005 and SQL Server 2008 (and 2008R2). SQL Server 2008 and 2008R2 have the same major release number (10).

Read More...

IT vs The Business

Monday I caught the Food Fight Show, discussing The Phoenix Project and featuring Gene Kim (site|twitter), Jez Humble (blog|twitter), and Matthew Zeier (blog|twitter). Part of the way through the show, a conversation took place that I couldn’t get out of my head. Here’s the situation: A business person is asking IT to implement a blog using a specific NoSQL database solution and we push back and try to examine why they want it, and oh by the way we have this great business opportunity for you (around 29:30).

Read More...

Trying out Gibraltar’s Loupe with Nancy

Introduction I downloaded and tested Gibraltar’s Loupe today and tried to find out what it could add to my application. And because Rachel Hawley asked me t review it, and who am I to refuse her anything. I already add as much logging to my application as possible because it makes it a lot easier to find bugs and fix them once you go into productions. But log files can get overwhelming sometimes.

Read More...

Loading Large Volumes of Data into SQL Azure with SSIS

Loading data into SQL Databases (Azure) is fairly simple. With SQL Server Integration Services (SSIS), the task becomes even more trivial as with many ETL tasks that we’ve done in the past from data source to data source. Truly speaking, a data source is just that, a data source. The true task at hand is in the preparation and transformation of the data between the source and destination. Viewing SQL Databases as what they are, just another data source, makes the design of what you need to do less complicated.

Read More...

Bring SQL Server databases Online or Offline when running on Amazon RDS

To bring a SQL Server database online or offline you can use a command like the following if your database is named test. ALTER DATABASE test SET OFFLINE; ALTER DATABASE test SET ONLINE; When running SQL Server on Amazon’s Relational Database Service it is done a little different. While you can use the command above to take the database offline, you can’t use the command to bring the database online.

Read More...

Turning on Optimize for Ad hoc Workloads, Ad Hoc Distributed Queries and more on a AWS RDS SQL Server Instance

There are several advanced options that you can modify in SQL Server. If you want to turn on optimize for ad hoc workloads in SQL Server, you can run the following script EXEC sys.sp_configure N'optimize for ad hoc workloads', N'1' RECONFIGURE WITH OVERRIDE GO If you want to use OPENROWSET, you can run the following EXECUTE sys.sp_configure'Ad Hoc Distributed Queries', '1' RECONFIGURE WITH OVERRIDE GO When running SQL Server on Amazon’s AWS RDS, you can’t do it like that.

Read More...