|
|
|
|
Re: Value for PATH environment variable [message #575480 is a reply to message #575479] |
Wed, 23 January 2013 09:53 |
lg123
Messages: 225 Registered: August 2008
|
Senior Member |
|
|
C:\Documents and Settings>set PATH=c:\app\xxxxxxx\product\11.2.0\dbhome_1/bin
I created 2 databases. one is "A" and the other database is called "B".
In sql plus tool, I do "sqlplus / as sysdba". It asks for the password. I give the correct password. Then, I give this command "select name from v$database" to make sure whether i am in the right database. Instead of showing database "B", it is showing database "A". So, I feel that I havent set the environment variables properly. I was able to set the ORACLE_HOME and ORACLE_SID. But I am not sure about the PATH environment variable. Here is what I did to set the 3 environment variables.
-- oracle home
C:\Documents and Settings>set ORACLE_HOME=c:\app\xxxxxxx\product\11.2.0\dbhome_1/bin
C:\Documents and Settings>echo %ORACLE_HOME%
c:\app\xxxxxxx\product\11.2.0\dbhome_1/bin
-- oracle sid
C:\Documents and Settings>set ORACLE_SID=B
C:\Documents and Settings>echo %ORACLE_SID%
B
-- PATH
C:\Documents and Settings>set PATH=c:\app\xxxxxxx\product\11.2.0\dbhome_1/bin
C:\Documents and Settings>echo %PATH%
c:\app\xxxxxxx\product\11.2.0\dbhome_1/bin
After setting the above environment variables, if i try to connect to database "B" and query like this "select name from v$database", still it is giving the result as database "A" and not database "B". I want it to show as database "B". Please help.
|
|
|
|
Re: Value for PATH environment variable [message #575483 is a reply to message #575481] |
Wed, 23 January 2013 10:42 |
lg123
Messages: 225 Registered: August 2008
|
Senior Member |
|
|
I am NOT sure how safe it is to paste the company database details here.
C:\Documents and Settings\Lakshmg3>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Lakshmg3\Application Data
CLASSPATH=.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=LNGDAYD-5002192
ComSpec=C:\WINDOWS\system32\cmd.exe
DEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopPro
tection
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Lakshmg3
HOMESHARE=\\LEGAL.REGN.NET\DAY
LDMS_LOCAL_DIR=C:\Program Files\LANDesk\LDClient\Data
LOGONSERVER=\\LNGDAYDCXP024
MANU=Dell Inc.
MODEL=755
NUMBER_OF_PROCESSORS=2
ORACLE_SID=content
OS=Windows_NT
Path=c:\app\Lakshmg3\product\11.2.0\dbhome_1/bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0b
ProgramFiles=C:\Program Files
PROMPT=$P$G
QTJAVA=C:\Program Files\Java\jre6\lib\ext\QTJava.zip
RoxioCentral=C:\Program Files\Common Files\Roxio Shared\9.0\Roxio Central33\
SERIAL=9MCLCH1
SESSIONNAME=RDP-Tcp#2
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\Lakshmg3\LOCALS~1\Temp
TMP=C:\DOCUME~1\Lakshmg3\LOCALS~1\Temp
TYPE=OptiPlex
USERDNSDOMAIN=LEGAL.REGN.NET
USERDOMAIN=LEGAL
USERNAME=Lakshmg3
USERPROFILE=C:\Documents and Settings\Lakshmg3
VSEDEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\Desktop
Protection
windir=C:\WINDOWS
***************************************************************************************
C:\Documents and Settings\Lakshmg3>lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-JAN-2013 11:3
:47
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Prod
ction
Start Date 22-JAN-2013 05:02:19
Uptime 1 days 6 hr. 33 min. 28 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\app\Lakshmg3\product\11.2.0\dbhome_1\network\admin
listener.ora
Listener Log File c:\app\lakshmg3\diag\tnslsnr\LNGDAYD-5002192\listener
alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=LNGDAYD-5002192.legal.regn.net)(POR
=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "avaya.legal.regn.net" has 1 instance(s).
Instance "avaya", status READY, has 1 handler(s) for this service...
Service "avayaXDB.legal.regn.net" has 1 instance(s).
Instance "avaya", status READY, has 1 handler(s) for this service...
Service "content.legal.regn.net" has 1 instance(s).
Instance "content", status READY, has 1 handler(s) for this service...
Service "contentXDB.legal.regn.net" has 1 instance(s).
Instance "content", status READY, has 1 handler(s) for this service...
The command completed successfully
********************************************************************************
C:\Documents and Settings\Lakshmg3>lsnrctl service
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-JAN-2013 11:36
:29
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "avaya.legal.regn.net" has 1 instance(s).
Instance "avaya", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "avayaXDB.legal.regn.net" has 1 instance(s).
Instance "avaya", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: LNGDAYD-5002192, pid: 2904>
(ADDRESS=(PROTOCOL=tcp)(HOST=LNGDAYD-5002192.legal.regn.net)(PORT=1092)
)
Service "content.legal.regn.net" has 1 instance(s).
Instance "content", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1859 refused:0 state:ready
LOCAL SERVER
Service "contentXDB.legal.regn.net" has 1 instance(s).
Instance "content", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: LNGDAYD-5002192, pid: 1876>
(ADDRESS=(PROTOCOL=tcp)(HOST=LNGDAYD-5002192.legal.regn.net)(PORT=1093)
)
The command completed successfully
**************************************************************************************
|
|
|
|
|
|
|
Re: Value for PATH environment variable [message #575495 is a reply to message #575493] |
Wed, 23 January 2013 12:02 |
lg123
Messages: 225 Registered: August 2008
|
Senior Member |
|
|
I gave the below commands in the command prompt..
C:\Documents and Settings\Lakshmg3>set ORACLE_SID=content
C:\Documents and Settings\Lakshmg3>echo %ORACLE_SID%
content
In SQL plus, I gave the following :
Enter user-name: sqlplus / as sysdba
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$database;
NAME
---------
AVAYA
I dont want AVAYA, I want the result to be content. I am trying to access the content database, not avaya database. Please help.
|
|
|
|
Re: Value for PATH environment variable [message #575497 is a reply to message #575495] |
Wed, 23 January 2013 12:05 |
lg123
Messages: 225 Registered: August 2008
|
Senior Member |
|
|
I got the desired output. Instead of using 2 different windows, one for command prompt and the other one for SQL Plus, this time I used the same window.
C:\Documents and Settings\Lakshmg3>set ORACLE_SID=content
C:\Documents and Settings\Lakshmg3>echo %ORACLE_SID%
content
C:\Documents and Settings\Lakshmg3>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 23 13:02:58 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$database;
NAME
---------
CONTENT
Thanks for the help.
|
|
|
|
|