trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Smits <pierre.sm...@gmail.com>
Subject Re: Dumping a schema
Date Wed, 08 Mar 2017 10:22:26 GMT
Hi Suresh, all,

What I am looking for, and which I think will help adoption of our product,
is an equivalent to the PostgreSQL pq_dump (see [1]) or the MySQL mysqldump
 funcitons, and the subsequent import functions.

While testing at PURGEDATA function within the sqlci in my OFBiz-Trafodion
PoC environment I didn't see any output. The SHOWDLL function delivered me
a set of create statements for a table (including those for associated
indexes)

But I did not see how to export this to a script file.

[1] https://www.postgresql.org/docs/9.1/static/app-pgdump.html

Best regards,

Pierre Smits

ORRTIZ.COM <http://www.orrtiz.com>
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Tue, Mar 7, 2017 at 6:06 PM, Suresh Subbiah <suresh.subbiah60@gmail.com>
wrote:

> Hi Pierre,
>
> I think PURGEDATA will do the first three steps, while loading new data
> will have to be done as usual. Now PURGEDATA is for a single table at a
> time, so it have to be repeated for every table.
>
> For example
>
> PURGEDATA <table-name> ;
> LOAD INTO <table-name> SELECT * FROM <source-table-name> ; //
> <source-table-name> can refer to HBase or Hive table
> // other load statements can be used if source data in text files.
>
> Trafodion also has a DROP SCHEMA <schema-name> CASCADE statemet, that will
> drop all tables and indexes in a schema. But steps two to four would have
> to be done separately.
>
> SHOWDDL <table-name> ;
> on each table in the schema can be done before the DROP SCHEMA cascade. The
> resulting log file can then be obeyed to recreate tables/indexes and set
> permissions.
>
> For example
>
> log ddl.txt ;
> SHOWDDL <table1> ;
> SHOWDDL <table2> ;
> ....
> log ;
> DROP SCHEMA <schema-name> CASCADE ;
>
> CREATE SCHEMA <schema-name> ;
> OBEY ddl.txt ;
> LOAD INTO <table1> .... ;
> LOAD INTO <table2> .... ;
>
> Thank you
> Suresh
>
> On Tue, Mar 7, 2017 at 7:47 AM, Pierre Smits <pierre.smits@gmail.com>
> wrote:
>
> > Hi all,
> >
> > Is there in Trafodion an equivalent for dumping a schema, that consist
> of:
> >
> >    - dropping the table(s) on exist,
> >    - creating the table(s) and index(es),
> >    - setting the permissions,
> >    - loading the data
> >
> > Best regards,
> >
> > Pierre Smits
> >
> > ORRTIZ.COM <http://www.orrtiz.com>
> > OFBiz based solutions & services
> >
> > OFBiz Extensions Marketplace
> > http://oem.ofbizci.net/oci-2/
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message