Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

enter image description hereOperating system : Windows8.1

i use Linux ubuntu using vmware 

Today i have installed oracle database 11g release 2 in particular drive 

i want to access database via linux/ubuntu  

i able to access via windows command prompt 

using the query

set oracle_sid=datbase_name ;

Sqlplus; 
username ;
password ;

SQL> select sysdate from dual ; 


 SQL> cl scr ;

SQL>exit;

i need to know , is it possible to connect and access database via ubuntu/Linux/

once i type

sqlplus / as sysdba 

i got the error sqlplus not found i know i have to set the oracle environment , but i don't know how ?

share|improve this question

closed as unclear what you're asking by Braiam, cuonglm, jasonwryan, maxschlepzig, Ramesh Aug 4 '14 at 20:01

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Your first line says this is on Windows 8.1; that's just the host OS, right? As in, it's otherwise uninvolved? – derobert Aug 4 '14 at 16:22
    
yes Windows 8.1 , and i use ubuntu using Vmware – vikas Aug 4 '14 at 16:51

1 Answer 1

At minimum, you need to set ORACLE_HOME. You probably also want to add something to PATH.

When you installed Oracle, you picked a home directory. For example, let's say you used /opt/oracle/oracle/product/11.2.0/dbhome_1. Then you'd run something like this in the shell to set the environment:

export ORACLE_HOME=/opt/oracle/oracle/product/11.2.0/dbhome_1
PATH="$PATH:$ORACLE_HOME/bin"

Oracle comes with a oraenv script you can run as . oraenv (note the dot in front, it's important) if your database is registered in /etc/oratab.

If you want that second SQL*Plus line to work, you also need to set ORACLE_SID to your database's SID.

PS: There is a rlwrap program you can install (from universe) that, if you run it around SQL*Plus (e.g., rlwrap sqlplus) will make SQL*Plus line editing much nicer.

share|improve this answer
    
yes , i shared a snapshot , where you can see the path . i have installed in windows operating system – vikas Aug 4 '14 at 17:26
    
@vikas wait... I thought you installed Oracle under Ubuntu? If not, you need to install the Oracle client at least. – derobert Aug 4 '14 at 17:28
    
yes , i installed SQL*plus oracle client , i shared the snapshot – vikas Aug 4 '14 at 17:43
    
@vikas that's a screenshot of installing Oracle on Windows, not Ubuntu. – derobert Aug 4 '14 at 17:44
    
Yes, after the OP gets the oracle environment on the Linux guest working, he will likely have to set up some networking such as TNS to let the Linux oracle client access the Windows oracle server. – Mark Plotnick Aug 4 '14 at 19:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.