Oracle_sid
I tried to understand subtle differences btw instance_name,sid,db_unique_name,service_name.....gone through "http://www.dba-oracle.com/t_oracle_sid_instance_name_service_name.htm"..I have few questions..
1) Can "oracle_sid" & "select instance_name from v$instance" be different?
2)Can db_unique_name and service_names be different for a particular instance?
Regards,
Saikat
Saikat Banerjee wrote:
I tried to understand subtle differences btw instance_name,sid,db_unique_name,service_name.....gone through "http://www.dba-oracle.com/t_oracle_sid_instance_name_service_name.htm"..I have few questions..
1) Can "oracle_sid" & "select instance_name from v$instance" be different?Please check
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:318216852435
2)Can db_unique_name and service_names be different for a particular instance?
Refer to
http://docs.oracle.com/cd/B12037_01/server.101/b10755/initparams054.htm
Oracle SID & SERVICE_NAME
Similar Messages
-
Problem with ORACLE_SID
I am not able startup a database in nomount state for particular ORACLE_SID. It seems it doesn't like the ORACLE_SID I set to.
It's throwing following error
ORA-07345: The datafile name must not contain the string '..'.
Steps I did like follows
1) export ORACLE_SID=ABC
2) I have init.ora, which has DB_NAME=ABC
3) startup nomount pfile='/export/home/oracle/init.ora'
It works great and puts db in nomount state
But, when I change ORACLE_SID=XYZ and edited init.ora with
DB_NAME=XYZ, then did
startup nomount pfile=''/export/home/oracle/init.ora', then it throws following error
ORA-07345: The datafile name must not contain the string '..'.Normally the init.ora file is init<$ORACLE_SID>.ora
i.e. initABC.ora
Are you sure that you are trying to start ABC with the correct initialization file? -
Export ORACLE_SID not working correctly
I have an 11g database on red hat linux and when I initially log into the machine as the Oracle user and do and export ORACLE_SID when I do a sqlplus / as sysdba it doesnt pick up the the database I specified(in this situation lumtest). If I do an . oraenv though it picks up the correct database. I cant seem to see what is missing as I have provided a dump of the user environment before and after I do the . oraenv.
I thought . oraenv set the base home and path so I'm not sure what else I should look for.
[oracle@adorcl ~]$ env|grep -i oracle
USER=oracle
LD_LIBRARY_PATH=/opt/oracle/product/11.2.0/dbhome_1/lib
ORACLE_SID=lumtest
ORACLE_BASE=/opt/oracle/
MAIL=/var/spool/mail/oracle
PATH=/opt/oracle/product/11.2.0/dbhome_1//bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
PWD=/home/oracle
HOME=/home/oracle
LOGNAME=oracle
ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1/
[oracle@adorcl ~]$ . oraenv
ORACLE_SID = [lumtest] ?
The Oracle base for ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1 is /opt/oracle/
[oracle@adorcl ~]$ env|grep -i oracle
USER=oracle
LD_LIBRARY_PATH=/opt/oracle/product/11.2.0/dbhome_1/lib
ORACLE_SID=lumtest
ORACLE_BASE=/opt/oracle/
MAIL=/var/spool/mail/oracle
PATH=/opt/oracle/product/11.2.0/dbhome_1/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
PWD=/home/oracle
HOME=/home/oracle
LOGNAME=oracle
ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1929779 wrote:
I have an 11g database on red hat linux and when I initially log into the machine as the Oracle user and do and export ORACLE_SID when I do a sqlplus / as sysdba it doesnt pick up the the database I specified(in this situation lumtest). If I do an . oraenv though it picks up the correct database. I cant seem to see what is missing as I have provided a dump of the user environment before and after I do the . oraenv.
I thought . oraenv set the base home and path so I'm not sure what else I should look for.
[oracle@adorcl ~]$ env|grep -i oracle
USER=oracle
LD_LIBRARY_PATH=/opt/oracle/product/11.2.0/dbhome_1/lib
ORACLE_SID=lumtest
ORACLE_BASE=/opt/oracle/
MAIL=/var/spool/mail/oracle
PATH=/opt/oracle/product/11.2.0/dbhome_1//bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
PWD=/home/oracle
HOME=/home/oracle
LOGNAME=oracle
ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1/
[oracle@adorcl ~]$ . oraenv
ORACLE_SID = [lumtest] ?
The Oracle base for ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1 is /opt/oracle/
[oracle@adorcl ~]$ env|grep -i oracle
USER=oracle
LD_LIBRARY_PATH=/opt/oracle/product/11.2.0/dbhome_1/lib
ORACLE_SID=lumtest
ORACLE_BASE=/opt/oracle/
MAIL=/var/spool/mail/oracle
PATH=/opt/oracle/product/11.2.0/dbhome_1/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
PWD=/home/oracle
HOME=/home/oracle
LOGNAME=oracle
ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1
look at the value of ORACLE_HOME before and after you execute oraenv. ORACLE_HOME should not end with a slash.
ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1/
ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1 -
Oracle 10g Espress Edition and change ORACLE_SID
I had installed Oracle Database 10g Express Edition whith linux, fedora core 4.
I want to change the database name and oracle_sid.
Oracle Database XE Server install autimatically a database. The database name and SID is XE.Is there a reason that you want to change the database name, or you could simply change the service names ?
[oracle ~ XE]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 16 10:19:40 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SYS@XE SQL> show parameter db_name
NAME TYPE VALUE
db_name string XE
SYS@XE SQL> alter system set service_names = 'testdb';
System altered.
SYS@XE SQL> conn test/test@localhost/testdb
Connected.
TEST@localhost/testdb SQL> select * from global_name;
GLOBAL_NAME
XE
TEST@localhost/testdb SQL> -
Oracle Database Administrator's Reference
10g Release 2 (10.2) for UNIX-Based Operating Systems
Part Number B15658-05
ORACLE_SID
Function
Specifies the Oracle system identifier.
Syntax
A string of numbers and letters that must begin with a letter. Oracle recommends a
maximum of 8 characters for system identifiers. For more information about this
environment variable, refer to Oracle Database Installation Guide.
Example
SAL1
It should be mentioned that the ORACLE_SID can start with a plus when using automatic storage management
Example
+ASM1
Note that in the installation guide (ex: Oracle Database Installation Guide 10g Release 2 (10.2) for Linux x86-64 Part Number B15667-01), there is an example of a SID of 12 characters with a plus (+) in the middle
$ ORACLE_SID=OraDB10g+ASM
$ export ORACLE_SID
When the guide above recommends to have no more than 8 characters.
Kind regards
Laurent
Message was edited by:
Laurent Schneider
PS: I have thousands of databases and I want to give some rules. For example, I do not like underscores in SIDs. I think the 8 characters limitation is also goodhello everyone,
Can u provide me the info about this news.............my problem is that i have completed my 3 pappers of ocp 9i the 4th one PT is remaining .If this is expierd wht will happend with me and my cleared pappers................plz reply
i m waiting very much of reply.............tahnx in advance -
How do we know the ORACLE_SID
hi guys,
By using one query can we get the ORACLE_SID & the username loggedinto the database?
Please help gurus!SCOTT@demo102> select SYS_CONTEXT ('USERENV', 'SESSION_USER') "Use",
2 SYS_CONTEXT ('USERENV', 'DB_NAME') "DBName"
3 from dual;
Use
DBName
SCOTT
DEMO102
SCOTT@demo102> http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm#SQLRF06117
Nicolas. -
How to Set ORACLE_SID in a Multiple Database Server
Hi experts,
This server has 3 10.2.0.4 databases on Windows. Of course 1 of those is the default db.
When I need to oracle_sid to one of the non-default databases I have problems.
Just now I ran: set ORACLE_SID = ultrarpt
But echo %ORACLE_SID% still shows the default database (ultratst).
I'm sure this is easy - how can I point to this database and then confirm that ORACLE_SID is indeed referencing that database?
Thanks, johnuser629010 wrote:
Hi experts,
This server has 3 10.2.0.4 databases on Windows. Of course 1 of those is the default db.
When I need to oracle_sid to one of the non-default databases I have problems.
Just now I ran: set ORACLE_SID = ultrarpt
But echo %ORACLE_SID% still shows the default database (ultratst).
I'm sure this is easy - how can I point to this database and then confirm that ORACLE_SID is indeed referencing that database?
Thanks, johnremove the spaces around the '='
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
c:\temp>echo %oracle_sid%
%oracle_sid%
c:\temp>set oracle_sid = mytest
c:\temp>echo %oracle_sid%
%oracle_sid%
c:\temp>set oracle_sid=mytest
c:\temp>echo %oracle_sid%
mytest
c:\temp> -
Server name (ORACLE_SID) for Oracle8 Personal Edtion
I have installed Oracle8 Personal Edtion on Window 98. How do I found out what is the oracle server name (ORACLE_SID as we say on unix). I want to connect to the database from a Visual Basic program.
Hi
Look into registry
HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/...
Guillaume -
How to set multiple ORACLE_HOME and ORACLE_SID, on Windows
How to set multiple ORACLE_HOME and ORACLE_SID, on Windows.
I have 5 oracle instances. Every time if i want to start up the services , I am manually setting the environment variable (ORACLE_HOME and ORACLE_SID) and starting the services one at a time.
Can we set multiple ORACLE_HOME and ORACLE_SID in Start->My computer-> properties-> advance-> Environment variable.
Thanks
NaveenHi ,
Can you please give me the link, for the doc you are referring to
Thanks
Naveen -
Can't access an ORACLE db on Windows via setting %ORACLE_SID%
Hello!
I'm pretty new to ORACLE on Windows (I'm a UNIX person), so I would appreciate any help I can get! I have two ORACLE 11.2.0.1 databases on a Windows 2008 R2 server. One of the databases crashed due to too many archive logs in flash recovery area (the RMAN backup I put together was never scheduled by the sysadmin). I removed all old archive logs and am trying to log into the database to clean it up but I can't get in. Changing %ORACLE_SID% doesn't seem to work:
C:\Users\kcoachman>set %ORACLE_SID%=test <== this is the database which is up with no issues
C:\Users\kcoachman>set %ORACLE_SID%
%ORACLE_SID%=test
C:\Users\kcoachman>set %ORACLE_HOME%
%ORACLE_HOME%=F:\app\wcadmin\product\11.2.0\dbhome_1
C:\Users\kcoachman>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 28 12:20:48 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
SQL> select name from v$database;
NAME
TEST
SQL> exit
Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
C:\Users\kcoachman>set %ORACLE_SID%=abat <== this is the database which crashed
C:\Users\kcoachman>set %ORACLE_SID%
%ORACLE_SID%=abat
C:\Users\kcoachman>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 28 12:21:07 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
SQL> select name from v$database;
NAME
TEST <== what? I'm still in TEST!
SQL> exit
Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
Changing %ORACLE_SID% worked fine before the database crashed. Also I have another server with 3 ORACLE Databases, no problems going from one database to another via changing %ORACLE_SID%... Has anyone seen this before and how do I get into the database to fix it?
Thank you!
KatyaOn Windows, you don't set ORACLE_HOME as environment variable directly. You set PATH and rest of env is setup via oracle.key file and Registry variables/values.
To "see" this, open a new command window, run sqlplus (found via PATH setting, or explicit path in command line), and check %oracle_home% and %oracle_sid% inside sqlplus. E.g. using @[[%oracle_sid%]].
For the attempt to set ORACLE_SID for the "second" instance, within the same Home. You actually set a variable named %ORACLE_SID%. Which can be tricky, if not dangerous (allowing % in variable names, that is).
C:\>set ora
Environment variable ora not defined
C:\>set %ora
Environment variable %ora not defined
C:\>set | findstr /i "ora"
C:\>set %ora%=test1
C:\>set ora=test2
C:\>set | findstr /i "ora"
%ora%=test1
ora=test2
C:\>set %ora%=test3
C:\>set | findstr /i "ora"
%ora%=test1
ora=test2
C:\>set | findstr /i "test"
%ora%=test1
ora=test2
test2=test3Edited by: orafad on Feb 28, 2013 10:41 PM
Edited by: orafad on Feb 28, 2013 10:47 PM -
How to view once ORACLE_SID is set in Windows version?
Hi
I have just created a Database in Windows XP usinf DBCA. Now, I was trying to logon as SYS. I did set the DB using ORACLE_SID but I don't know if the DB I am pointing is current as when I type 'echo ORACLE_SID' it is giving me 'ORACLE_SID' andnot the DB I want to switch to.
My question is...how to view after setting ORACLE_SID if it is pointing to the correct database we want to switch to?
Remember, I am using Windows XP.
ThanksHi,
In simple you can find in many ways.. when you create a DB, if you are using the deault locaitons by ORACLE,
Example this is the path
" F:\oracle\product\10.2.0\oradata\ORCL1 "
After oradata Directory ORACLE Creates the Directory by name "ORCL1"... it's your SID.
Second you can find from your tnsnames.ora life where you service_name is refereed.
Third you can find from your listener too..
fourth.. If windows....
go servicesin windows..
Check "OracleServiceORCL1" in this ORCL1 is the SID of your DB.
IF your double click that you can find the path
f:\oracle\product\10.2.0\db_1\bin\ORACLE.EXE ORCL1
Wher ORCL1 is SID..
stil so many ways are there..
- Pavan Kumar N -
Setting ORACLE_SID and connecting without @SID
I am trying to install ArcSDE on the same server I have my 11g RDBMS. The SDE service fails because of a ORA-12560 error. But, that is not my question just the facts which build up to my question. The server is Windows 2003 64bit. The database is 11g.
In each users environment values I have set ORACLE_HOME and ORACLE_SID yet I still have to put @SID in my sqlplus connections like (sqlplus system/manager@ORCL). If I dont put it in I get ORA-12560 errors.
I think that is why the SDE service wont start. I just dont know why the ORACLE_SID Env Variable isnt being read.@SID means & requires SQL*Net to connect into the DB.
Without @SID ideally the connection is made using BEQUEATH protocol
post results from the 2 following command using CUT & PASTE
lsnrctl status
lsnrctl service
12560, 00000, "TNS:protocol adapter error"
// *Cause: A generic protocol adapter error occurred.
// *Action: Check addresses used for proper protocol specification. Before
// reporting this error, look at the error stack and check for lower level
// transport errors. For further details, turn on tracing and reexecute the
// operation. Turn off tracing when the operation is complete. -
Is it export ORACLE_SID=+ASM or export ORACLE_SID=+asm
While starting up a database in ASM should i use
$ export ORACLE_SID=+ASM --(ASM in upper case)
or
$ export ORACLE_SID=+asm -- (ASM in lower case)It should be ASM and if you are using RAC then it should be ASM1 or +ASM2
-
ORACLE_SID case sensitivity & Downtime.
The ORACLE_SID variable should either be completely case sensitive or completely not case sensitive per platform.
Red Hat Linux 3.3 - Oracle Standard Ed. 9.2.0.5
I managed to cause some down time by a typo.
All of our database name were upper case, execpt for one, which we fixed recently.
So now all of our database names are uppercase.
An Oracle Database server was rebooted and did not have an auto startup script.
I went to start up the database that used to have a lower case name.
I set the ORACLE_SID variable to the lowercase name (incorrectly).
I entered SQLPLUS and issued STARTUP.
****************Here is the message I got*****************
ORA-00202: controlfile: '/u01/app/oracle/oradata/arcsde/control01.ctl'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
***************A better error message would have been****************
SPFILE -- spfilearcsde.ora not found based on ORACLE_SID = arcsde
-Hmnn I thought, the SPFILE is wrong... that path should be
'/u01/app/oracle/oradata/ARCSDE/control01.ctl'
I made a pfile from the spfile and fixed all the refrences to .../oradata/arcsde/.. to be .../oradata/ARCSDE/..
Then the block size in the PFILE did not match the database....
So I fixed the block size in the PFILE.
Then I got the message that the password file was corrupt
Then the control file was older than the datafiles.
Now I got suspicious....This can't be....
Ahh the ORACLE_SID is wrong....
Ok. Fix the ORACLE_SID
Startup nomount
re-create control file from trace backup.
restart the database and recover...
This whole miss adventure was caused by my typo in setting the ORACLE_SID.You can't.
The only way to get round case-sensitivity is to ensure that the columns in question have an UPPER() or LOWER() applied, or to use interMedia ConText, which isn't case-sensitive.
null -
ORACLE_SID: set to?
HI,
The ORACLE_SID env variable:
what is it for?
what should it be set to?
thanks
nullok, i know what it's for now, thanks anyway. just confused me when i tried to start more than one database (only database with SID matching ORACLE_SID starts).
all your threads have been helpful and interesting. thanks all.
Maybe you are looking for
-
Work Manager 6.0 - Order & Notification assignment type Z
Hi Agentry experts, for WM 6.0 we have the idea to get a more flexible assignment for notifications and work orders, as our business process requires more flexibility than the standard available assignment types e.g. Work Center User A should only se
-
I am toiling away on a book using Apple iBooks Author on Lion. Does anyone know if iBooks Author backs up to iCloud?
-
Since updating to Mountain Lion in the last week, an error message keeps popping up. The graphic is the button with 3 stick men holding hands and the message is "There was a problem connecting to the server. URLs with the type "file:" are not support
-
IPod Lockup...any ideas?
its a one year old 60. Are these things really only supposed to last a year? (My daughter's 20gb crapped out after a year, too.) Its been working fine up until I put Greys Anatomy on it tonight. Then it gets all flakey and the controls keep locking u
-
Migrateinstance issues with migrating the suffix data.
I am trying to use migrateinstance5 utility to migrate from iPlanet5.1 to SUN ONE 5.2. (Not using the SUN packages , but it is a separate installation from compressed archive on a SUN box) The data base of the sub-suffix is not getting migrated. I wa