Document Type | Technical Information
Category | Administration
Applicable Product Versions | Tibero5, Tibero6, Tibero7
Document Number | TADTI206
Overview
This document is a guide that summarizes the procedure for changing the DB_NAME in the Tibero environment.
Changing DB_NAME is only possible in MOUNT mode, and in a TAC environment, the service and DB configuration must be redefined.
Pre-Work Checks
Check the business impact before starting the work and secure the inspection time.
- DB_NAME change work can only be performed in MOUNT mode.
- In a TAC environment, the rename operation must be performed on only one node, and the other nodes must remain down.
- After completion, the configuration files and service setup must be changed without fail.
Method
Check Current DB_NAME
tbsql sys/tibero
select name from v$database;
Change DB_NAME After Starting in MOUNT Mode
Single Instance Environment
tbdown immediate
tbboot mounttbsql sys/tibero
alter database rename to "test";TAC Environment
Note: The rename operation must be performed only on server #1, and server #2 must remain down.
#1 Server
tbdown immediate
tbboot mounttbsql sys/tibero
alter database rename to "test";
#2 Server
tbdown immediate
Modify Configuration Files
$TB_SID.tip File Modification
Common for Single/TAC
In TAC environment, modify on both server #1 and #2
DB_NAME=testtbdsn.tbr File Modification
If the connection service name depends on DB_NAME, modify it together.
In TAC environment, apply the same changes on all nodes
Restart and Service Configuration
Single Instance Environment
tbdown
tbbootVerification
select name from v$database;TAC Environment
#1 Server (Service Reconfiguration)
Delete the existing service, then add a new service and register the DB
cmrctl del service --name tac
cmrctl add service --name test --cname cluster1 --type db
cmrctl add db --name tac1 --svcname test --dbhome $TB_HOME --envfile /home/tac/.bash_profile
tbbootVerify DB_NAME change
tbsql sys/tibero
select name from v$database;
#2 Server (DB Registration)
Since the new service (test) is already created on server #1, only add the DB on server #2.
cmrctl add db --name tac2 --svcname test --dbhome $TB_HOME --envfile /home/tac/.bash_profile
tbbootVerify DB_NAME change
tbsql sys/tibero
select name from v$database;
Notes (TAC Environment)
DB rename operation is performed only on server #1.
- Server #2 must remain down during the rename operation.
- Service deletion and creation are performed only on server #1.
- Configuration files ($TB_SID.tip, tbdsn.tbr) must be applied identically to all nodes.