How to safely modify SQL stored procedure and SQL function parameters

Modifying parameters of a SQL function or a stored procedure is not a simple task if we want to keep dependencies and maintain database integrity. ApexSQL Refactor is a SQL Server Management Studio and Visual Studio add-in for SQL formatting with a collection of useful code refactors. In this article, we will describe one particular refactor for safe parameter modification.

February 27, 2015

How to combine objects and data from multiple SQL databases in a single SQL script

In some cases a development team may decide to migrate databases between environments by generating a deployment script from multiple SQL databases (development/testing). They can use a tool like ApexSQL Script to create a single script from multiple sources, making it easy to apply to the target environment or the source control. Using this feature, there’s no need to script one SQL database at a time, as multiple data sources are processed simultaneously.

February 24, 2015

How to code faster with SQL Server code snippets

ApexSQL Complete is a SQL Server Management Studio and Visual Studio add-in designed to speed up coding. It completes SQL statements automatically, fills in SQL fragments, generates outlines for the SQL script structure and speeds up coding with T-SQL code snippets.

February 24, 2015

The art and science of creating SSMS 2012 add-ins- Part 3 – Creating Toolbars and new Windows

In the previous two parts of our series, we worked on foundations of an SSMS 2012 add-in. We talked about the mechanism that is behind loading add-ins into SSMS, about the add-in file and the creation of basic Visual Studio 2012 add-in project. We also discussed main parts of the extensibility API and setting up debugging of our add-in. In this article, we‘ll expand that story with the steps to further modify SSMS UI, by creating toolbars and new windows. We also take a look at the method for controlling commands appearance in SSMS 2012

February 20, 2015

The art and science of creating SSMS 2012 add-ins – Part 1 – Laying the Foundation

This article is a tutorial for creating SQL Server Management Studio 2012 add-ins. We will show you how to create and debug a simple SSMS add-in using Microsoft Visual Studio 2012, and explain the main parts of the add-in structure in more detail. In the first part of this article we will cover the processes of creating a Visual Studio add-in project and loading the add-in into SSMS, and we will describe the structure of the .Addin file. We will also cover the process of setting up debugging for the add-in project. In the second part of the article we will cover the code generated by Visual Studio, main parts of the Connect class and we will go through the process of creating simple menu items for the add-in

February 20, 2015

How to restore specific table(s) from a SQL Server database backup

If restoration of an original database to a previous state is not an option, in the case of accidentally updated, dropped, deleted, damaged data, it is still possible to restore these tables if a database backup was created prior to the accident.

February 4, 2015

SQL Server Source control – Part I – understanding source control basics

The goal of database source control is to propagate changes from a development environment, to test and production without issues and to fulfill the need to restore a database at any point in time, maintaining an audit trail, and to allow successful team collaboration during the project.

February 3, 2015