SQL> SELECT NAME FROM V$DATABASE;
Name
-------
localdb
sql>shutdown immediate
Oracle instance shutdown.
sql>startup mount
database mounted.
NID: it’s a naming utility; you can able to change your database name and database id.
C:\>nid help=y
DBNEWID: Release 10.2.0.1.0 - Production on Mon May 14 10:48:33 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Keyword Description (Default)
----------------------------------------------------
TARGET Username/Password (NONE)
DBNAME New database name (NONE)
LOGFILE Output Log (NONE)
REVERT Revert failed change NO
SETNAME Set a new database name only NO
APPEND Append to output log NO
HELP Displays these messages NO
Here, I have change my database name using NID utility.
C:\>NID TARGET=SYS/sys@localdb DBNAME=local SETNAME=Y
DBNEWID: Release 10.2.0.1.0 - Production on Mon May 14 10:37:36 2007Copyright (c) 1982, 2005, Oracle.
All rights reserved.Connected to database TAJ (DBID=1565772587)Connected to server version 10.2.0Control Files in database:
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\CONTROL01.CTL
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\CONTROL02.CTL
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\CONTROL03.CTL
Change database name of database localdb to local ? (Y/[N]) => Y Proceeding with operationChanging database name from localdb to local
Control File F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\CONTROL01.CTL - modifiedControl File
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\CONTROL02.CTL - modifiedControl File
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\CONTROL03.CTL - modifiedDatafile
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\SYSTEM01.DBF - wrote new nameDatafile
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\UNDOTBS01.DBF - wrote new nameDatafile
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\SYSAUX01.DBF - wrote new nameDatafile
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\USERS01.DBF - wrote new nameDatafile
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\EXAMPLE01.DBF - wrote new nameDatafile
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\RMAN01.DBF - wrote new nameDatafile
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\TEMP01.DBF - wrote new nameControl File
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\CONTROL01.CTL - wrote new nameControl File
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\CONTROL02.CTL - wrote new nameControl File
F:\ORACLE\PRODUCT\10.2.0\ORADATA\localdb\CONTROL03.CTL - wrote new nameInstance
shut downDatabase name changed to local.Modify parameter file and generate a new password file before restarting.Succesfully changed database name.DBNEWID - Completed succesfully
c:\>oradim -new -sid local
instance created.
c:\>net start oracle servicelocal
service started.
c:\>set oracle_sid=local
c:\>slplus /nolog
sql>conn sys as sysdba
enter new password: sys (choice)
connected to idle instane.
You should check your parameter file and modify it. and replace local instead of localdb
sql>startup mount
database mounted.
Note :- ora-02778 : Name given for the log directory is invalid. In this case, you should check your parameter file name
sql>alter database open;
database opened.
sql>select name from v$database;
Name
----------
local
Getting IP Address of DB Server
1 day ago
0 comments:
Post a Comment