时不我待。
分类: Oracle
2009-02-04 11:57:28
SQL> show parameter instance_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ stance_name string ORATEST SQL> show parameter db_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string ORATEST SQL>show parameter service_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string ORATEST SQL>select dbid from v$database; DBID ---------- 3213300265 |
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount Total System Global Area 268435456 bytes Fixed Size 1261272 bytes Variable Size 117440808 bytes Database Buffers 146800640 bytes Redo Buffers 2932736 bytes Database mounted. SQL> host; $ nid target="sys/password" dbname=test DBNEWID: Release 10.2.0.3.0 - Production on Wed Feb 4 11:12:36 2009 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to database ORATEST (DBID=3213300265) Connected to server version 10.2.0 Control Files in database: /u02/oradata/test/control01.ctl /u02/oradata/test/control02.ctl /u02/oradata/test/control03.ctl Change database ID and database name ORATEST to TEST? (Y/[N]) => y Proceeding with operation Changing database ID from 3213300265 to 1976074532 Changing database name from ORATEST to TEST Control File /u02/oradata/test/control01.ctl - modified Control File /u02/oradata/test/control02.ctl - modified Control File /u02/oradata/test/control03.ctl - modified Datafile /u02/oradata/test/system01.dbf - dbid changed, wrote new name Datafile /u02/oradata/test/undotbs01.dbf - dbid changed, wrote new name Datafile /u02/oradata/test/sysaux01.dbf - dbid changed, wrote new name Datafile /u02/oradata/test/users01.dbf - dbid changed, wrote new name Datafile /u02/oradata/test/example01.dbf - dbid changed, wrote new name Datafile /u02/oradata/test/temp01.dbf - dbid changed, wrote new name Control File /u02/oradata/test/control01.ctl - dbid changed, wrote new name Control File /u02/oradata/test/control02.ctl - dbid changed, wrote new name Control File /u02/oradata/test/control03.ctl - dbid changed, wrote new name NID-00600: Internal Error - [28] [12152] [0] [0] Change of database name and ID failed during validation - database is intact. DBNEWID - Completed with validation errors. |
SQL> startup mount ORACLE instance started. Total System Global Area 268435456 bytes Fixed Size 1261272 bytes Variable Size 121635112 bytes Database Buffers 142606336 bytes Redo Buffers 2932736 bytes ORA-01103: database name 'TEST' in control file is not 'ORATEST' SQL> alter system set db_name=test scope=spfile; System altered. SQL> SQL> shutdown immediate ORA-01507: database not mounted ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 268435456 bytes Fixed Size 1261272 bytes Variable Size 125829416 bytes Database Buffers 138412032 bytes Redo Buffers 2932736 bytes Database mounted. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open SQL> show parameter db_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string TEST SQL> show parameter instance_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ instance_name string ORATEST SQL> show parameter service_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string TEST SQL> alter database open resetlogs ; Database altered. SQL> SQL> select dbid from v$database; DBID ---------- 1976074532 SQL> |