How to restore a Microsoft SQL database from backup with the Microsoft SQL Server Management Studio (MSSMS) user interface

There are multiple reasons to restore a database from backup. One of them can be disaster recovery, the other is to bring the production database to the developer machine. In both cases, the computer already has the old version of the database. In the new version of Microsoft SQL Server Management Studio (MSSMS) we cannot find […]

How to migrate the Visual Studio 2013 user database to SQL Server 2008

When you create a new web application in Microsoft Visual Studio 2013 the user database it creates is version 706. SQL Server 2008 can only open databases up to version 663 or earlier. To migrate the new Visual Studio 2013 databases to SQL Server 2008 script the database tables and create them again in the […]

Insert multiple rows into a Microsoft SQL Server database

There is a great way to insert multiple rows into a Microsoft SQL Server database in one statement. This notation has multiple advantages: simplicity and the grouping of multiple instructions into one transaction. INSERT MyTable (name, description)VALUES(‘John’, ‘Manager’),(‘Bill’, ‘Truck driver’) Script from Ernie Cruz

The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine. (System.Data)

When you try to import Excel 2007 or later “.xlsx” files into an SQL Server 2008 database you may get the following error mesage : The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine. (System.Data)   To solve this problem install the appropriate version of the Microsoft Access Database Engine.   On 32 bit […]

How to open SQL files in Visual Studio 2012

The default installation of Visual Studio 2012 cannot open SQL documents when you double click on them in Source Control Explorer.  To be able to do that you have to install the SQL Server Data Tools  for Visual Studio 2012 Open the ” December 2012″ update page at http://msdn.microsoft.com/en-us/jj650015 Download and install SSDTSetup.exe by clicking Download […]

Create a backup of a Microsoft SQL Server database to a location outside of the database server

The Microsoft SQL Server Management Studio 2008 user interface only allows you to create a backup of a database to one of the local drives of the database server. To create a backup of a Microsoft SQL Server database to a location outside of the database server execute the following SQL script: BACKUP DATABASE MyDatabase TO […]

How to bypass the “Saving changes is not permitted…” message in Microsoft SQL Management Studio

You made a change to a Microsoft SQL Server database table that requires the re-creation of the table you get the following error message when you try to save your changes: Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes […]