I am using New Schema Comparison to compare 2 Databases
but this tools return " compare no differences detected "
I am using VS 2019
Have a look at the Error List in Visual Studio.
In my case it contained errors, but it's not obvious that an error has occurred from the SQL Schema Compare UI.
I just faced the same problem. In my case, it was because the database user did not have enough privileges.
Related
Versions in use:
SQL Server 2016
Azure Data Studio 1.36.2
SQL Server Schema Compare 1.13.1
Problem: there is something wrong with my Azure Data Studio apply schema to SQL Server 2016.
It say I'm not the login manager but there is no login manager role in SQL Server.
And it has worked before updating Azure Data Studio to v1.36.X
https://imgur.com/a/JFWFOtn
Finally, I found the problem
Misused sqllinlinetablevaluedfunction and sqlmultistatementtablevaluedfunction
In my project There are many function use sqllinlinetablevaluedfunction instead of sqlmultistatementtablevaluedfunction but It's should be used sqlmultistatementtablevaluedfunction
so I change to Correct Type then It's worked. The error never show
With SSDT in VS 2017 I cannot do a schema comparison of two databases. Steps to reproduce:
Tools >> SQL Server >> New Schema Comparison
Select a source (a SQL 2017 database)
Select a target (a SQL 2017 database)
Compare
Get error: Value cannot be null.
Parameter name: identifierGroup
I've also tried in VS 2015 which was still installed and it failed there too.
This error starts after the identity Cache is disabled
ALTER DATABASE SCOPED CONFIGURATION SET IDENTITY_CACHE = OFF
After re-enabling it, the error disappears:
ALTER DATABASE SCOPED CONFIGURATION SET IDENTITY_CACHE = ON
Don't forget to restart sql service.
I had the same issue and not yet found a solution, I suppose there are some relation with orphan users.
I did a workaround that worked fine to me.
Create a new empty database
Compare the origin database with this new one.
Update the new database with de resulting script.
Make this new database the new origin and compare with the destination database.
Update de destination database.
Maybe this can helps!
I found a different answer which worked for me several times so far using SSDT / Visual Studio 2019 against SQL server 2019 databases.
https://hendrikbulens.com/2018/10/03/how-to-fix-sql-server-data-tools-error-unexpected-exception-caught-during-population-of-source-model-in-visual-studio-2017/
Hope this helps someone. Ideally Microsoft needs to patch this issue, which looks like a longstanding bug at this point. I looked for such a patch but did not find one. If anyone finds one, please do link it here.
I am creating indexes on two separate tables in the same Database (MS SQL Server), and I got an error saying that an index already exists.
This error does NOT come up again if I changed index name to another.
Please help. Many Thanks.
Screenshot from Microsoft SQL Server Management Studio
I'd strongly suggest that the visual designer is leading you astray. IIRC, indexes used to have schema-scoped names (back in the 7.0 or 2000 era, I think. Before user/schema separation) and later gained the ability to only need to be unique at an individual table level1.
If you try to create a duplicate index manually, you receive the error:
The operation failed because an index or statistics with name '<name>' already exists on table '<table name>'.
Since that's clearly not the error you're seeing, I strongly suspect that it's old code in the visual designer and yet another reason not to use it.
1Unfortunately, we're in an area where historic documentation from the right period is no longer available from the Microsoft website. It used to be easier to verify these recollections because you could still find the "What's new in SQL Server 2000", etc pages there.
I cannot believe this is so difficult. Backup / Restore fails. Import and Export both fail with a variety of silly errors.
Is there a way to do this that works?
Try scripting out the schema and data, with the SQL Server Management Studio
Article explaining how to use SQL Server Management Studio
If that doesn't work, you'll have to use a more advanced third party tool. Like, for instance, Red Gate's Sql Toolbelt, where:
SQL Compare allows you to compare and merge schema between 2 databases
Data Compare allows you to compare and merge data between 2 databases
I tried to do data compare with Visual Studio 2012 but got 1 critical error. I was able to to do the comparison between these 2 db before I was forced to update the data compare since I am comparing with another db using SQL 2014. My latest SQL Server Data Tools ver is 11.1.40403.0
Please see below for the screen shot. Has anybody encounter this before and has solution? I am stuck as data compare doesn't has any option to select to bypass constraint check or whatsoever.
Problem is solved automatically after restart PC.