In this post, we will see how to connect to Oracle DB in Linux Shell Script. There are some prerequisite for a Linux server to connect to Oracle DB. There should be oracle db driver installed on the Linux server from which you want to connect to Oracle DB. Check whether you can call/connect SQLPLUS from command line.
$ sqlplus
if you are not able to, check whether oracle path is set in .profile file. Lets assume, Oracle DB driver is installed on Server and Sqlplus path is set.
Now, there are some basic steps to connect to Oracle DB-
a) Connect to Oracle DB with UserID and Password
b) Execute the SQLs
c) Store the output in a file or send to standard output (terminal)
A) Connect to Oracle DB and send the SQL output to Standard Output (terminal)
========================================================================
========================================================================
B) Connect to Oracle DB and assign the output a variable for output formatting
========================================================================
========================================================================
C) Connect to Oracle DB and send the Output to a File
========================================================================
========================================================================
Like the below page to get the update
Facebook Page Facebook Group Twitter Feed Telegram Group
No comments:
Post a Comment