Useful shortcuts for vi editor

Showing posts with label dbid. Show all posts
Showing posts with label dbid. Show all posts

Tuesday 25 July 2017

e.g. changing the DBID and Database Name

e.g.
Backup database
RMAN> backup database

Mount database
SQL> shu immediate;
SQL> startup mount;

Change DBID
$ nid TARGET=SYS

or

Change both DBID and DBNAME
$ nid TARGET=SYS DBNAME=new_xe

Change database name from parameter file (init.ora)
*.db_name='NEW_XE'

Mount database again
SQL> startup mount;

Open database
SQL> alter database open resetlogs;

Ref: https://docs.oracle.com/database/121/SUTIL/GUID-05B4733C-9EAA-438F-A2A4-4E84EB1E1E65.htm#SUTIL1544s