on 05-25-2015 9:59 AM
Dear Experts,
I'm facing a problem about data storage & Database management.
I need to "drop" a table with huge data inside, avoiding the use of the SE14 or Database Utility, but using another table and rename one into another.
To let you understand better my point of view:
I want to:
Rename TableA as TableC
Rename TableB as TableA
Rename TableC as TableB
Rename primary indexes from TableA~0 to TableC~0,
Rename primary indexes from TableB~0 to TableA~0,
Rename primary indexes from TableC~0 to TableB~0.
Is it possible to use FMs DB_RENAME_TABLE and DB_RENAME_INDEX? And - if so - how?
Thanks a lot,
Fabio
Hi Ganesh,
I've never said that tableC exists .
I've only two tables and use TableC (not exists) as temporary name.
But my question was about the right use of FMs and the way to fill data inside them.
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes Fabio.
It's only needed to put tables/Indexes and then F8. Once its executed verify the objects in Data dictionary.
Example:
Old table: ZTABLEB
New Table: ZTABLEZ
After the rename of the table, Login to system with DDIC user on client 000.
Goto t-code SE14 and enter new table name ZTABLEZ and edit option
from menu -> Table -> Reconstruct
then Goto t-code SE11 and activate your new table.
If you have any doubts, create one Z* table and rename to perform test to avoid conflict of doing changes on live table.
Hope this helps.
Regards,
Ganesh
Hi Fabio,
Renaming tables and indexes are possible with mentioned function modules. However, your approach is not possible as TableA can't be renamed when TableC exists.
Your approach should in two steps for each object.
1st step :
Rename TableA as TableC1
Rename TableB as TableA1
Rename TableC as TableB1
2nd Step:
Rename TableC1as TableC
Rename TableA1 as TableA
Rename TableB1 as TableB
Same approach for Indexes.
Make sure these tables are not in use.
Hope this helps.
Regards,
Ganesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.