Switching between Local and Automatic Segment Management [message #280739] |
Wed, 14 November 2007 11:11 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Hi folks,
What is the best way to convert from local to automatic segment management?
I know searching that you cannot simply switch between the two management types.
My thoughts are to create a new tablespace that is automatically managed and do an export/import (or something else?) from the locally managed tablespace and then offline the locally managed tablespace and online the automatic one.
I'm not sure of the advantages/disadvantages of this plan or if there is a better way to do it.
Any advice is appreciated.
Thanks!
|
|
|
|
|
Re: Switching between Local and Automatic Segment Management [message #280757 is a reply to message #280747] |
Wed, 14 November 2007 12:35 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Is there a single command to move the entire tablespace to another tablespace?
The options that I am considering now are:
* ALTER TABLE MOVE of every table in the tablespace
-This command will require rebuilding of indexes
-I'm not certain how triggers will be affected
* export/import of every table in the tablespace
-I'm not sure of the implications here.
Of course, indexes, triggers, packages/procedures/functions/etc. will all have to be moved. This is a pretty onerous task to do per object.
Any ideas?
Thanks!
|
|
|
|
|
|
|
|
|
Re: Switching between Local and Automatic Segment Management [message #282069 is a reply to message #281923] |
Tue, 20 November 2007 14:45 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
The script is quite large so I will just provide the relevant parts:
DBMS_SQL.PARSE (grant_cur, '' REVOKE UPDATE ON "OPS$AEM"."RS3_STRUCTURE_QUERY" FROM "AEM_USER"'', DBMS_SQL.NATIVE);
...
DBMS_SQL.PARSE (grant_cur, '' REVOKE UPDATE ON "OPS$AEM"."RS3_STRUCTURE_QUERY" FROM "AEM_USER"'', DBMS_SQL.NATIVE);
For anyone else who runs into this problem I just edited the script to revoke updates on the entire table - the answer to my earlier question about whether it's a compatibility issue seems to be "no".
Editing the script should be OK because with a tablespace reorganization the script puts all the existing data into a new tablespace and then back into the old one. Thus, all the revoked permissions will be re-added.
At least, so is my understanding.
|
|
|
|
|
Re: Switching between Local and Automatic Segment Management [message #287725 is a reply to message #282069] |
Thu, 13 December 2007 04:55 |
hexmanju
Messages: 78 Registered: September 2005 Location: MUMBAI
|
Member |
|
|
Hi
Here in this Statement that you have written to parse
DBMS_SQL.PARSE('REVOKE ...................'),say i use cursor and make it
DBMS_SQL.PARSE(CUR,''REVOKE ...................'),Is it necessary to again execute the Cursor as i belive it will execute for DDL and DCL at parse time itself.
Thanks
MM
|
|
|