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 > DB2 > Moving system tablespaces

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-05-04, 04:49
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Red face Moving system tablespaces

Hi guys - AIX 5.2. DB2 8.1.4

I really need to move my syscatspace, userspace and tempspace.

They're all located on /saswork/ in separate folders. (I was young and stupid)

Can I move them by adding a new container and reorganising, and then
remove the old containers? - or is there a special script/db2 function to take
care of the problem.

I sincerely hope that I won't have to do a redirected restore.

Cheers
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #2 (permalink)  
Old 05-05-04, 04:54
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Have a look at db2relocatedb command ...

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 05-05-04, 05:16
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Talking Nodenumber

Thanks a lot Sathyaram,

Great tool - one thing remains:

DB_NAME=oldName,newName
| DB_PATH=oldPath,newPath
| INSTANCE=oldInst,newInst
| NODENUM=nodeNumber
| LOG_DIR=oldDirPath,newDirPath
| CONT_PATH=oldContPath1,newContPath1
| CONT_PATH=oldContPath2,newContPath2

What do I specify for Nodenumber??, my db is cataloged as indirect
and is not attached to any node (that I know of)

Thank You!!
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #4 (permalink)  
Old 05-05-04, 06:02
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
NODENUM is only when you are using DPF ... (I assume you are not using DPF) Otherwise you don't need it ...
Only DBNAME,DBPATH and INSTANCE are mandatory parms

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 05-10-04, 11:13
rng rng is offline
Registered User
 
Join Date: Mar 2004
Posts: 6
Question

Hi:
I want to move a database from one instance to another instance.
Documentation says that I need to: Move the files in the directory /dbpath/FromInstance to |/dbpath/ToInstance.

What files are they refering? Are they are refering to directory SQL0000X where x is database number?

Can you give more details on how it can be done on AIX, ver 8.1


[Great tool - one thing remains:

DB_NAME=oldName,newName
| DB_PATH=oldPath,newPath
| INSTANCE=oldInst,newInst
| NODENUM=nodeNumber
| LOG_DIR=oldDirPath,newDirPath
| CONT_PATH=oldContPath1,newContPath1
| CONT_PATH=oldContPath2,newContPath2

What do I specify for Nodenumber??, my db is cataloged as indirect
and is not attached to any node (that I know of)

Thank You!![/QUOTE]
Reply With Quote
  #6 (permalink)  
Old 05-11-04, 03:24
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
I think you are right ... copy the SQL0000X directory to the new path ...

Node number is optional (only valid for DPF) , so need not worry ...

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #7 (permalink)  
Old 05-11-04, 04:07
cgprakash cgprakash is offline
Registered User
 
Join Date: Feb 2002
Posts: 96
This utility looks great.

Can we use this to spread the tablespace containers?
eg, move
from "/data/e1/prd'100000"
to "/data/e1/prd'20000,/data/e2/prd'20000,/data/e3/prd'20000,/data/e4/prd'20000,/data/e5/prd'20000"

Thanks in advance
Prakash
Reply With Quote
  #8 (permalink)  
Old 05-11-04, 04:20
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
AFAIK, it is not possible ...
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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