Visual studio sql compare does not update newly added table - visual-studio-2013

I added a new table in the sql server db and used visual studio sql compare to compare it to the existing db project. When i select the newly added table in the comparison results and say update, it does not show up in tfs pending changes.
Updates to procs show up in pending changes.
Any suggestions?

Run the compare again and it should go green.
it'll confirm that it was committed. Then check the project to see if the file is listed and has an addition graphic + in tfs

According to my experience i did rebuild the solution and compared again then it showing correct

Related

visual studio 2013 cannot retrieve database objects

Firstly, Visual Studio 2013 connects to database and retreive tables normaly.
I added more table to database and edit relationship. After that I update data source in Project Explorer tree but it's failed. Even I tested the connection It's ok. But VS 2013 cannot retreive data objects - Message Box shows "Retreiving database object..." in very long time without reason. Can you show me how to fix it?
I found the way to fix this error. Just only find and kill all of process are using database

Compare SQL Server database schema

I am working on project (VS2010 .NET) and have two SQL Server databases, Dev and Prod.
I make all database structure changes in the Dev database and after testing I apply the same changes to the Prod database.
Maybe someone could suggest schema comparison tool which could help me to compare structure and apply changes.
RedGate makes excellent tools for the purpose.
I know of two really good tools:
Red-Gate SQL Compare
ApexSQL Diff
You can also get SSDT (free) here - more about SSDT on my blog.
although you are working in 2010, if you can get hold of VS 2012
go to SQL (menu item) -> Schema Compare. Click on Select Source on the left, and select the dev database. Select the production database on the right.
Then click on the generate script icon (next to the Update icon, it looks more or less like a music icon). That will generate the update script. You may also untick any of the changes that you do not want to include in the script. And it is ... 'free' if you happen to own Visual Studio 2012

Is there a reason Visual Studio 2010 is not generating Update and Delete statements on Typed DataSet using the designer?

When using Visual Studio 2010 to update a typed dataset, it is updating the Insert command, but it simply deletes the Update and Delete commands.
I have the Generate Update commands set to true.
Any ideas why it isn't generating the other statements?
(This is a legacy app with lots of queries, so I can't just delete the Datatable and recreate it)
It is because the table didn't have the primary key set in SQL Server.

Visual studio 2010 database explorer sql query clears table

I've created a database in visual studio 2010 in the following way: Data->Add new datasource->Database->Entity Data Model.
Now, in my wpf app I can load and save data successfully, when closing the
app and opening again the data will still be there, but as soon as I try
retrieve the table data in Visual Studio's Database explorer it returns
an empty table, and running the application after that also returns no data.
It is as if using database explore to query data clears it.
Any help would be greatly appreciated.
Tim Anderson seem to explain what is going on, here:
http://www.itwriting.com/blog/689-where-is-your-sql-server-ce-database.html

Merge Issues With Visual Studio 2010 Database Project Schema Compare & TFS

I am experiencing an issue working with a database project in Visual Studio 2010 Ultimate with TFS. The following describes the work flow that I use:
I work locally modifying a SQL schema via SQL Server Management Studio.
Next I open up the Visual Studio database project & perform a "Schema Compare" operation.
I choose my local database with the latest changes as the "Source Schema" and the "Target Schema" as the database project.
Next I look at the "Schema Comparison" results and choose "Skip" for the "Update Action" on items that I do not want to change. For the items I do want to change I choose the appropriate "Update Action".
When I am finished I then choose the "Write Updates" command to apply the changes to the database project.
The problem that I have is that when I look at the database project, some of the database tables that I told to ignore get updated in the database project by commenting out the database create script.
For example this is what one looks like:
/*CREATE TABLE [SchemaName].[TableName] (
[Col1] BIGINT IDENTITY (1, 20) NOT NULL,
[Col2] INT NULL
);*/
The question is: Since I told the compare to ignore this table then why did it modify the project and comment out the code?
Ok people I found a solution for this issue via a fellow co-worker.
It turns out that there is an extra step you need to do while performing the Schema Compare:
Step 4A - After choosing the appropriate "Update Action" for all items you must now click the "Refresh" button. After you perform a refresh you may proceed to step 5.

Resources