Amazium bvba, your online partner
Move database to another dbspace
  • Share post with Twitter
  • Share post with StumbleUpon
  • Share post with Delicious
  • Share post with Digg
  • Share post with Technorati
  • Share post with Blinklist
2008-08-31 23:20

Move database to another dbspace

dbspace, informix

I recently encountered a problem where we had accidentally created a new database in the root dataspace. We only found out about this after receiving a lot of out-of-space errors. Here is how we moved it to the proper dbspace.

(perform at your own risk, we're not responsible for possible problems)

# Create a temp directory and export the DB

su - informix
mkdir /tmp/export
cd /tmp/export
dbexport name_of_db_to_move

# Drop the DB

dbaccess
> press D for database
> press D for drop
> choose name_of_db_to_move
> confirm Y

# Import the database into the correct dbspace

dbimport -d name_of_correct_dbspace name_of_db_to_move

It's as simple as that.

Add a Comment

Your email is never published or shared. Required fields are marked*