Link to home
Start Free TrialLog in
Avatar of partminer
partminer

asked on

Rename the db2 database in windows - using db2relocatedb command

Hi,

Can you please let me know from which (location) we need to keep configuration file while executiing db2relocate command in windows.
Because I am getting  'db2relocatedb must be run under instance db2inst1." .

Can you please let me know how to execute db2relocatedb in windows.
Anyone of you could please advice.Look forward for your response.Thank you.
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

can you post here what you are trying to do and what is the error you get?
Avatar of partminer
partminer

ASKER

Hi,

I need to rename the databse TESTDB to NEWDB.Db2 is installed on windows.When I try to rename using relocatedb utility, I am gettting the below error.

I am executing  the following command  from H:\programfiles\sqllib\bin directory

db2relocatedb -f db2config.cfg I am getting the below error.

'db2relocatedb must be run under instance db2inst1." .

Can you please help me how to rename my database?thank you
SOLUTION
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
DB_NAME=TESTDB,NEWDB
DB_PATH=H:
INSTANCE=db2inst1
Hi,

Got It, I have INSTANCE as db2inst1.When i execute db2ilist , I got DB2.hence I changed instance name to DB2 from db2inst1.it worked fine.

Thank you for all your help.
Dear Momi,

By mistake I have uncatalogued the database and I cannot see the database ,when I try to catalog it is saying 'database not found in the local database directory".I need to recover the uncataloged database.

Can you please help me how to recover the uncatalogued database.Please...
Hi anyone,

Can you please let me know how can i restore the database where it was before I ran db2relocatedb command.Please help me.
Dear DB2 Gurus,

I have a scenario where I have to rename the databases TESTDB to NEWDB and NEWDB to TESTDB.Could any one of you please advice me how can I do this in db2 installed on windows.

Any help is greatly appreciated.Thank you !
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your response.It worked great.
so please close the question
Hi Admin,

i am not able to close the question, please close the question.
just grant the points to the best answer you recieved