SQL Compare

How to compare two DacPacs using SQL Compare

Often during my development work, especially at the Proof-of-Concept (PoC) stage, I need a quick and easy way to save my current progress, for example, by updating a set of object build scripts in a directory. Ultimately, I also need a way to compare my current development database or script directory to a target production Read more

SQL Prompt

Cleaning up common T-SQL coding issues with SQL Prompt

Some SQL coding habits are just annoying. Commas in front of column names? No way! Others are actively harmful; they’ll make your code error prone, harder for others to read and understand, and even harder to edit without making mistakes. This article covers five harmful problems that I see regularly in T-SQL code, and shows Read more

SQL Compare

How to automate database synchronization using the SQL Compare command line

As a database developer, I use SQL Compare extensively during the Proof-of-Concept (PoC) phase of my projects, when I’m trying out new ideas and developing code on my local machine. I need to start from an up-to-date database schema from the production database, and have a simple way to keep track of my database schema Read more

SQL Prompt

Quick SQL Prompt tip – using the ii snippet

SQL Prompt includes a number of snippets by default that can help you quickly write T-SQL code. These are templates of code that users use regularly. One of the more popular snippets is the “ii” snippet that helps with inserting data into a table. If I type “ii” and hit tab, I quickly get the Read more

SQL Source Control

Versioning an existing database using SQL Source Control

A while ago, maintaining a reliable database change history was an ongoing problem within our development team. It seemed we were forever asking questions such as “Who made this change?”, “When was the stored procedure last edited?”, “When was this view created?”, and so on. Our initial approach was simply to store a list of Read more

SQL Prompt

How to format a set of SQL scripts using SQL Prompt

Any database developer or DBA who spends much of their working week staring at SQL code quickly becomes set in their ways. They like to see the code laid out in a very particular way. They will struggle to look at, let alone digest and understand, code formatted in a ‘foreign’ style. It’s also rare Read more

SQL Compare

How to create a directory of object-level scripts using SQL Compare

In this simple ‘how to’ article, I’ll explain why it’s often useful to be able to create a directory of object-level scripts from an existing database, and then how to create that directory of scripts using SQL Compare. For each object in the database there will be one object build file (*.sql). The scripts will Read more

SQL Prompt

Quick SQL Prompt tip – why you should expand the wildcard

One of the great things about SQL Prompt is that it quickly removes the need to use so many keystrokes. That’s helpful and handy, but to become a really efficient T-SQL coder, you’ll want to practice incorporating a few tricks into your routine. Here’s a good one. Often I run into tables and can’t remember Read more

SQL Compare

Using SQL Compare with In-Memory OLTP tables

If you’ve read my simple assessment of SQL Server’s In-Memory OLTP tables on Simple-Talk and have decided to implement them, we’re in a position to support your move. Redgate SQL Compare can help you compare two databases that have In-Memory objects, the tables, their indexes and any natively compiled procedures, and generate the appropriate scripts. Read more

SQL Compare

Using SQL Compare with Row Level Security

SQL Server 2016 brings with it a host of new features that will be both useful and appreciated by many customers. Quite a few of these features relate to providing additional security for databases, one of which is Row Level Security (RLS). This is a feature that has been available in Azure SQL Databases for Read more