Обсуждение: [ADMIN] Import & Export DB table structure with data
Hi
I have to import table structure from one DB and create the same table structure in another DB.
Secondly I have to copy all the data from one DB to another DB
Kindly suggest way forward.
Regards
Ashwani
How do I get table structure query so that I can create the same on other DB
From: Om Prakash Jaiswal [mailto:op12om@yahoo.co.in]
Sent: Wednesday, July 19, 2017 11:38 AM
To: Ashwani Kumar B; pgsql-performance-owner@postgresql.org; pgsql-sql-owner@postgresql.org; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Import & Export DB table structure with data
Dear Aswin,
you have to create table at receiving end and use dblink() function of postgresql.
Regards
Om Prakash
On Wednesday, 19 July 2017 11:27 AM, Ashwani Kumar B <ashwani.b.kumar@ericsson.com> wrote:
Hi
I have to import table structure from one DB and create the same table structure in another DB.
Secondly I have to copy all the data from one DB to another DB
Kindly suggest way forward.
Regards
Ashwani
On 2017-07-19 07:55, Ashwani Kumar B wrote: > Hi > > I have to import table structure from one DB and create the same > table structure in another DB. > > Secondly I have to copy all the data from one DB to another DB > > Kindly suggest way forward. > > Regards > > Ashwani If both databases are PostgreSQL then you can just use pg_dump. If the databases are of different brands then you may need special tool, there are many conversion tools available, but not all free or inexpensive.
Hi vinny Please give me syntax for PG_Dump Regards Ashwani -----Original Message----- From: vinny [mailto:vinny@xs4all.nl] Sent: Wednesday, July 19, 2017 12:47 PM To: Ashwani Kumar B Cc: pgsql-performance-owner@postgresql.org; pgsql-sql-owner@postgresql.org; pgsql-admin@postgresql.org; pgsql-admin-owner@postgresql.org Subject: Re: [ADMIN] Import & Export DB table structure with data On 2017-07-19 07:55, Ashwani Kumar B wrote: > Hi > > I have to import table structure from one DB and create the same > table structure in another DB. > > Secondly I have to copy all the data from one DB to another DB > > Kindly suggest way forward. > > Regards > > Ashwani If both databases are PostgreSQL then you can just use pg_dump. If the databases are of different brands then you may need special tool, there are many conversion tools available, but notall free or inexpensive.
Hi vinny
Please give me syntax for PG_Dump
Regards
Ashwani
-----Original Message-----
From: vinny [mailto:vinny@xs4all.nl]
Sent: Wednesday, July 19, 2017 12:47 PM
To: Ashwani Kumar B
Cc: pgsql-performance-owner@postgresql.org; pgsql-sql-owner@postgresql.org ; pgsql-admin@postgresql.org; pgsql-admin-owner@postgresql. org
Subject: Re: [ADMIN] Import & Export DB table structure with dataOn 2017-07-19 07:55, Ashwani Kumar B wrote:
> Hi
>
> I have to import table structure from one DB and create the same
> table structure in another DB.
>
> Secondly I have to copy all the data from one DB to another DB
>
> Kindly suggest way forward.
>
> Regards
>
> Ashwani
If both databases are PostgreSQL then you can just use pg_dump.
If the databases are of different brands then you may need special tool, there are many conversion tools available, but not all free or inexpensive.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin