Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • Last Modified:

How to use EMS DB Comparer for PostgreSQL to move db structure from master to target including FK

Hi,

I've posted a similar question before, but didn't get much of a response.  I'm  in my second trial of EMS DB Comparer for PostgreSQL (as well trying the rest of the EMS PostgreSQL studio).  I've run into problems with trying to copy the database structure from a master to target database when the master has foreign keys.  The program seems to have a bug (which the company says they are working on fixing) that always includes the foreign keys in the script it generates, even if I say I don't want it to include them.  

According to the company's website, all sorts of  top company's & governmental orgs use their software, so I am assuming someone out there must have found a good way around this problem without having to hand arrange all of the table declarations by hand in the script.

If anyone has any advice or tips, I would greatly appreciate it!

Thanks,
Courtenay
0
courtenayt
Asked:
courtenayt
1 Solution
 
adrpoCommented:

You could copy the schema using pg_dump:
pg_dump -s dbname > dbname_schema_copy.sql

http://www.postgresql.org/docs/8.1/static/app-pgdump.html
http://www.postgresql.org/docs/8.1/static/backup.html

pd_dump is part of the PostgreSQL system, so you don't need
additional tools like EMS Studio or whatever.

Cheers,
za-k/
0
 
courtenaytAuthor Commented:
Hi,

Thanks for the alternate solution.  I've been working with EMS, and they are fixing the bugs in their program.  It's great to have a "backup" to them though - pardon the pun!

Thanks,
Courtenay
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now