dbTalk Databases Forums  

Change dbspace assignment ....

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Change dbspace assignment .... in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nicola Cisternino
 
Posts: n/a

Default Change dbspace assignment .... - 10-14-2009 , 08:58 AM






Hi all,
How can I change the dbspace assignment of table without RE-CREATE it ?
.... consider that this table has many Referencing tables ....
Thanks.
Nicola.

Reply With Quote
  #2  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: Change dbspace assignment .... - 10-16-2009 , 09:13 AM






You will pretty much need to recreate it one way or another.

Probably the cleanest approach is to create your dbspace
and then manually rebuild the database, stopping to alter
the reload.sql file to add the 'ON DBSPACE' clause to
your create table statement. That approach will recover
space from you old table and that will shrink your SYSTEM
dbspace size while automatically moving the data to the
new dbspace.

Short of that you will need to deal with all those referencing
tables somehow. One way may be to do this in steps,
creating a new table (with a new table name), add references
to the new table, move the data across, drop the old references
to the old table, and then drop the old table. (one step at a
time, one reference at a time) Of course you will need to
also address the application requirements (which may not
follow such a table name change) so you may find you
need to rename the target table as well (alter table rename stmt).



"Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote

Quote:
Hi all,
How can I change the dbspace assignment of table without RE-CREATE it ?
... consider that this table has many Referencing tables ....
Thanks.
Nicola.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.