The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Connect Oracle from NATted IP skbpk_in SUN Solaris 0 09-18-2008 10:27 AM
How to connect oracle from unix ravi gongati Shell Programming and Scripting 2 03-24-2008 06:19 AM
How to connect ORACLE using PERL Vijayakumarpc Shell Programming and Scripting 1 02-27-2008 08:20 AM
How to connect to oracle ?? divyesh shah Shell Programming and Scripting 2 01-04-2007 04:40 AM
HOw to connect oracle using ksh and perl script chendra.putta Shell Programming and Scripting 3 10-17-2006 12:30 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-09-2009
rajesh_tns rajesh_tns is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 18
Connect to Oracle from Unix

HI all,

I have some doubts on unix and oracle...

1. Need some scenarios of why is there a need to connect to oracle db from unix?

2. how to connect to oracle db from unix?

Thanks and Regards
rajesh
  #2 (permalink)  
Old 02-09-2009
rmuledeer rmuledeer is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 5
I script solutions that execute queries via the command line for batch type processing that can't be or is in no need of being handled through procedure calls.

Last edited by rmuledeer; 02-09-2009 at 03:11 PM..
  #3 (permalink)  
Old 02-09-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,950
  1. To access configuration data for scripts that is maintained in a DB, because it's used on many hosts
  2. Look up the SQLplus command line utility (ships with Oracle)
  #4 (permalink)  
Old 02-09-2009
rajesh_tns rajesh_tns is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 18
hi

thank you ..
  #5 (permalink)  
Old 02-10-2009
ddreggors ddreggors is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 91
We also use our Oracle Database for config management. As to how here is an example function...


Code:
#!/bin/sh

LOGIN="user/pass@host:1521"

CREATE_HOSTS_FILE () {
        sqlplus -s $LOGIN <<EOF > hosts.out
        SET HEAD OFF
        SET LINESIZE 120
        SET FEEDBACK OFF
        SELECT
                HOSTNAME, IP
        FROM
                HOSTS
        WHERE
                ACTIVE = 1
/
EOF
} 

CREATE_HOSTS_FILE

# Now we have a file named hosts.out that we can review and then pass to all servers as the "/etc/hosts" file

Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:56 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0