Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

move a table from one dbspace to another

Status
Not open for further replies.

noober

IS-IT--Management
Oct 10, 2003
112
US
I need to move a table (and its index) from one dbspace to another due to some size limitations in the original space. Luckily its a temp table, so I am thinking that the simplest solution is to schema the table out, drop it and rebuild it in the new dbspace.

Am I shooting myself in the foot or is it really this simple?

Running ids 9.2 on aix 4.3 if it matters.
 
Hi,

Sorry, if I'm mistaken, and correct me if possible that, when you say it's a "temp table", that you wish to relocate in a differenet dbspace. In schema layout temp tables are not mapped and are specific to each sessions, similar to unix $PPID kind. It must be a base table that you are referring to. Or it could be "raw type" table too.

For relocating it, follow steps:
1. Unload the data.
2. dbschema -d testdb -t tablex > tablex.sch
3. dbschema -d testdb -p all | grep "tablex" > tablex.auth -- gathers all authentication related permissions.
4. Ascertain if tablex is related as "child" table to other "parent" tables.
5. Drop the original table.
6. Edit these files and, relocate the object using "IN" clause.
7. Reimpose permissions and relations.
8. Don't forget to fire update statistics!

Regards,
Shriyan
 
Sorry Shriyan,
I said "temp" table but that was my own mental shorthand. Its a normal, permanent table but we use it like a temp table, populating it and truncating it as needed.

Thanks for the clear direction!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top