Schema Comparison causes Visual Studio 2010 to crash - visual-studio-2010

When I click on Write Updates and then I confirm, VS stops working. What could be the issue here?
I'm trying to update the database project schema directly from the source database using a schema comparison, as it seems it is the absolute best way to sync those, but I seem unable to execute it on the target project. I haven't tried targeting a database.
http://i.stack.imgur.com/lSUpQ.png

Related

Oracle Developer Tools (ODT) with Visual Studio 2019

I'm using Visual Studio 2019, 16.11.9, with Oracle Developer Tools for Visual Studio, 19.3.2.0.
I can do a schema compare with my local database, but there are a number of issues I have noticed which I can't have following through to deployment in test or production. I just wondered if I am doing something wrong or if these issues are limitation of the extension.
Using schema compare generated change scripts only ever drop and rebuild an existing table, never alter it. This obviously deletes all the data in the table too. How do I change this?
Whenever I do a database clean build I have to run the schema compare, or build script, multiple times as the tool doesn't order the build based on dependencies. Surely this is my setup as otherwise this is a HUGE oversight!
Any help welcome.

SQLite data source is missing in Visual Studio 2012 Entity Framework Connection

I have just updated from SQLite 1.0.8x to sqlite 1.0.94.0 to try and use with EF6.
When I try and add a entity data model from an existing database there is no option to select the data source as sqlite as there used to be for the older SQLite. I have installed SQLite from Nuget and from the setup file on the SQLite website for .net4.5/VS2012. I have tried reinstalling and rebooting both VS and my machine and neither worked. I have found many similar problems to this and no answers to this problem. I can add a connection to an SQLite file via server explorer and navigate through the db on the tab in Visual Studio. This now existing connection does not appear when trying to add a new model in EF6, however.
I even found this question on SO that seems to be the same question as mine but has no answers:
SqlLite in Visual Studio 2012 installed by NuGet dosent exist in Data Source for connection
It seems strange to me that this issue would exist with no answers/concern about it. Are people shunning the SQLite/EF6 combo? I had EF5 and SQLite running fine.
I know this is technically a duplicate but I do not know what else I can do.
I don't know if this actually solves your issue, but I had the same problem and tried pretty much every solution out there.
Eventually, after installing the correct packages to support VS2012, I also installed Entity Framework 6 Tools for Visual Studio 2012 & 2013
After doing so (and a restart of VS) the connection showed up in the Entity Data Model Wizard.
Hope it solves your issue as well.

Reload database objects in a VS database project?

if I create a SQL Server 2008 Database Project in Visual Studio 2010, then I am able to right click the project and select Import Database Objects and Settings.... I can do that exactly one time (even if I get an error while importing). If I did it one time, the option is grayed-out.
But after I have imported my objects, I couldn't find a way to reload or refresh the objects. A good example would be, that I have a database project of a whole database and someone adds something to the database directly. Now I want to have new table (function, procedure, etc.) in my project, too.
There has to be a better way than copy&paste to add new existing database objects to my database project?
I found this question:
Script all SQL database objects into VS Database project
But I neither have a Schema Compare option, nor can I drag&drop files from the server explorer.
In Visual Studio you should see a menu choice that says Data. If you click on that, you should be able to run a Schema Compare. If you're not seeing that, then there's something wrong with your VS install or the project or maybe both.

Database in version control using Visual Studio 2010 Professional

I've added a SQL Server 2008 database project to my Visual Studio 2010 Professional Edition solution in the hope that it might allow me to include my database in version control.
I can commit the schema files for each database object into version control, however these schema files all script objects as create rather than alter, so are not good for colleges getting my changes and updating their databases.
Is this a good way to get my database into source control?
And what would the workflow be for actually using it to update databases to a given revision without losing all the data associated with dropping and re-creating all the tables?
Update: on Premium and Ultimate versions, there is a schema compare tool which makes this easy. This does not exist on Professional. Is there any straightforward manual workaround?
I'm not sure if you can do this in VS 2010 Professional, but in VS 2010 Premium, you can do a schema comparison (Data -> Schema Compare -> New Schema Comparison) between your project and database, and update changes in either direction.
When going from project to database, VS generates a script that copies existing data into a temporary table before dropping the existing one.
The database project has a deploy step (which is present in my Professional copy of VS2010) that will generate a sql script with your sql objects in it.
The key thing here is if you r-click the project, properties, goto deploy and change target database settings to a specific database, when you deploy it will generate a change script for that specific database so it matches the objects in the project (and in theory keep existing data etc).
You can get it to either generate a sql script, or directly update the database. Generating a script is probably a better idea :)

Visual Studio 2010 - Database Projects (where are the project template for just script files?)

VS.NET 2010 removed the database project template that could be used for just script files
(that you right click on and execute on desired database).
I want to add a database project similar to the ones in VS.NET 2008? Can i do this?
I tried to use one of the new vs.net 2010 database projects however, in our environment we have multiple applications within the same database. We also have a lot of legacy stuff. In addition we have a lot of queries that cross databases (i.e. in the case of accessing data wharehouse tables). It sure seems that this scenario is hard to use with the new database projects. It seems this adds a lot of complexity to using the new db projects.
What sort of database project is best to be used for this scenario??

Resources