Hi All,
In this blog I will show you on "How to move SAP DB2 database files from one location to other.
In our case we are facing drive/disk full issue and this can resolved by moving few of the DB files from one drive to another.
Please make sure that source and target drive format is same.
Steps are mentioned below:
Step 1: Stop SAP.
Step 2: Login to the server using db2
Step 3: Take Offline backup for database and also OS level backup(Recommended).
Step 4: Stop database.
>db2stop force
Step 5: Open command prompt and move to the kernel location. Generate script file using below command,
>brdb6brt -s -bm RETRIEVE_RELOCATE
eg: brdb6brt -s ST1 -bm RETRIEVE_RELOCATE
Step 8: Create directory structure where you want to place sapdata. And copy the content from old storage location.
Step 10: Rename the file back _NODE0000.clp to _NODE0000.scr.
Step 11: move to the location where the script file is copied and Execute the below command,
db2relocatedb -f_NODE0000.scr
eg: db2relocatedb -f ST1_NODE0000.scr
Step 12: Now we can delete or rename old storage location,
In this blog I will show you on "How to move SAP DB2 database files from one location to other.
In our case we are facing drive/disk full issue and this can resolved by moving few of the DB files from one drive to another.
Please make sure that source and target drive format is same.
Steps are mentioned below:
Step 1: Stop SAP.
Step 2: Login to the server using db2
Step 3: Take Offline backup for database and also OS level backup(Recommended).
Step 4: Stop database.
>db2stop force
Step 5: Open command prompt and move to the kernel location. Generate script file using below command,
>brdb6brt -s
eg: brdb6brt -s ST1 -bm RETRIEVE_RELOCATE
Step 6: Move the script file to the location where offline backup is taken.
Step 7: Rename the script file _NODE0000.scr to _NODE0000.clp so that we can edit the file.
Step 8: Create directory structure where you want to place sapdata. And copy the content from old storage location.
Here is the example above, the files from sapdata3 and sapdata4 are moved from D Drive to F Drive, so we copied the files after creating similar directory structure(D:\db2\SID to F:\db2\SID) and copied the content from parent location to target location.
Step 9: Open the file SID_NODE00000.clp in an editor, and modify the storage as shown below,
STORAGE_PATH=,
Eg: STORAGE_PATH=D:\db2\ST1\sapdata4,F:\db2\ST1\sapdata4
Step 11: move to the location where the script file is copied and Execute the below command,
db2relocatedb -f
eg: db2relocatedb -f ST1_NODE0000.scr
Step 12: Now we can delete or rename old storage location,
Step13: Start SAP and DB now and check the new location from DB13 transaction.
Thanks,
Sharib Tasneem
Note: Please try this your own risk. This blog is only intended for sharing knowlodge only. Not to be used in production landscape.
Hey very nice blog!!
ReplyDeleteHi there,I enjoy reading through your article post, I wanted to write a little comment to support you and wish you a good continuationAll the best for all your blogging efforts.
Appreciate the recommendation! Let me try it out.
Keep working ,great job!
Hadoop online training
Thanks.
DeleteDear friend. I truly just like your posting and your current web page all in all! That write-up is really plainly composed
ReplyDeleteand without difficulty understandable. Your Wordpress style is awesome as well! Would be awesome to discover exactly where
My partner and i are able obtain this. Please hold up the very good work. We all need much more this kind of website
owners just like you on the web and much less spammers. Wonderful man!
Bigdata training
Thank you for the article.
ReplyDeletewww.sapbasisinfo.com