LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-22-2017, 02:23 AM   #1
kkrrss
Member
 
Registered: Jun 2016
Posts: 56
Blog Entries: 1

Rep: Reputation: Disabled
Make shell script to write entry into DB using oracle Sqlplus and then exit.


Hello..

Can anyone teach me how i can make a shell script to connect to a Oracle database using sqlplus and create one record and then exit ?

my work around is..

01. Connect in to Oracle DB
Code:
 sqlplus orauser/password@10.0.0.1/TEST
02. insert one row into table.

Code:
 INSERT INTO table
(column1, column2, ... column_n )
VALUES
(expression1, expression2, ... expression_n );

03. exit from sqlplus and continue the shell script.

Thank You.
 
Old 01-22-2017, 02:32 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
probably this helps:
http://stackoverflow.com/questions/1...m-command-line
 
1 members found this post helpful.
Old 01-22-2017, 02:35 AM   #3
kkrrss
Member
 
Registered: Jun 2016
Posts: 56

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
thanks a lot pan!

Hope this is helpful for me. will check and let you know. thanks a lot.
 
Old 01-22-2017, 10:20 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
https://oracle-base.com/articles/mis...hell-scripting
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux + oracle + sqlplus + awk, script doesn't work marchelloUA Linux - Newbie 3 12-08-2014 04:33 PM
[SOLVED] how to make an entry in crontab through shell script called by php page Ankush Seth Linux - Newbie 28 10-08-2013 04:07 AM
Problems with storing oracle sqlplus query output shell script rockf1bull Red Hat 0 12-04-2011 11:47 AM
sqlplus using shell script arfal Programming 3 02-08-2010 08:52 PM
execute oracle procedure from linux script and sqlplus Stilltray Linux - Newbie 3 11-14-2008 10:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration