How to connect with oracle database using unix...

Hi all

I am working in datawarehouse project and use DB2 database . shell scripting is written to connect with DB2 database in my application but i dont know how to connect with oracle databse or other databases.Is there any command in unix to connect any of these datbases?

Hi.

The command to connect to Oracle is usually SQL*Plus.

If you can be more specific about what you're trying to do, then it would be easier to assist you.

Hi scottn.

actually i want to know the command on the unix prompt which my connect to oracle databse .

Thanks and regards
vijay sahu

Hi.

The command is sqlplus.

You need to set up your environment before you can use it:

. oraenv
(and when it asks, type in the DB SID)

sqlplus user/password[@database]

oraenv is usually in /apps/oracle/admin/bin

Hi Scott,

I used . oraenv on unix prompt but is displaying NO SUCH FILE AND DIRECTORY.
I also tried SqlPlus command eventhough it is saying Command Not Found....
is there anything I am doing wrong .
I am not clear with how to set up the enviornment variable.. Because i used SET command to check these variable but these are not there..

Thanks
Vijay

Speak with your database administrator(s) - you will not be able to connect to your database without more information...

If you don't know where an application or file is, "find" it

find / -name sqlplus -print

Hi Vijay.

Have you established that Oracle is installed in the first place? (assuming it's not your own server / Linux you're connected to - in which case you should know!).

id oracle

If that's OK, you need to find where the Oracle software is installed. Usually something like

/<<somewhere>>/oracle/product/<<version>>/...... etc.)

Run

find / -name sqlplus -ls 2>/dev/null

if you have to.

If you find that, then oraenv should be in the same directory.