Oracle修改db_name方法
------- 修改数据库db_name的方法SQL>startup mount
ORACLE instance started.
Total System Global Area413372416 bytes
Fixed>
Variable> Database Buffers 71303168 bytes
Redo Buffers 4308992 bytes
Database mounted.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition> With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
$ nid target=sys/yuanlei@orcl2 dbname=orcl
DBNEWID:> Copyright (c) 1982, 2009, Oracle and/or its affiliates.All rights reserved.
Connected to database ORCL2 (DBID=836865814)
Connected to server version 11.2.0
Control Files in database:
/u01/app/oracle/oradata/orcl2/control01.ctl
/u01/app/oracle/oradata/orcl2/control02.ctl
Change database> Proceeding with operation
Changing database> Changing database name from ORCL2 to ORCL
Control File /u01/app/oracle/oradata/orcl2/control01.ctl - modified
Control File /u01/app/oracle/oradata/orcl2/control02.ctl - modified
Datafile /u01/app/oracle/oradata/orcl2/system01.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/sysaux01.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/undotbs01.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/users01.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/example01.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/tbs_yl01.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/tbs_yl02.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/tbs_yl03.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/tbs_yl04.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/tbs_yl05.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/tbs_yl06.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/tbs_yl07.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/tbs_yl08.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/rcatalog.db - dbid changed, wrote new name
Datafile /u01/app/oracle/oradata/orcl2/temp01.db - dbid changed, wrote new name
Control File /u01/app/oracle/oradata/orcl2/control01.ctl - dbid changed, wrote new name
Control File /u01/app/oracle/oradata/orcl2/control02.ctl - dbid changed, wrote new name
Instance shut down
Database name changed to ORCL.
Modify parameter file and generate a new password file before restarting.
Database> All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and> DBNEWID - Completed succesfully.
页:
[1]