Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have installed SQL Server 2012 and LocalDB on my development machine, and am able to connect to LocalDB using both the SQL Server Management tool 2012 and from within my winform application using a newly modifed connection string Shown below:

Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\MyDatabase.mdf;Integrated Security=True;Connect Timeout=60

The problem arises when I attempt to port my application onto a Windows 2008 Server which is running SQL Server 2008, (I know I could skip the LocalDB installation and just make use of SQL Server 2008, but I am just testing the installation of my application on this machine.. )

I have installed both SQL Server 2012 LocalDB and updated .net 4.01 to .net 4.02 using the kb article located at http://support.microsoft.com/kb/2544514

I keep getting getting an error when I attempt to connect to (LocalDB)\v11.0 from both my application and from the SQL Server Management 2008 Tool, I have also manually started up (LocalDB)\v11.0 from cmd->SQLLocalDB -s "v11.0" and then attempted to connect once again using the NP

i.e np:\\.\pipe\LOCALDB#8B2C7490\tsql\query

When I use the named pipe everything connects fine, so I am assuming that as this works then the installation of LocalDB is also correct.

What do you suggest I do to resolve this situation?

I am also concerned as to the proper implementation moving forward with the deployment of my application, am I supposed to now include .Net 4.03 as a prerequisite? If so is there already a clickonce bootstrap manifest available for this or do I need to create one.. so that my app works correctly moving forward, I'm really concerned that LocalDB might break it.. as so far I'm not having much luck..

I guess if all else fails I can go back to using SQL Server Express 2008 as this implementation worked correctly before..

Thanks,

share|improve this question

migrated from stackoverflow.com Jun 14 '12 at 12:02

This question came from our site for professional and enthusiast programmers.

2 Answers 2

The problem is not in Windows Server version but in .NET Framework version. You mention you are using SQL Server 2008 Management Studio, which is using .NET 3.5. So updating .NET 4 to .NET 4.0.2 will have no effect on it - you would need to update .NET 3.5.

Install SQL Server 2012 Management Studio, make sure .NET 4 is updated to .NET 4.0.2 and you will see that it works just fine on Windows Server 2008.

share|improve this answer

From what I could see, it appears that Microsoft doesn't support LocalDb out of the box in Windows Server 2008. I just got the Web Platform Installer and tried searching for localdb and no entries were found. I went to the download site and grabbed only the LocalDb.msi installer and installed it in Win Server 2008. Created a default instance:

C:\Program Files\Microsoft SQL Server\110\Tools\Binn>sqllocaldb.exe c "v11.0" -s

Then tried to connect to it in my ASP.NET MVC 4 app but it didn't work. This works in Windows 8 RC.

I simply decided to go with SQL Express 2008 since this one the Web Platform Installer found!

share|improve this answer
3  
IMHO Web Platform Installer will offer SQL Server 2008 R2 Express as long as Visual Web Developer 2010 is the default VS version there. Visual Web Developer 2010 doesn't support SQL Server 2012, including LocalDB. Now if you look at Visual Studio 2012 RC you will see that it replaced SQL Server Express with LocalDB as the default SQL Server database, so it is logical to assume that Web Platform Installer will offer LocalDB when it offers Visual Web Developer 2012. (disclaimer: I used to be involved in the LocalDB project). –  Krzysztof Kozielczyk Jun 14 '12 at 7:05
    
Good catch... I do not have VS installed on the server machine - only on my development machine ( VS 2012 RC on Win 8 Release Preview ) and LocalDb works OK. The problem is that when I launched Web Platform Installer 3.0 on the server, I searched for SQL Server 2012 and it wasn't offered as an option ( it did not appear in the list of available downloads ). Only SQL Server 2008 was there. I then assumed that SQL Server 2012 was not compatible with Windows Server 2008. I'll try to download SQL Server 2012 manually and install it. I'll get back here to update my answer if it works... –  Leniel Macaferi Jun 14 '12 at 11:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.