Thanks Anoop.
Best regards 刘源(Yuan) 上海易鲸捷信息技术有限公司 地址:上海市浦东新区金科路2889号长泰广场A座603 手机:13671935540 邮箱:[email protected] -----Original Message----- From: Anoop Sharma <[email protected]> Sent: Saturday, June 30, 2018 12:16 PM To: [email protected]; [email protected] Subject: RE: How to rename schema name quickly hi 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. anoop From: Liu, Yuan (Yuan) <[email protected]> Sent: Friday, June 29, 2018 7:30 PM To: [email protected]; [email protected] 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 Yuan
