Thread: Compare two Data bases Structure
How Can I do to compare two structures of data bases ? <br /><br />DBA != DBB I need wich functions and wich tables arenot equals <br /><br />thnks<br /><br /><br />
Check out DB Solo ... http://www.dbsolo.com/ Does both DDL compare as well as data compare. ________________________________ From: pgsql-sql-owner@postgresql.org [pgsql-sql-owner@postgresql.org] On Behalf Of manuel antonio ochoa [manuel8aalfaro@gmail.com] Sent: Wednesday, February 23, 2011 6:03 PM To: pgsql-sql@postgresql.org Subject: [SQL] Compare two Data bases Structure How Can I do to compare two structures of data bases ? DBA != DBB I need wich functions and wich tables are not equals thnks
W dniu 2011-02-24 01:03, manuel antonio ochoa pisze: > How Can I do to compare two structures of data bases ? > > DBA != DBB I need wich functions and wich tables are not equals > > thnks > > I'd advise SQL Power Architect - very handy tool with graphical DB design capability. Will compare your databases and even generate suitable SQL script on demand, updating older database to look as a new one (or oposite). This tool is also able to compare project vs database or database vs generation script. Supports not only PostgreSQL but many other databases. It is Java based solution. http://www.sqlpower.ca Regards, Piotr P.S. AFAIK release 0.9.15 was free of charge for personal use. -- -------------------------------------------------------------- "TECHBAZA.PL" Sp. z o.o. Technologie WEB, eDB& eCommerce Oddział Gliwice ul. Chorzowska 50 44-100 Gliwice tel. (+4832) 7186081 fax. (+4832) 7003289
On Feb 24, 2011, at 5:33 AM, manuel antonio ochoa wrote: > How Can I do to compare two structures of data bases ? > > DBA != DBB I need wich functions and wich tables are not equals > > thnks You can try with apgdiff. http://apgdiff.startnet.biz/ Thanks & Regards, Vibhor
<p>As an alternative to the other tools - I've had luck using a simple query that uses information schema.<div class="gmail_quote">>How Can I do to compare two structures of data bases ?<br />> <br />> DBA != DBB I need wichfunctions and wich tables are not equals<br />> <br />> thnks<br /></div>
Select from information_schema.columns and full outer join it again on the table and column names, then just look for nulls on either side. You'll need to alias the left and right views differently. I'm assuming that the dbs are next to each other in the same installation. Once the base query is working, you can filter further on the column types. It's pretty simple as long as you understand joins.
On Thu, Feb 24, 2011 at 10:30 AM, manuel antonio ochoa <manuel8aalfaro@gmail.com> wrote:
How can I do that ? I dont know how to use the query !! ?2011/2/24 Isaac Dover <isaacdover@gmail.com>As an alternative to the other tools - I've had luck using a simple query that uses information schema.
> How Can I do to compare two structures of data bases ?
>
> DBA != DBB I need wich functions and wich tables are not equals
>
> thnks