Skip to Content

Recently I had many problems with renaming tablespaces. So I decided to share my experience!

Pre: materialize all virtual tables!

I.

You can use the db2 command:

RENAME TABLESPACE {OLD_NAME} TO {NEW_NAME}

and execute it for every tablespace. It is better to make a script!

II.

After that you have to alter tables:

TADB6, TSDB6 and IADB6

with the new tablespace names.

I used the DB2 client (DB2 control center) for that because I couldn’t make it through SAP.

That should do it!

The Problems!

1. If you have virtual tables when renaming, you will realize that they can’t materialize after you renamed all the tablespaces.

To solve that follow note 1227165, which is: execute in command prompt:

db6util -rtvt {old tbs} {new tbs}

for every tablespace.

2. If you have run SPAM or SAINT before altering the three tables (TADB6, TSDB6 and IADB6), you will see that it will halt at phase IMPORT_PROPER, and will give you an error, because it is trying to connect to the old tablespaces.

To solve that, you have to alter the three tables of course, but it is not enough. Because SPAM/SAINT already created commands using the data from the three tables (i.e. old tablespace names).

You have to alter table:

TATAF

and replace all old names with the new ones.

Many thanks to these people here:

http://forums.sdn.sap.com/thread.jspa?threadID=619392


To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply