pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Import & Export DB table structure with data
6+ messages / 4 participants
[nested] [flat]

* Import & Export DB table structure with data
@ 2017-07-19 05:55 Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
  2017-07-19 06:08 ` Re: Import & Export DB table structure with data Om Prakash Jaiswal <op12om@yahoo.co.in>
  2017-07-19 07:16 ` Re: Import & Export DB table structure with data vinny <vinny@xs4all.nl>
  0 siblings, 2 replies; 6+ messages in thread

From: Ashwani Kumar B @ 2017-07-19 05:55 UTC (permalink / raw)
  To: pgsql-performance-owner@postgresql.org <pgsql-performance-owner@postgresql.org>; pgsql-sql-owner@postgresql.org <pgsql-sql-owner@postgresql.org>; pgsql-admin

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


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Import & Export DB table structure with data
  2017-07-19 05:55 Import & Export DB table structure with data Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
@ 2017-07-19 06:08 ` Om Prakash Jaiswal <op12om@yahoo.co.in>
  2017-07-19 07:14   ` Re: Import & Export DB table structure with data Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Om Prakash Jaiswal @ 2017-07-19 06:08 UTC (permalink / raw)
  To: Ashwani Kumar B <ashwani.b.kumar@ericsson.com>; pgsql-performance-owner@postgresql.org <pgsql-performance-owner@postgresql.org>; pgsql-sql-owner@postgresql.org <pgsql-sql-owner@postgresql.org>; pgsql-admin

Dear Aswin,you have to create table at receiving end and use dblink() function of postgresql.
RegardsOm Prakash
 

    On Wednesday, 19 July 2017 11:27 AM, Ashwani Kumar B <ashwani.b.kumar@ericsson.com> wrote:
 

  <!--#yiv0244021150 _filtered #yiv0244021150 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv0244021150 #yiv0244021150 p.yiv0244021150MsoNormal, #yiv0244021150 li.yiv0244021150MsoNormal, #yiv0244021150 div.yiv0244021150MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman", "serif";}#yiv0244021150 a:link, #yiv0244021150 span.yiv0244021150MsoHyperlink {color:blue;text-decoration:underline;}#yiv0244021150 a:visited, #yiv0244021150 span.yiv0244021150MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv0244021150 span.yiv0244021150EmailStyle19 {font-family:"Calibri", "sans-serif";color:#1F497D;}#yiv0244021150 .yiv0244021150MsoChpDefault {font-family:"Calibri", "sans-serif";} _filtered #yiv0244021150 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv0244021150 div.yiv0244021150WordSection1 {}-->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 

   

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Import & Export DB table structure with data
  2017-07-19 05:55 Import & Export DB table structure with data Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
  2017-07-19 06:08 ` Re: Import & Export DB table structure with data Om Prakash Jaiswal <op12om@yahoo.co.in>
@ 2017-07-19 07:14   ` Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Ashwani Kumar B @ 2017-07-19 07:14 UTC (permalink / raw)
  To: Om Prakash Jaiswal <op12om@yahoo.co.in>; pgsql-performance-owner@postgresql.org <pgsql-performance-owner@postgresql.org>; pgsql-sql-owner@postgresql.org <pgsql-sql-owner@postgresql.org>; pgsql-admin

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<mailto: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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Import & Export DB table structure with data
  2017-07-19 05:55 Import & Export DB table structure with data Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
@ 2017-07-19 07:16 ` vinny <vinny@xs4all.nl>
  2017-07-19 07:18   ` Re: Import & Export DB table structure with data Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
  1 sibling, 1 reply; 6+ messages in thread

From: vinny @ 2017-07-19 07:16 UTC (permalink / raw)
  To: Ashwani Kumar B <ashwani.b.kumar@ericsson.com>; +Cc: pgsql-performance-owner@postgresql.org; pgsql-sql-owner@postgresql.org; pgsql-admin; pgsql-admin-owner@postgresql.org

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.


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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Import & Export DB table structure with data
  2017-07-19 05:55 Import & Export DB table structure with data Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
  2017-07-19 07:16 ` Re: Import & Export DB table structure with data vinny <vinny@xs4all.nl>
@ 2017-07-19 07:18   ` Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
  2017-07-19 08:00     ` Re: Import & Export DB table structure with data Luan Huynh <nnhluan@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Ashwani Kumar B @ 2017-07-19 07:18 UTC (permalink / raw)
  To: vinny <vinny@xs4all.nl>; +Cc: pgsql-performance-owner@postgresql.org <pgsql-performance-owner@postgresql.org>; pgsql-sql-owner@postgresql.org <pgsql-sql-owner@postgresql.org>; pgsql-admin; pgsql-admin-owner@postgresql.org <pgsql-admin-owner@postgresql.org>

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 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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Import & Export DB table structure with data
  2017-07-19 05:55 Import & Export DB table structure with data Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
  2017-07-19 07:16 ` Re: Import & Export DB table structure with data vinny <vinny@xs4all.nl>
  2017-07-19 07:18   ` Re: Import & Export DB table structure with data Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
@ 2017-07-19 08:00     ` Luan Huynh <nnhluan@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Luan Huynh @ 2017-07-19 08:00 UTC (permalink / raw)
  To: Ashwani Kumar B <ashwani.b.kumar@ericsson.com>; +Cc: vinny <vinny@xs4all.nl>; pgsql-performance-owner@postgresql.org <pgsql-performance-owner@postgresql.org>; pgsql-sql-owner@postgresql.org <pgsql-sql-owner@postgresql.org>; pgsql-admin; pgsql-admin-owner@postgresql.org <pgsql-admin-owner@postgresql.org>

Please take a look at: pg_dump
<https://www.postgresql.org/docs/9.6/static/app-pgdump.html; , pg_restore
<https://www.postgresql.org/docs/9.6/static/app-pgrestore.html;

*For example*:

*pg_dump  -h localhost -p 5432 -U postgres  --format custom --no-password
 --encoding UTF8  --no-security-labels --no-tablespaces  --verbose
--table=public.sstb_account --file sstb_account.backup --schema public
postgres *


*pg_restore  -h localhost -p 5432 -U postgres --dbname=new_database
--role=postgres  --format custom --no-tablespaces --schema=public --verbose
sstb_account.backup*

On Wed, Jul 19, 2017 at 2:18 PM, Ashwani Kumar B <
ashwani.b.kumar@ericsson.com> wrote:

> 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 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
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2017-07-19 08:00 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19 05:55 Import & Export DB table structure with data Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
2017-07-19 06:08 ` Om Prakash Jaiswal <op12om@yahoo.co.in>
2017-07-19 07:14   ` Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
2017-07-19 07:16 ` vinny <vinny@xs4all.nl>
2017-07-19 07:18   ` Ashwani Kumar B <ashwani.b.kumar@ericsson.com>
2017-07-19 08:00     ` Luan Huynh <nnhluan@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox