Warning: session_start() expects parameter 1 to be array, string given in /home/sqlthoug/public_html/blog/wp-includes/class-wp-hook.php on line 341

Warning: Cannot modify header information - headers already sent by (output started at /home/sqlthoug/public_html/blog/wp-includes/class-wp-hook.php:341) in /home/sqlthoug/public_html/blog/wp-includes/feed-rss2-comments.php on line 8
Comments on: Compare database objects https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/ sqlthoughts.com Fri, 27 Sep 2019 07:34:09 +0000 hourly 1 https://wordpress.org/?v=6.9.4 By: elrusdi https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-24555 Fri, 27 Sep 2019 07:34:09 +0000 http://blog.sqlthoughts.com/?p=283#comment-24555 I hope it add with compare stored procedure either

]]>
By: Earl https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-23466 Wed, 17 Jul 2019 05:46:51 +0000 http://blog.sqlthoughts.com/?p=283#comment-23466 Thanks!

]]>
By: Krishna Uppalapati https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-877 Wed, 16 Nov 2016 20:05:26 +0000 http://blog.sqlthoughts.com/?p=283#comment-877 Satheesh,
This looks like cool script.Do you or some have have similar script to use for DB2 LUW databases ?

]]>
By: Guillermo https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-143 Thu, 19 Feb 2015 19:41:12 +0000 http://blog.sqlthoughts.com/?p=283#comment-143 best website solutions

The error you are getting is because you have some tables with foreign keys pointing to a non-existent table or a table that does not have a match on the target DB. To avoid this add this where clause in the dynamic string (line 304 more or less) :

where object_name(FK.referenced_object_id,db_id(”’+@TargetDB+”’)) is not null

]]>
By: Satheesh https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-96 Mon, 05 May 2014 17:38:41 +0000 http://blog.sqlthoughts.com/?p=283#comment-96 In reply to best website solutions.

Are are getting this error for all the databases? I tried to reproduce the issue, but I couldn’t really do it. Could you send me the reproduction steps then I can have a look at it

]]>
By: best website solutions https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-95 Mon, 05 May 2014 05:28:17 +0000 http://blog.sqlthoughts.com/?p=283#comment-95 i am getting this error

Msg 515, Level 16, State 2, Procedure sp_CompareDb, Line 275
Cannot insert the value NULL into column ‘FK_TABLE’, table ‘tempdb.dbo.#FKLIST_SOURCE

]]>
By: Dan https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-50 Fri, 14 Feb 2014 22:18:11 +0000 http://blog.sqlthoughts.com/?p=283#comment-50 Hi thanks for this useful script. I have a
few questions:

Any plans to add SP’s and triggers?

Also this may not really related to your sp, but I ran a test using SSMS Generate script wizard (2008r2) creating a db script from a db, changed the db name to create a dup db.
Then ran your compare sp between the two,
the compare listed several PK row deltas which when examined don’t appear to be actual deltas. If I create a 2nd dup from the generated script then compare with the first dup db your sp lists no differences. Any idea what this may indicate?

]]>
By: Alexandre https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-14 Wed, 04 Dec 2013 13:29:59 +0000 http://blog.sqlthoughts.com/?p=283#comment-14 Error:
———————————————-
Comparing databases factoring and webfactoring
———————————————-
Getting table and column list!
———————————————-
Getting index list!
———————————————-
Getting foreign key list!
———————————————-
Mensagem 515, Nível 16, Estado 2, Procedimento sp_CompareDb, Linha 275
Não é possível inserir o valor NULL na coluna ‘PK_TABLE’, tabela ‘tempdb.dbo.#FKLIST_SOURCE______________________________________________________________________________________________________000000000025’; a coluna não permite nulos. Falha em INSERT.
A instrução foi finalizada.
Print column mismatches!
———————————————-
Print index mismatches!
———————————————-
Print key mismatches!
———————————————-

]]>
By: Marcin https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-9 Wed, 30 Oct 2013 14:34:26 +0000 http://blog.sqlthoughts.com/?p=283#comment-9 Could You help me ?

]]>
By: Marcin https://blog.sqlthoughts.com/2013/09/20/compare-database-objects/#comment-8 Wed, 30 Oct 2013 14:33:53 +0000 http://blog.sqlthoughts.com/?p=283#comment-8 Hi,
You did a great job with this script, but could You tell me what should I change with You script to compare BASE_1 with BASE_2 and get as a result the table with DIFFERENCE between tables schema?
For example if I have a table “TABLE1” in both databases and in BASE_1 is additional column “ADDITIONAL_COLUMN” and in BASE_2 there is “ADDITIONAL_COLUMN”. I would like to receive as a result the DIFFERENCE for example BASE_2 Missing column “ADDITIONAL_COLUMN”

Is it hard to receive ??
I will need the same with the indexes …

Could You help me to change this script?

]]>