Questions tagged [vsdbcmd]

vsdbcmd.exe is a command line utility which can be used to deploy a database or to import a database schema into a `.dbschema` file.

From MSDN:

You can use VSDBCMD.EXE to:

  • Import a database schema from a live database into a .dbschema file
  • Generate a deployment script from a .dbschema file
  • Generate a deployment script from a .dbschema file and deploy that script to a target database
  • Generate a deployment script by comparing two .dbschema files.

.dbschema files are used in Visual Studio Database Projects (DataDude) as a meta data representation of the DDL within a database.

29 questions
18
votes
2 answers

Database Project - "Reference to external elements from the source named x could not be resolved

We have two database projects, x and x_audit. x has a reference to x_audit. x_audit deploys fine, but when trying to deploy x we get the error: The reference to external elements from the source named x_audit.dbschema could not be resolved, because…
Matt
  • 1,494
  • 2
  • 18
  • 38
6
votes
2 answers

vsdbcmd data loss may occur, but where?

When using vsdbcmd to deploy my database: vsdbcmd.exe /a:Deploy /manifest:MyDatabase.deploymanifest I Get: SQL01268 .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating because…
Matt
  • 1,494
  • 2
  • 18
  • 38
3
votes
1 answer

VSDBCMD for Two Database Diff?

Doing a Google/Bing search for "vsdbcmd two databases diff" is not showing me anything clear. I just have two databases live on the same server and I want to diff them and then apply schemata differences from A->B. Just like I could do in the VS2010…
Snowy
  • 5,942
  • 19
  • 65
  • 119
3
votes
1 answer

Database Project Insists on "Rebuilding" Table on Deployment for Dropped Columns

So I have a VS2010 Database Project that I am deploying, with a few schema changes. I have one table in particular that the VSDBCMD insists on "rebuilding" i.e. rename->create->copy->drop The only changes for this table are dropping some columns,…
Master Morality
  • 5,837
  • 6
  • 31
  • 43
3
votes
2 answers

Sqlproj: Which solution to deploy a database in command line?

I am currently deploying a website to a server by using the Microsoft Web Deployment technologies (msbuild and msdeploy commands). The website requires the deployment of a database and both will be in the same server. I am searching the best…
JM89
  • 149
  • 1
  • 1
  • 11
3
votes
1 answer

How can I manage SQL permissions between development and production?

I'm trying to set up a smooth deployment process where we can deploy to a production or development SQL server with a single deploy script. But I don't know how best to manage users and permissions between the two environments. For example, in…
Kris Harper
  • 5,672
  • 8
  • 51
  • 96
2
votes
2 answers

Can't deploy database project - VSDBCMD deploy not seeing connection string in manifest

This tutorial shows how to Define a Custom Workflow to Deploy a Database from Team Foundation Build: http://msdn.microsoft.com/en-us/library/ff805001.aspx However, when TFS tries to deploy my database, it complains that I must specify a connection…
simon
  • 3,380
  • 2
  • 22
  • 23
2
votes
1 answer

primary key constraint violation, only when deploying DB via vsdbcmd

I am using VS 2010 Premium RTMRel (10.0.30319.1) and SS2008. I have a database which builds AOK and has a post deployment script which loads some sample data. When I build and deploy this DB via the VS UI, it works just fine. When I try to deploy…
soo
  • 7,100
  • 1
  • 18
  • 10
2
votes
2 answers

How do I filter objects to be compared using VSDBCMD

I'm trying to automate my deployment and I've be trying to use the VSDBCMD command line tool to compare schemas of my development and staging databases. I can get it to work comparing everything but what I can't figure out is how to filter out the…
1
vote
3 answers

When deploying a database project with vsdbcmd I get the error "Vardecimal support is enabled for the database but disabled for the project"

I get: SQL01265 Vardecimal support is enabled for the database but disabled for the project I've tried changing the .sqlsettings files to have: "True" and the .sqldeployment file to have:…
Matt
  • 1,494
  • 2
  • 18
  • 38
1
vote
0 answers

"Object reference not set to an instance of an object" when trying to run VSDBCMD.exe

We are trying to deploy a database project using tfs deployer and "vsdbcmd.exe" (VS 2010 version). Both are on a windows server 2008 r2 (64 bit). When our deployment script runs and we call the VSDBCMD.exe, we get the following error: An unexpected…
Ryan
  • 11
  • 5
1
vote
1 answer

"The target database schema provider could not be determined" With VSDBCMD but Only When /ConnectionString is Specified

I have been developing a deployment script to deploy our database project to multiple database instances. I'm testing it by running it manually. It is a very simple script, and just runs VSDBCMD against a deployment manifest created to deploy our…
John Saunders
  • 160,644
  • 26
  • 247
  • 397
1
vote
1 answer

VSDBCMD Won't Start - Sql100DatabaseSchemaProvider can not be instantiated

I've followed the instructions over at http://msdn.microsoft.com/en-us/library/dd193258(v=vs.100).aspx I've copied the deploy folder and the other dll's over to the remote machine and installed SQL Server 2008 Management Objects. However, when I…
Feasoron
  • 3,471
  • 3
  • 23
  • 34
1
vote
2 answers

How to provide vsdbcmd deploy command line target dbschema sql command variables?

The Visual Studio (2010) gui provides options for specifying second command variable file for target. I however cant find this option for the command line implementation - vsdbcmd.exe. Running vsdbcmd deploy for dbschema to dbschema with only…
drk
  • 865
  • 5
  • 9
1
vote
3 answers

VSDBCMD generating incorrect SQL update file

We have an automated build process via TFS, TFS database projects, and vsdbcmd. When deploying the database project to our database server, the generated SQL script attempts to 'ALTER' certain stored procedures, even though those stored procedures…
Kamau Malone
  • 570
  • 1
  • 5
  • 16
1
2