If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > How-to change database's default dbspace

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-23-07, 13:45
archer_kit archer_kit is offline
Registered User
 
Join Date: Sep 2005
Posts: 1
How-to change database's default dbspace

I've created a new database in Informix IDS9.30 without using the "IN <dbspace>" clause in the "CREATE DATABASE" statement. Hence, it caused all tables for this database being created into the rootdbs (the default dbspace) automatically. As the result, I have been forced to add more chunks onto rootdbs when my database growth.

Is there any methods to reset/modify the DATABASE's default dbspace (rootdbs) to other dbspace? FYI, due to my application limitation, I can't set the dbspace in each "CREATE TABLE" statement and have to reliant on the database's default dbspace. Any idea?

Please advise and thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 10-28-07, 16:06
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
Hi,

The only supported action is (I think) to dbexport (better to use the -ss option) the whole database and import it again with dbimport. dbimport has an option to specify the database default dbspace. Just do dbimport -- and it will show you the syntax.

Greetz,

RobP
Reply With Quote
  #3 (permalink)  
Old 10-29-07, 03:02
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
But this doesn't solve the problem of creating additional tables with application when you have database created in rootdbs.

In IDS 8x(XPS) there was(still is?) onconfig parameter DEFAULT_DBSPACE but I don't know about something similar in IDS. It looks like you will have to use "IN" clause in the "CREATE TABLES" statement.
Reply With Quote
  #4 (permalink)  
Old 10-30-07, 07:16
nitin_math nitin_math is offline
Registered User
 
Join Date: Nov 2004
Posts: 143
Hi,

When you dbimport the database, use -d <dbspace_name>. This will force the new tables to be created in dbspace_name if you do not specify the dbspace name in create table syntax.

I hope this helps.

regards,

Nitin
Reply With Quote
  #5 (permalink)  
Old 11-23-07, 05:44
theeiledon theeiledon is offline
Registered User
 
Join Date: Nov 2004
Posts: 60
Cool

Remember to create the indexes in a different dbspace too!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On