数据库名称修改

数据库名称修改
shutdown immediate
startup mount
host nid target=sys/itsys setname=test1 dbname=test1
shutdown immediate
host orapwd file=/u/oracle/product/9.2.0/dbs/orapwtest1 password=manager entries=5

修改initSID.ora文件
修改环境变量
修改tnsnames.ora
startup nomount
CREATE CONTROLFILE REUSE DATABASE "ora9i" RESETLOGS  NOARCHIVELOG
--  SET STANDBY TO MAXIMIZE PERFORMANCE
    MAXLOGFILES 5
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 1
    MAXLOGHISTORY 56
LOGFILE
  GROUP 1 '/u/oracle/oradata/ora9i/redo01.log'  SIZE 10M,
  GROUP 2 '/u/oracle/oradata/ora9i/redo02.log'  SIZE 10M,
  GROUP 3 '/u/oracle/oradata/ora9i/redo03.log'  SIZE 10M
-- STANDBY LOGFILE
DATAFILE
  '/u/oracle/oradata/ora9i/system01.dbf',
  '/u/oracle/oradata/ora9i/undotbs1.dbf',
  '/u/oracle/oradata/ora9i/cwmlite01.dbf',
  '/u/oracle/oradata/ora9i/drsys01.dbf',
  '/u/oracle/oradata/ora9i/example01.dbf',
  '/u/oracle/oradata/ora9i/indx01.dbf',
  '/u/oracle/oradata/ora9i/odm01.dbf',
  '/u/oracle/oradata/ora9i/tools01.dbf',
  '/u/oracle/oradata/ora9i/users01.dbf',
  '/u/oracle/oradata/ora9i/xdb01.dbf',
  '/u/oracle/oradata/ora9i/system02.dbf',
  '/u/oracle/oradata/ora9i/channel_sys.dbf'
CHARACTER SET UTF8;

ZHS16GBK;

SQL> alter database open resetlogs;

完成

特别要注意的是所有的数据文件名必须改为带.dbf的扩展名 ,否则不能成功修改

你可能感兴趣的:(数据库名称修改)