Document Type | Technical Information
Category | Administration
Applicable Product Versions | 6FS06, 6FS07, 6FS07PS, 7FS02, 7FS02PS
Document Number | TADTI038
Overview
This guide explains how to change the DB_NAME without rebuilding the database.
Method
1. Check current DB name
Example DB name (Before change: jh_tibero / After change: jh_tibero2)
SQL> SELECT INSTANCE_NAME, DB_NAME, HOST_NAME FROM V$INSTANCE; INSTANCE_NAME DB_NAME HOST_NAME -------------------- -------------------- -------------------- jh_tibero jh_tibero linux84
2. Shut down the instance
$ tbdown immediate Tibero instance terminated (IMMEDIATE mode).
3. Start in mount mode
$ tbboot mount Change core dump dir to /home/tibero/tibero7/bin/prof. Listener port = 8833 Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Tibero instance started up (MOUNT mode).
4. Change DB name
$ tbsql sys/tibero tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> ALTER DATABASE RENAME TO "jh_tibero2"; Database altered.
5. Shut down the instance
$ tbdown immediate Tibero instance terminated (IMMEDIATE mode).
6. Confirm DB_NAME change and apply
After changing the DB_NAME in the tip file to <new DB_NAME>, verify the DB_NAME in the tbdsn.tbr file.
$ cat $TB_HOME/config/$TB_SID.tip | grep DB_NAME
DB_NAME=jh_tibero2
$ cat $TB_HOME/client/config/tbdsn.tbr
jh_tibero=(
(INSTANCE=(HOST=localhost)
(PORT=8833)
(DB_NAME=jh_tibero2)
)
)7. Start in NORMAL mode and verify DB name
$ tbboot Change core dump dir to /home/tibero/tibero7/bin/prof. Listener port = 8833 Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Tibero instance started up (NORMAL mode). $ tbsql sys/tibero tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> SELECT INSTANCE_NAME, DB_NAME, HOST_NAME FROM V$INSTANCE; INSTANCE_NAME DB_NAME HOST_NAME -------------------- -------------------- -------------------- jh_tibero jh_tibero2 linux84
Note
โป If you need to change TB_SID, use the following method.
Copy the existing tip file and rename it to <new_DB_name>.tip.
(For TAC environments, rename to <new_DB_name>1.tip)
If necessary, update TB_SID=<new_DB_name> in the .bash_profile.
(For TAC environments, set TB_SID=<new_DB_name>1.tip.)
Also change the existing DB_NAME entry to <new_DB_name> in the tbdsn.tbr file.