Thread: Comparing two databases for differences

Comparing two databases for differences

From
"Ferrell, Denise CTR NSWCDD, Z11"
Date:
Running PostgreSQL 9.3.5 on Linux.

Does anyone know of an easy way to compare 2 database instances?  Especially the stored procedures and tables from the
twodatabases.
 

Thank you in advance.

Re: Comparing two databases for differences

From
Denish Patel
Date:
The easiest way to compare schema by using https://github.com/omniti-labs/pg_extractor to dump objects into separate git repo for each database and look for difference in both repos. 

On Wed, Dec 10, 2014 at 9:08 AM, Ferrell, Denise CTR NSWCDD, Z11 <denise.ferrell.ctr@navy.mil> wrote:
Running PostgreSQL 9.3.5 on Linux.

Does anyone know of an easy way to compare 2 database instances?  Especially the stored procedures and tables from the two databases.

Thank you in advance.

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



--
Denish Patel,
OmniTI Computer Consulting Inc.
Database Architect,
http://omniti.com/does/data-management

Re: Comparing two databases for differences

From
Stephen Frost
Date:
Denise,

* Ferrell, Denise CTR NSWCDD, Z11 (denise.ferrell.ctr@navy.mil) wrote:
> Does anyone know of an easy way to compare 2 database instances?  Especially the stored procedures and tables from
thetwo databases. 

The Nagios module check_postgres.pl has the ability to compare database
instances.

    Thanks!

        Stephen

Attachment

Re: Comparing two databases for differences

From
Denish Patel
Date:
you don't have to use Git repo. Just dump objects using pg_extractors in two folders and run "diff" between them.

On Wed, Dec 10, 2014 at 9:13 AM, Denish Patel <denish@omniti.com> wrote:
The easiest way to compare schema by using https://github.com/omniti-labs/pg_extractor to dump objects into separate git repo for each database and look for difference in both repos. 

On Wed, Dec 10, 2014 at 9:08 AM, Ferrell, Denise CTR NSWCDD, Z11 <denise.ferrell.ctr@navy.mil> wrote:
Running PostgreSQL 9.3.5 on Linux.

Does anyone know of an easy way to compare 2 database instances?  Especially the stored procedures and tables from the two databases.

Thank you in advance.

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



--
Denish Patel,
OmniTI Computer Consulting Inc.
Database Architect,
http://omniti.com/does/data-management



--
Denish Patel,
OmniTI Computer Consulting Inc.
Database Architect,
http://omniti.com/does/data-management

Re: Comparing two databases for differences

From
jaime soler
Date:
El mié, 10-12-2014 a las 14:08 +0000, Ferrell, Denise CTR NSWCDD, Z11
escribió:
> Running PostgreSQL 9.3.5 on Linux.
>
> Does anyone know of an easy way to compare 2 database instances?  Especially the stored procedures and tables from
thetwo databases. 

I have used several times aquadatastudio:
http://www.aquafold.com/aquadatastudio/schema_sql_compare.html
>
> Thank you in advance.
>




Re: Comparing two databases for differences

From
"Greg Sabino Mullane"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


>> Does anyone know of an easy way to compare 2 database instances?
> The Nagios module check_postgres.pl has the ability to compare database instances.

To expand on how easy this is:

wget -q http://bucardo.org/downloads/check_postgres.pl

perl check_postgres.pl --action=same_schema --db=mydb1 --db=mydb2

More details here:

http://bucardo.org/check_postgres/check_postgres.pl.html#same_schema

- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201412101455
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAlSIpRkACgkQvJuQZxSWSsgJXwCeL7pqzLsez4FkUpq0ZopW4HyD
o40AnjY3wa+/LpbQRIKkVgsnMbdYdPuD
=aJk3
-----END PGP SIGNATURE-----




Re: Comparing two databases for differences

From
Strahinja Kustudić
Date:
I used this before and it worked great http://apgdiff.com/, but it cannot compare data, only schemas and stored procedures.

Re: Comparing two databases for differences

From
Devrim Gündüz
Date:
Hi,

On Wed, 2014-12-10 at 14:08 +0000, Ferrell, Denise CTR NSWCDD, Z11
wrote:
> Does anyone know of an easy way to compare 2 database instances?
> Especially the stored procedures and tables from the two databases.

You can use pg_comparator -- also available in YUM repository.

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachment