473,419 Members | 1,823 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,419 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 31448
-
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.