473,842 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connecting To Oracle Database From Unix(script)

2 New Member
Hi all , i need the shell script which would connect to the oracle database xyz...
May 16 '07 #1
6 31476
smashzone
9 New Member
-
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
chanakyadba
2 New Member
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
smashzone
9 New Member
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
ora2000
2 New Member
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 New Member
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
coaxfiber
60 New Member
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
24096
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 successfully or failed? Thanks #!/usr/bin/ksh sqlplus user/password@name <<EOC set time on
1
2776
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 this form. I'm looking for something easier to compile. I already found something to connect to an Oracle Database, but it use g++ and not cpp, and the second
3
2987
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 anyone know of such a tool or Python script. regards tores
4
7040
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
8487
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 programme, I need to ensure that shell script connects to Oracle Database to execute the SQL written inside it. Now when I hard code the shell script with User ID / PWD, the scripts run fine.....but I dont want to put the user id and pwd in shell script...
0
7293
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
3103
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 working so that is not problem. ... IFS="^^" exec < smt_output.txt while read circuit vho ban junk device dvr; do
1
2561
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 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 specify if any more information is needed what I have done is the following example script name ->...
26
22386
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 every two mintes. I have a few questions before actually start writing the script: 1. Do i have to have unix and oracle on same server. 2. what libraries i need to in unix, if any
3
6453
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 i try to export from toad/sqlplus its hanging. And also i need to some validation using UNIX. So please give me some tip to write a script which does this operation. Req: 1) Connect oracle 2) Select * from employee 3) Write into some flat...
0
9715
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10940
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10610
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10670
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7854
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7030
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5695
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4087
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.