ApexSQL Provides Excellent SQL Tools For Free

ApexSQL has a few free tools on their site. Before I carry on, I was in no way compensated for this blog post at all. Now that is out of the way, check out ApexSQL tools. I was amazed by the feature richness of these tools.

Looking for something else? Try these links instead:

I would be amiss if I didn’t share this with the developer community out there. If you are a developer using SSMS, you definitely must download their free tools and give them a try. (more…)

Continue ReadingApexSQL Provides Excellent SQL Tools For Free

Azure Databases – Restore Local Database To Azure

Azure Databases – What do you need to do if you have a local database and you want to deploy it to Azure? I saw while researching for this article that there were a few ways to do this.

Looking for something else? Try these links instead:

The method I’m going to show you now, is a nice quick and easy method.  (more…)

Continue ReadingAzure Databases – Restore Local Database To Azure

Execute Script Error Resolved In SQL Server Management Studio

Execute Script Error – Imagine my surprise when I tried executing a rather large SQL script (255 Mb) and received an error telling me that there was ‘Insufficient memory to continue the execution of the program. (mscorlib)’. You might be wondering why I would even have such a large script to begin with.

Looking for something else? Try these links instead:

Well I had to import data from a file that I didn’t have access to any more, so I decided to script the table contents from the live database and import into my dev database for testing. Trying to run the query produced the error and I had to find an alternative way to get the data into my table. (more…)

Continue ReadingExecute Script Error Resolved In SQL Server Management Studio

Query Stack Overflow With T-SQL – Give Your Queries A Workout

Query Stack Overflow - Do you wish that you could run a few queries against a truly huge database? Do you want to tune your queries and see how they match up against some big data? Sometimes we need a big database for research reasons (here's looking at the educators…

Continue ReadingQuery Stack Overflow With T-SQL – Give Your Queries A Workout

Shrink Bloated Development Databases – Save Precious Space

Shrink Bloated Development Databases – Last night I noticed that the space on my C drive was running slightly low. When this happens, I usually go and look in the temp folder to see what unnecessary space hogs are hiding there. After clearing this folder I realised that the amount of data removed from this folder didn’t make much of a difference. I then went hunting. Using a very nifty tool called WinDirStat, I found the problem files. It turns out that some of my development databases were absolutely huge. The LDF files were several gigs in size. Here is what I did to save a little bit of space. (more…)

Continue ReadingShrink Bloated Development Databases – Save Precious Space

Prevent Accidental Table Data Deletion In SQL Server Management Studio

Prevent Accidental Table Data Deletion – How do we secure our production database against simple errors that could cause quite a problem. As a developer, I mainly work on my database while being in a development environment. It is only after the development is one that some of the work is done against a live database. Let’s have a look at some solutions using SQL Server 2012. (more…)

Continue ReadingPrevent Accidental Table Data Deletion In SQL Server Management Studio

Automate Standard Comment Blocks For New SQL Queries

Automate Standard Comment Blocks – If you write a lot of SQL stored procedures or functions in SQL Server Management Studio, you might like this tip. Many companies require a standard comment format at the beginning of a stored procedure or function. What would be the easiest way to always have this text available?

Looking for something else? Try these links instead:

Some might think to have it in a text file and just copy and paste every time you create a new script. Here is a little trick for those lazy developers (in other words, everyone). (more…)

Continue ReadingAutomate Standard Comment Blocks For New SQL Queries

Customizing SQL Server Status Bar – Know Your Connection

Customizing SQL Server Status Bar – Sometimes I work on a server that has live databases mixed in with test databases. You can obviously see the problem here. Let’s delete some test data. Oops, wrong database. Well there is a solution. SQL Server Management Studio allows us to identify the connection. You do this by changing the colour of the status bar below the SQL Query Window. Customizing SQL Server’s Status Bar is so easy, it is again one of those tricks I never knew existed. It is ‘hidden’ in plain sight though and adds a lot of value to your productivity. (more…)

Continue ReadingCustomizing SQL Server Status Bar – Know Your Connection

Easily Generate Table Change Scripts In SQL Server Management Studio

Something I found frustrating when designing databases, were the frequent changes made to tables. Managing the scripts can become quite tricky, especially if you are still in the design phase. This is made worse by code changes or change requests to existing data structures. Sometimes a person gets so caught up in the changes you need to make, that you forget about scripting these table changes.

Looking for something else? Try these links instead:

Here is a nice trick in SQL Server Management Studio to easily generate table change scripts. Never forget to script your changes again. (more…)

Continue ReadingEasily Generate Table Change Scripts In SQL Server Management Studio

Script Table Data In SQL Server Management Studio

How Do I Script Table Data In SQL Server

Script Table Data – I have used other tools to do this for ages. I can’t believe that I never knew that it existed in SQL Server Management Studio. Well ok, in my defence it isn’t quite the most ‘In-your-face’ setting. Nevertheless, it is very convenient and best of all, you don’t need to leave the IDE to script table data. So where is this function? Why, under Tasks of course. (more…)

Continue ReadingScript Table Data In SQL Server Management Studio