General :: Use SQLPLUS In Shell Script - Connect To Oracle DB?
Sep 15, 2010
How i will use sqlplus in shell script? Can any one provide sample code which explain following:
1. Connect to oracle DB
2. Exceute select * from tablename
3. Release connection to the DB
4. Append output in file everytime when query executes.
View 1 Replies
ADVERTISEMENT
Apr 16, 2011
me as to how i should go about accessing the oracle-xe db that I just installed on my ubuntu 10.04 notebook via sqlplus? I have successfully installed the �oracle-xe 10g server� and client� and I can access the admin page from the browser.However when I try to say sqlplus on the s me this:�error while loading shared libraries:libsqlplus.so: cannot open shared object file: No such file or directory�I have set the paths and variables right Im sure, but I just cant connect with sqlpolus
View 1 Replies
View Related
May 30, 2010
tried hard to install oracle-11g-R2 in my CentOS5.5,during the install,I did all my job step by step as this article says: Q1: when I 'su oracle 'sqlplus /nolog',it said:"sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory".The article has a ution for this problem:"Solution: Install libaio and libaio-devel packages. If packages already installed and error still occurs try execute "ldconfig" as root."Then i executed "ldconfig" as root ,and run "sqlplus /nolog",it occured another problem:"SP2-0667: Message file sp1<lang>.msbSP2-0750: You may need to set ORACLE_HOME to your Oracle software directory"
View 2 Replies
View Related
May 31, 2011
how can i connect remotly to Oracle Database using shellscript?.is oracle client is require for connect to oracle db remotly?
View 2 Replies
View Related
Nov 29, 2010
I am working as oracle DBA on 10g . Till last day I had worked on windows platform. Now my company want me to work on Linux platform. I am first time using Linux dont know A,B,C of Linux . I want to connect sqlplus through linux command prompt. I have exported enviornment variable of oracle but I am getting permission denied Below mention steps I ahd followed . Please help me to solve it
[oracle@bhel1 mj]$ ORACLE_SID=V7;export ORACLE_SID
[oracle@bhel1 mj]$ ORACLE_HOME=/usr/lib/oracle/v7/app/oracle/prod
ver;export ORACLE_HOME
[oracle@bhel1 mj]$ PATH=$ORACLE_HOME/bin:$PATH;export PATH
[oracle@bhel1 mj]$ NLS_LANG=AMERICAN_AMERICA.AL32UTF8;export NLS_
[oracle@bhel1 mj]$ LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_P
LIBRARY_PATH
[Code]....
View 1 Replies
View Related
Jul 5, 2011
i have the following script which when run from the linux sercer does not give me the sqlplus prompt. it does the su and leaves it there insted of continuing. The target is to run the script and it shd su and login to sqlplus
<#!/bin/sh
su -l oracle
export ORACLE_SID=MYDB
sqlplus user/password
#>
~
View 2 Replies
View Related
Feb 8, 2010
How can I make shell script to use sqlplus to update some database table? This is what I'd like to make:
- login to db server (I have create ssh-keygen to bypass the login session)
- login sqlplus / as sysdba
- update status set status='END' where status='BEGIN';
- commit;
- quit;
I'm using oracle 10g database and SLES 9.0
View 3 Replies
View Related
Nov 18, 2010
I am trying to import .exp file to oracle database. I have written a script for the same, but i am able to run it manually with out any errors , but it failing from cronjob(Even though i am using absolute path every where) Follwoing is the command i am trying to execute from shell.
/opt/ORACLE/product/bin/imp test/test@testdb full=y ignore=y buffer=1000 log=/data01/import_all.log file=/data01/test.exp
View 2 Replies
View Related
Aug 23, 2010
On RHEL 5.2, i have installed Oracle client 11.1 and Php 5.1.6. After that i somehow installed and configured oci8.so. When i do phpinfo Under oci8 it shows oci8 support enabled.However on running php program that connect with oracle database i get following error PHP Warning: oci_connect() [<a href='function.oci-connect'>function.oci-connect</a>]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and LD_LIBRARY_PATH are set and point to the right directories in /var/www/html/index.php on line 5
View 5 Replies
View Related
Mar 13, 2010
im a newbie in this of linux. I want to have a linux virtualbox with DB servers like Oracle, MySQL, PostgreSQL and so on, so i installed Fedora in virtualchine of virtualbox. In the network configuration i set the Bridge Connection to enable Fedora to get IP from DHCP and it works fine. After that i've installed Oracle 10G Express and it works fine, i can connect without problems to oracle admin web application from Fedora. Previously i checked if port 1521 is open on fedora so when Oracle is running i use nmap and i get this:
Code:
nmap locahost
Starting Nmap 5.21 ....
[code]...
View 7 Replies
View Related
Apr 29, 2011
How do i connect from java to oracle through driver 1?
i have installed open suse linux 11.3 and jdk 1.6.20.0.
View 2 Replies
View Related
Mar 28, 2010
I'm trying to configure unixODBC on Linux rehat EL 5 32 bit to connect to an Oracle 10g database server. But when I retest the connection after the configuration then The error occurs:
# isql -v oralab4_dns vonphot vonphoto
isql: symbol lookup error: /usr/lib/libreadline.so.3: undefined symbol: PC
I have searched on Google.com for 2 days but I can't resolve the problem.
View 3 Replies
View Related
Nov 27, 2010
I'm a new user for oracle,tried to install oracle 10g on redhat linux 5 but gettinh the same error message.response/ runInstaller[oracle2@localhost database_10201]$ sh runInstaller _runInstaller: line 54:/tmp/database_10201/install/.oui: Permission denied_Doany one plz help me how to give full set of permisions to an user in linux to access a folder??
View 2 Replies
View Related
Mar 8, 2010
I setup linux script to delete my backups older than few days:
RBRDAN=`date �date=�3 days ago� +%w`
rm /u02/oracle/backup/rman/$RBRDAN/*
But, I got error:
[code]...
View 2 Replies
View Related
Jul 19, 2010
I am writing shell script for executing oracle procedure. Shell script need to take 3 parameters from one data file rest of the parameters need to pass in command line it self. Total 7 parameters are need to pass for shell script.1st,3rd,5th parameters need to take from dat file and rest of 4 parameters from command line.
Below is one oracle procedure:
EXEC CIM_MGMT_INSTALL.addFlow('$1','1.0','$1','Settings','$2','ECCD2',NULL,1);
$1is 1st and 3rd both places need to pass same parameter.$1,$2 need to take from data file as earlier says.
View 2 Replies
View Related
Aug 30, 2010
I am trying to write a script to access sqlplus and use the output to replace the result in another file. But I am having some issues with it (This script is just a test script and I am just trying to print the updated value.
#!/bin/bash
I am not able to post the sqlplus connection, but it works.
bb=$a
[code]....
View 2 Replies
View Related
Aug 30, 2010
I am trying to write a script to access sqlplus and use the output to replace the result in another file. But I am having some issues with it (This script is just a test script and I am just trying to print the updated value.
#!/bin/bash
a=`echo exit|sqlplus -S -L xxx/xxx@xxx @test.sql`
bb=$a
[code].....
View 5 Replies
View Related
Apr 15, 2011
I have installed oralce-xe 10g on CentOs. I am facing error while connecting it
SQL> connect
Enter user-name: HR
Enter password:
[code]...
View 1 Replies
View Related
Mar 4, 2010
So I have my new Dell Latitude 2100 (toy) on my network running Ubuntu 9.10 as delivered. I added openssh and the service is running. I can connect to the machine from another using Nautilus or Gnome Commander over ssh. However, I cannot connect from a shell(?)
ken@taylor12:~$ ssh taylor13
ssh: connect to host taylor13 port 22: Connection timed out
Firestarter shows a connection from taylor12 to taylor13 on port 22 - the Gnome Commander connection over which I am currently transferring some files.
View 4 Replies
View Related
Mar 14, 2009
I'm using Kubuntu 8.04 and now I've installed OpenOffice 3, both in Spanish.I have oracle client installed and can connect to Oracle databases with clients like tora.What I try:
- Open Database and select connect to an existing database.
- Select Oracle JDBC.
- Next
- DatabaseName: I put the sid of the database of oracle. (orcl)
Server URL: The name of the server containing the database. It's resolved by a ping. (database.organization.es)
Port: 1521
- Oracle JDBC Driver:
oracle.jdbc.driver.OracleDriver
But I press the test button, I receive an error: JDBC Driver can't be loaded (really, the message is in spanish).
View 2 Replies
View Related
May 12, 2011
Query1:
Actually for executing the sql query in shell script we require uname and password,the same uname and password required for 70 scripts because in 70 scripts i am executing the sql query's. If we using same uname and password in 70 scripts that is repetation problem. I want the solution for once i asked run time uname and password only once these are helpful to all remaining scripts... how it can possible?
Query2:
And for every sql query executing in the each shell script i am connecting to OracleDatabase... I want the solution for connecting only once and using this connection to each and every script... what is the solution for this?
View 3 Replies
View Related
Oct 4, 2009
I have a CentOS dedicated server running ProFTP. I have created user accounts which are meant for FTP access only but the users cannot connect to the FTP unless their shell access is /bin/bash
Here is an example line that is outputted when I use this command:
This user can access the FTP fine, but he can also access SSH which I don't want to allow him to do. If I set his shell access to /bin/false then he can't connect to the FTP.
What can I use in instead of /bin/bash to allow FTP but don't allow SSH?
View 2 Replies
View Related
Aug 15, 2011
I want to connect to an FTP server from the Linux command line. The server is configured behind a proxy.
If I call:
echo $ftp_proxy
I get a result like this:
abc.def.ghi.jkl:8080
If I call:
ftp -pn $ftp_proxy
I get a unknown host error.
How can I connect to the FTP server using the Linux command line?
View 1 Replies
View Related
Jul 24, 2011
I've AMD64 system with Ubuntu 11.04 installed. It's been rough ride for me to install oracle-xe-universal. I've already spent more than 2 days on this. Still unsuccessful.
1) First I downloaded the packages libaio_0.3.104-1_i386.deb and oracle-xe-universal_10.2.0.1-1.1_i386.deb
2) Then I ran
sudo apt-get install bc (ran fine)
sudo dpkg -i --force-architecture libaio_0.3.104-1_i386.deb (ran fine)
sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.1_i386.deb
(gave me dependency error for libc6 (>= 2.3.2), I modified the control file to remove dependency and rebuilt the package) (now worked fine) Oracle xe is now installed. Then I tried to start the DB it started but it's HTTP client never started. So I decided to uninstall the oracle-xe=universal. None of the sudo apt-get remove oracle-xe-universal command's didn't worked for me. So i went for manual uninstallation directions as per oracle link.
I ran the following command-
--Manually uninstalling Oracle 10g--
sudo rm -rf /usr/lib/oracle /etc/oratab /etc/init.d/oracle-xe /etc/sysconfig/oracle-xe /usr/share/doc/oracle_xe /usr/share/doc/oracle_xe_client
Then I again ran the following command to install oracle-xe
sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.0_i386.deb
See below what I got as the output-
rocky@ubuntu:~/git/mygit/edas2/libaio$ sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.1_i386.deb
dpkg: warning: overriding problem because --force enabled:
package architecture (i386) does not match system (amd64)
[code]....
Even in applications menu I don't see the if oracle has been installed. So i conclude first time installation was ok but somehow http client didn't worked. After manual uninstallation, second installation didn't even loaded/installed the oracle-xe in init.d directory.
View 1 Replies
View Related
Jun 15, 2011
MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.
View 2 Replies
View Related
Apr 27, 2011
I would like know when it is necessary or advisable to write a shell script instead of shell function ?
View 3 Replies
View Related
Jul 3, 2011
Does anyone know Oracle e-Delivery (link below)? It looks like free download of linux is available form this site.
[URL]
1. What is the difference between Oracle Linux x86 32 bit and x86 64 bit?
2. How can I verify which one (x86 32 bit vs. x86 64 bit) I need for my PC?
3. What's the difference between the two below (one with Source and the other without 'Source')? I am trying to figure out which one I need.
- Oracle Linux Release 5 Update 2 for x86_64 (64 Bit)
- Oracle Linux Release 5 Update 2 Source for x86_64 (64 Bit)
View 3 Replies
View Related
Jan 18, 2011
I am wondering if I can open a shell or new terminal thing from within the terminal in a unix/linux enviroment. Particularly a commandline only one where there is no GUI. Is this doable? how do I do it?
View 3 Replies
View Related
Mar 19, 2011
I installed Oracle Linux 5 and now I can not boot into Vista. However if I use Debian Live CD Vista is there and looks fine (as far as I can see). Is there a way I can use a live CD to fix grub? I have googled it but none of the commands I found worked.
View 9 Replies
View Related
May 24, 2010
My Setup: Dell Laptop (BIOS allows boot from USB) - Vista 32 bit installed, 4 GB memory
External 500 GB HDD (iOmega) - Partitioned as follows:
NTFS: 50 GB
/boot: 1 GB
below two on one logical volume:
swap: 5 GB
/: rest ~ 440 GBI installed Oracle Enterprise Linux on the external HDD.
Did not install the Grub bootloader as I don't really want a startup boot option. The way I was planning to make it work was: When USB HDD connected and laptop powered up, it'll boot to the Oracle Linux. When the USB drive is not connected and laptop powered up, it'll boot to Vista. When I boot with the USB HDD connected, nothing happens. I get a blank screen with a blinking cursor. The USB HDD light comes on though. Is the above plan possible, or do I have to have a Boot loader installed?
If I have to have a boot loader installed, how can I just install the bootloader and not have to reinstall Linux on the HDD. The Linux drive is currently empty, so I'm open to any good suggestions to partitioning it. I want to keep a small amount of NTFS space on that drive to store some windows files and documents that I can carry around. The rest 450 GB is open for Linux. And I Plan to install Oracle Database and Apps on Linux (which takes about 350 GB of space).
View 8 Replies
View Related