问题
I installed oracle 11g and im was trying to open sqlplus from command prompt but it is opening and closing in a fraction of second..I tried opening the sqlplus from the installed location as well. It still shows the same behaviour. Can anyone help me with a solution. I already uninstalled and installed the oracle twice for some other errors. Earlier it was working fine, but when I installed it the second time, sql plus is not opening .
I appreciate any advice.
Thanks
回答1:
Manasa,
If the error message reads
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
as you stated then the answer can depend on what OS you are using. Let's say you are using some flavor of windows, you can go to the system properties -> advanced tab -> environment variables -> system variables and check the variables ORACLE_HOME and PATH.
Let's say that you installed oracle at C:\oracle\ora11\
In the PATH variable, among other values, you need to have the location of oracle bin directory; in this instance:
'C:\oracle\ora11\bin;'
Now, I should note that when oracle references the path variable, it looks for the first instance of an oracle path. So let's say you had two installations of oracle at the following locations:
'C:\oracle\ora9i\'
'C:\oracle\ora11\'
And the path variable was set like so:
'C:\oracle\9i\bin;C:\oracle\ora11\bin;'
The result would be so that when you open sqlplus, it would automatically reference the sqlplus program located at 'C:\oracle\9i\bin\' - whichever version that may be. (this would also be true for any oracle utility found in the bin directory such as DBCA or expdp) (this is also assuming you are note explicitly declaring which sqlplus you want to run i.e. you just type 'sqlplus' in a command prompt rather than 'c:\oracle\ora11\bin\sqlplus')
The oracle_home variable would be set to 'C:\oracle\ora11\' however i'll note that my windows 7 desktop version runs fine with this value null. It is, however, not a production desktop as you would imagine.
回答2:
Run SQLPLUS.exe as administrator. You might have rights issue.
Thanks shah
来源:https://stackoverflow.com/questions/5972538/sql-plus-not-opening-after-installing-oracle-11g