![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Connecting to Oracle Database | dreams5617 | Shell Programming and Scripting | 4 | 05-02-2008 01:37 PM |
| Need Shell Script to upload data from Text file to Oracle database | chandrashekharj | Shell Programming and Scripting | 6 | 03-26-2007 04:21 AM |
| Connecting to Oracle from Shell..What Am I doing Wrong | dzyr4tt | Shell Programming and Scripting | 1 | 12-21-2006 01:05 AM |
| How to write Flat Files by shell script using Oracle Database | coolbuddy | UNIX for Advanced & Expert Users | 3 | 02-21-2006 02:50 PM |
| Connecting to Oracle through unix shell scripts | guptan | UNIX for Advanced & Expert Users | 1 | 07-04-2005 01:16 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi, Here's my simple code that may solve your problem. Lets say you have a 'usr' table with 'user ID, user Name, status (Active(A) or Suspended (S))' 1. Connection to DB is established wrt DB name in the tnsnames entry 2. Select/update query will retrive/update the information from the table resp. Code:
#!/bin/ksh echo "Please enter the User Id of the USER whose status needs to be activated" read usrId sqlplus username/password@database_name <<ENDOFSQL set head off; set feedback off; set lines 300; select * from usr where usrid='$usrId'; update usr set status='A' where usrId='$usrId'; ENDOFSQL echo " " echo "User Activated :: `echo $usrId`" echo " " exit; Regards, Sumedha Last edited by Sumedha Sobti; 10-06-2009 at 08:48 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|