By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,688 Members | 1,177 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,688 IT Pros & Developers. It's quick & easy.

Using Shell Scripts for Database Operation

P: 14
Hello ,
I am thinking of performing databse operation using shell scripts , for example i am in need to delete sum number from database very often so if i just run a shell scripts and give that number and if it gets deleted, it will be a quiter easy. thinking that i am trying to do shuch scripts, i am looking in the net and now can perform sum query thru scripts,
if any one has more idea regarding that, it will be a great help if any links or idea is given
thanks in advance,
creeds
May 12 '08 #1
Share this Question
Share on Google+
1 Reply

gpraghuram
Expert 100+
P: 1,275
Hello ,
I am thinking of performing databse operation using shell scripts , for example i am in need to delete sum number from database very often so if i just run a shell scripts and give that number and if it gets deleted, it will be a quiter easy. thinking that i am trying to do shuch scripts, i am looking in the net and now can perform sum query thru scripts,
if any one has more idea regarding that, it will be a great help if any links or idea is given
thanks in advance,
creeds
You can connect to a database from a shell script and execute the queries.
Code changes depending on the type of DB
general code for conecting to oracle DB will be like this

Expand|Select|Wrap|Line Numbers
  1. sqlplus -s <user>/<pass>@db << EOT
  2. select *
  3. ...
  4. EOT
Raghuram
May 12 '08 #2

Post your reply

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