Database project deploy fails in Visual Studio 2013
Asked Answered
H

3

27

I have a database project in a solution which will not deploy from Visual Studio 2013. It fails with an error message "Unable to connect to target server".

The same project, when opened in Visual Studio 2012 deploys without an issue.

The database is Sql 2012 hosted in a Sql 2014 engine (express)

The deployment settings are thus (with names changed to protect the innocent):

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <IncludeCompositeObjects>True</IncludeCompositeObjects>
    <TargetDatabaseName>TestDatabase</TargetDatabaseName>
    <DeployScriptFileName>TestDatabase.Database.sql</DeployScriptFileName>
    <TargetConnectionString>Data Source=.\SQL2014;Integrated Security=True;Pooling=False</TargetConnectionString>
    <ProfileVersionNumber>1</ProfileVersionNumber>
  </PropertyGroup>
</Project>

I have also tried the deployment with using a username and password rather than Integrated security...

Hydrolyse answered 6/4, 2014 at 7:43 Comment(0)
I
44

Visual Studio 2013 now has an update that adds SQL Server 2014 support under Tools –> Extensions and Updates –> Updates

After installing the update under Help -> About Microsoft Visual Studio I see I now have SQL Server Data Tools 12.0.40403.0

Now SQL Server 2014 is an option in my database project settings and everything works! Database Project Settings


Original Response:

I have the same problem. It looks like the update for Visual Studio 2013 isn't out yet :(

In the next few days the Visual Studio 2013 download will appear through the Visual Studio update channel (Tools –> Extensions and Updates –> Updates).

http://blogs.msdn.com/b/ssdt/archive/2014/03/25/sql-server-data-tools-for-sql-server-2014-is-available.aspx

Inerrant answered 7/4, 2014 at 4:43 Comment(4)
SSDT is now released for VS2013 - I've updated the blog post with this information. Check for updates in Visual Studio and you'll see the "Microsoft SQL Server 2014 update for database tooling" option. That's the latest release.Hybridism
Looks like I was just being a little fast out of the gate!Hydrolyse
@Hydrolyse always a BAD idea ;)Bassorilievo
Also note that, at least for the update for my VS2012, it doesn't say anything about restarting VS at the end (installer succeeds silently), so if you install it and leave any instance open, restart VS to see the SQL 2014 options.Songwriter
B
2

I had this same error message from Data Tools Operations in VS 2013 Update 5 when trying to publish to an Azure SQL DB.

Turns out in my case (a new dev environment) it was as simple as the SQL server password not being saved.

I worked this out using Server Explorer - as I noticed that my connection that was ok, was later disconnected, and the password had been cleared.

I did the following to sort it out

  1. Server Explorer
  2. Right click connection > Modify connection
  3. Tick Save Password (again)
  4. Advanced...
  5. Security Section - Entered password here
  6. OK
  7. Test connection - good
  8. Re-Ran publish from the relevant DatabaseDeploy.publish.xml file

BAM All good again !

Bassorilievo answered 29/7, 2015 at 23:34 Comment(0)
I
1

SQL Server Data Tools - Business Intelligence for Visual Studio 2013 is out now as per the comment by Kevin Cunnane at the bottom of the blog referenced above.

You can download it here: SQL Server Data Tools for BI for Visual Studio 2013

Please note that references to "SQL Server 2014" in the download seems to indicate that this is being developed under the SQL server 2014 development - but the tools are for Visual Studio 2013 and it appears it will resolve the deploy problems related to Datbase projects in VS 2013 for SQL 2012 or earlier databases. [Update - I have installed this and it has resolved my own problems with "deploy and publish" in VS 2013]

Indole answered 7/4, 2014 at 10:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.