Red Hat / Fedora :: Connect To Oracle DB Through Shell Script?
May 31, 2011how can i connect remotly to Oracle Database using shellscript?.is oracle client is require for connect to oracle db remotly?
View 2 Replieshow can i connect remotly to Oracle Database using shellscript?.is oracle client is require for connect to oracle db remotly?
View 2 RepliesHow 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.
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]...
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]...
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.
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
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 RelatedOn 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 RelatedI have installed oralce-xe 10g on CentOs. I am facing error while connecting it
SQL> connect
Enter user-name: HR
Enter password:
[code]...
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.
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).
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 RelatedI'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.
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 RelatedI'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.
I want to change my default shell to tcsh. I used
Code:
usermod -s /bin/tcsh username
command as given at url
But if I open a new shell, it is still a bash shell.
How do I make my default shell as tcsh?
I've installed fedora 12 on my laptop now i would like to install oracle, i need suggessions for installing oracle on fedora 12 and the installation procedure.
View 3 Replies View RelatedI Have installed oracle 11g release 2 in fedora 12 but after completion of the installation there is no launch shortcut has generated nor any where any icon for launching oracle is given so now how can i run oracle.
View 3 Replies View RelatedHave not done this before. What is the best way to install the Oracle client for 10g on a Fedora 13 machine?
View 4 Replies View RelatedCan someone give me instructions/guide on how to install Oracle Developer Suite 10g on Fedora 14.
View 1 Replies View RelatedSo 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.
I upgraded to fedora 12 today from fedora 11. I had oracle-xe 10g running on my system perfectly fine when I was running fedora 11. now , after the upgrade, i cannot login to sql.it gives the following error
Code:
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 16 12:45:25 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
I have checked listener.ora and tnsnames.ora. they both are unchanged.
[Code]...
I am new to linux and i wish to install oracle 9i in fedora 12 can anyone provide me the details of where and how to download oracle 9i and installation steps
View 6 Replies View RelatedI need to install Oracle on my F15 machine however when I try and run the installer it gives erros that DISPLAY is not set, so I tried adding using XHOST + but that also states no display setting, any idea what i am doing wrong?
root@hrdevdba1 network-scripts]# export DISPLAY=10.171.108.6:0.0
[root@hrdevdba1 network-scripts]# xhost +
xhost: unable to open display "10.171.108.6:0.0"
[root@hrdevdba1 network-scripts]# export DISPLAY=:0.0
[root@hrdevdba1 network-scripts]# xhost +
[Code]...
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?
I was notified by the updater that VirtualBox-3.2-3.2.10_66523_fedora12-1 (x86_64) was available to install. So I clicked [Install Update] and got the following Transaction error:The GPG keys listed for the "Fedora 12 - x86_64 - VirtualBox" repository are already installed but they are not correct for this package.Check that the correct key URLs are configured for this repository.
View 2 Replies View RelatedCurrently I am installing oracle 10g release 2 with Red hat Linux 4.I am getting the following error.
Exception Name: MakefileException
Exception String: Error in invoking target 'ntcontab.o' of makefile '/home/oracle/oracle_10.2/network/lib/ins_net_client.mk'. In forum I saw this kind of post and I did all the steps, then also getting the error.
i am installing oracle database 10g2 in my fedora12 with the help of this link ORACLE-BASE - Oracle Database 10g Release 2 (10.2.0.1) Installation On Fedora 7 (F7)Now i am start my Database using sqlplus:[oraclelocalhost ~]$ sqlplusSQL*Plus: Release 10.2.0.1.0 - Production on Thu Sep 16 10:53:47 2010Copyright (c) 1982, 2005, Oracle. All rights reserved.Enter user-name: /as sysdbaConnected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
[code]...
i was using mysql in fedora, but our instructor has told to use oracle 10 g , as i have to submit a project ,please help me out ,whether how to migrate all mysqld database to oracle in the same format and how to run queries in it
View 1 Replies View RelatedI'm new to linux I love it. I want to open oracle forms 10g in my mozilla which was default in Red Hat Enterprise Linux Server release 5 (Tikanga) ( I'm using). When I tried to open, getting error mess "Install missing plugins". I tried to install plugins manually but no use. Some one said I need to change the "pluginreg.dat" file. But I didn't find that file " /usr/lib/mozilla/plugins " to change.
View 3 Replies View Related