Welcome to AspAdvice Sign in | Join | Help

Orcs Goblins and .NET

I enjoy reading and writing. I hope you enjoy at least the former. I have moved my blog to Brendan.Enrick.com.

Syndication

Tags

News

Add to Technorati Favorites

Locations of visitors to this page

All C# Feeds in one place!

View Brendan Enrick's profile on LinkedIn

Brendan Enrick's Facebook profile

Navigation

Archives

Advice Sites

Articles

Blogs

Music

Change SQL Server Instance for Visual Studio Database Project

While installing SQL Server 2005 recently I ran into some difficulty. I use database projects from Visual Studio 2005 Team Edition for Database Professionals. I use Visual Studio 2008 with them now, and I recently made a mistake while using one of these projects. When I ran this project my default instance of SQL Server was not listed, so I figured I would connect it to the SQL Express. BIG MISTAKE. After installing SQL Server and getting it working correctly I removed SQL Server Express, and now the real fun begins. The database project no longer loads.

So I try removing and adding the project in my solution figuring it might prompt me for the database instance again. No luck. So I decide to ask around a bit. One forum got me a nice response. It explained how to make the change as well as linking to this MSDN article.

http://msdn2.microsoft.com/en-us/library/aa833159(VS.80).aspx

To make this change you just have to alter some settings in Visual Studio. Start by navigating to the Tools menu and choose Options.

SetValidationDatabase-Step1

Once you've opened the Options menu, navigate to the Database Tools section and pick Design-time Validation Database. This is the information for the database used by Visual Studio for database projects. Change the SQL Server Instance Name to whatever the name of the local database is.

SetValidationDatabase-Step2

I made the bad assumption of assuming that the project is what connects to the server instead of Visual Studio. I checked everywhere in settings for the project, but it slipped my mind that Visual Studio would be what would contain that setting.

As one final note I will say Googling sucks when you're looking for information about "Visual Studio 2005 Team Edition for Database Professionals". Ah what a great name guys.....

Published Wednesday, April 02, 2008 4:39 PM by Brendan

Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Change SQL Server Instance for Visual Studio Database Project @ Tuesday, May 13, 2008 1:48 PM

Thanks, made the same mistake exactly, solved in 10 seconds thanks to this post (and google)

EShy

# re: Change SQL Server Instance for Visual Studio Database Project @ Thursday, July 24, 2008 6:09 PM

Thanks! Made the same mistake myself. -matt

Matt

# Change Local SQL Server Used By Visual Studio @ Thursday, January 08, 2009 11:06 AM

A while back I ran into a problem when setting up SQL Server on a computer and using it along with a database project in Visual Studio. It isn’t really a big deal, but I needed to change which locally installed instance of SQL Server I was using by default

Brendan Enrick's Blog

# re: Change SQL Server Instance for Visual Studio Database Project @ Monday, April 20, 2009 12:42 PM

Excellent! Just what I needed.

Brian

# Change Local SQL Server Used By Visual Studio @ Tuesday, July 27, 2010 8:59 AM

Change Local SQL Server Used By Visual Studio

Brendan Enrick

# Change Local SQL Server Used By Visual Studio @ Wednesday, July 13, 2011 9:52 AM

Change Local SQL Server Used By Visual Studio

Brendan Enrick

Leave a Comment

(required) 
required 
(required) 
Enter the code you see below