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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table rebuild - what happens to synonyms?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi,
We have severe problems with some of our tables having reached nearly 200 extents, so I am having to do an urgent rebuild. My method is:
unload data using sql command unload table to file
select * from table;
dbchema on the table to gather index/grants info.
drop/rename existing table
recreate with new initial and next extents
dbload data back in.

(I really want a new initial extent, hence not using onunload/onload)

My problem is that dbschema does not cope with synonyms - if I have synonyms created in a different database within the same informix server which reference the table to be dropped for instance.
Are there any tables in sysmaster database which show all synonyms created against a table, regardless of the database it resides in? Or is there any other way in which I can ensure I have all synonyms before I drop the table and lose all synonyms associated?

Thank you!
 
Haha! I have answered my own question - you can use "dbschema -s all" against all other databases in a server for relevant tables and this will produce the sql statements to recreate synonyms.
s-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top