trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anoop Sharma <>
Subject RE: How to rename schema name quickly
Date Sat, 30 Jun 2018 04:16:19 GMT
  that operation is not supported as it is not a quick, metadata only change.

Every traf table under a schema <sch> has corresponding hbase object of form: TRAFODION.<sch>.<tab>.
Which means that all physical HBase objects need to be renamed/copied to the other
name of the form TRAFODION.<schnew>.<tab>.

In addition, all metadata entries where names are stored will also need to be renamed.
This includes view text, constraint text, etc.
In fact, a table rename operation is not allowed if there are views/check_constraints on it.
 So bottom line. Renaming a schema, even if allowed, is an expensive operation assuming
there are no dependent objects on it.

  You should generate a script what has 'alter table rename' clause for all tables in that
schema. And then obey  that script. If there are dependent objects, they will need to be dropped
and recreated.


From: Liu, Yuan (Yuan) <>
Sent: Friday, June 29, 2018 7:30 PM
Subject: How to rename schema name quickly

Hi Trafodioneers,

I want to modify a schema name, but it seems we don't support below syntax.

>>alter schema aaa rename to bbb;

*** ERROR[3242] This statement is not supported. Reason: Cannot rename a schema.

I have a lot of tables under the schema, do we have a quick approach to rename schema name?

Best regards

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