473,322 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Connecting To Oracle Database From Unix(script)

Hi all , i need the shell script which would connect to the oracle database xyz...
May 16 '07 #1
6 31435
-
Hi all , i need the shell script which would connect to the -oracle database xyz...
Pleas ellaborate on your question? Why would you need a script to connect to a database? Which Oracle database version are you using? Why can't you run sqlplus from the command line?

Please be clear on what you need, it helps us to be able to answer your question quicker if we do have answers.

Regards,
smashzone
May 16 '07 #2
with sqlplus we can connect , but i need the total syntax from shell prompt and after connecting to sql what steps to be followed to connect to oracle 9i database

-

Pleas ellaborate on your question? Why would you need a script to connect to a database? Which Oracle database version are you using? Why can't you run sqlplus from the command line?

Please be clear on what you need, it helps us to be able to answer your question quicker if we do have answers.

Regards,
smashzone
May 16 '07 #3
Definition of a script: a script is an automated sequence of related commands
Therefore, you dont need a script to connect to a database

Step 1
Login to your server (ssh <ip adress>) using program called putty as the oracle user and provide the relevant password

example:
login as: oracle
Sent username "oracle"
oracle@192.168.103.60's password:
Last login: Wed May 16 09:10:16 2007 from 192.168.103.184
[oracle@slayer ~]$


Step 2
Run the following command:
sqlplus system/password

Step 3
Use sqlplus as you would use it when your connecting using a windows machine.

HINT: Make sure that your logged on as an oracle user, otherwise you'll get an error like this:

[root@slayer ~]# sqlplus
-bash: sqlplus: command not found


Hope this helps, post again if u encounter any problems

Regards,
smashzone
May 16 '07 #4
Hi

I would like to create a unix script to connect to an ORACLE database using a oracle package. Also this script should provide functionality to call an oracle procedure that contains a parameter value that is passed to it. The parameter value passed to the procedure should be "editable" i.e user should be able to change it.

Please could you assist, shout if anything is unclear and i will try and re-phase
Aug 6 '07 #5
aeiou8
1
Hi,

I am also in need of some help pertaining to connecting to Oracle from a script. The logic I am trying to accomplish is:

1. log into Oracle.
2. execute a simple select query from the V$SESSION table.
3. have the output piped into a file.

I was planning to have this script set up in crontab to run every 30 mins. Any help will be appreciated. Thanks.
Oct 3 '07 #6
Hi,

I am also in need of some help pertaining to connecting to Oracle from a script. The logic I am trying to accomplish is:

1. log into Oracle.
2. execute a simple select query from the V$SESSION table.
3. have the output piped into a file.

I was planning to have this script set up in crontab to run every 30 mins. Any help will be appreciated. Thanks.

use "spool" in your sql file and call it to your script.
Dec 24 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: vishal | last post by:
Hi, I am writing my first script to execute a Oracle procedure through a unix script. Could you tell me how do I do error handling here? How do I know in my script if the procedure executed...
1
by: Yanick Quirion | last post by:
Hi all, I'm trying to find a simple code to connect to an Oracle Database (9i) with C under linux. I have a script that read a form from the web and I want to access my Oracle database with...
3
by: Tor Erik Soenvisen | last post by:
Hi, I need to export an Oracle database to a DDL-formated file. On the Web, I found a Python script that did exactly this for a MS Access database, but not one for Oracle databases. Does...
4
by: istruttorenuoto | last post by:
hi to everbody i need to write a unix script to do a sqlplus connection (using user id and password) to an oracle database and call a stored procedure. how could i do it? thanks to all
6
by: Sanket80 | last post by:
Hi, I have one shell script which runs a report and sends the output to user. The shell script has some queries written in it in SQL and hence when I execute a shell script via a concurrent...
0
by: paitosh | last post by:
Hi, Any body could suggest me what kind of unix script should i write to do a complete DB export using compress methods.
1
by: dr3586 | last post by:
Hi, I am new at this so I apologize if all is not correct. In ksh unix script I am trying to read values from text delimited file into oracle db table. I know that the read from the text file is...
1
by: ora2000 | last post by:
Hi I would like to create a unix script to connect to an ORACLE database using a oracle package. Also this script should provide functionality to call an oracle procedure that contains a parameter...
26
by: seemagoyal | last post by:
Hi, I don't have any experiance of UNIX and oracle. but i have got a short assignment for writing a unix script that will call a stored procedure. this script has to run this procedure after...
3
by: techquest | last post by:
Hi, I want to connect into oracle database and export the table data into a flat file using UNIX shell scripts. I cant use other GUI tools to do this, as the dataload will be in millions. hence if...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.