Programming :: Connecting To Remote Oracle Database Using Perl?
Jan 27, 2010How to connect to remote oracle database using perl?
This is what I tried.
Code:
But I am unable to connect.
How to connect to remote oracle database using perl?
This is what I tried.
Code:
But I am unable to connect.
I've just installed the Oracle Instant client using this: https://help.ubuntu.com/community/PHPOracle
The phpinfo() show me that oci8 is enable, but when I try to query that database I've got the following message:
PHP Code:
Code:
How to troubleshoot.
creating the below unix script to run in oracle database .I need a script which should do the following things.
1. The script should insert row count of a table from one database(A) into table (AB) in another database(B).
2. The script should update tow count of the similar table and tablespace from database (B) in to a table AB.
3. The script should update the status column of the table AB as: 'Y' if the rowcount of the table@A and rowcount of the table@B matching. or else it should update 'N'
For Perl I need to understand a few things. It's unlikely that anyone will be able to give me direct answers but if they could point outI'm trying to hack down an existing script http://eoylpac.org/source/eoy.pl. What I need to be able to do (in a nut shell):1. Open a database2. Read the values for each uniq id and execute a subroutine for each of those values. (The subroutine already exists in the above file 'do_pdf').
View 5 Replies View RelatedI need to get some information like cpu usage,free memory,swap memory and other information from a bunch of remote hosts.Can any one tell me of a good perl module which does that.I dont want to use Net::Rsh or Net:SSH.
View 14 Replies View Relatedi 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]...
translationables,i.e,camp_generic_transcamp_generic_trans_defcamp_generic_trans_epcthese tables exist in cntr1/cntr1@camABC1I have to copy these tables from here to staging environment.I need to first check if any of the tables exist in staging.If yes,then delete and create new.There are 4 staging env from 5 to 8.I have to pass the staging environment as parameter to ask the user which environment does he want the tables to be copied
View 1 Replies View RelatedI'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).
Currently using oracle 9i with 3 database(maindb,arist,samp) in redhat 5.3 server .I want to stop 2 database "maindb" and "samp" manually ( in XP or Vista we can stop service oraclemaindb and oraclesamp ), but in redhat i dont know how to stop services and how to see currently running oracle services.
View 1 Replies View RelatedI have a dbora script that i've been having fits with. Running RH EL 5.
#!/bin/sh -x
# chkconfig: 345 95 10
# description: Oracle auto start-stop script.
[code]...
I'm trying to access my oracle database (port 1521) from the outside.What I have:Outside -----> Proxy ----> DatabaseWhat I try is to configure a reverse proxy or iptables for accepting connections on port 1521 and transfer them to database. Only one computer of the outside will have access to the database.I suppose than this can be done with iptables or another way.In the real environment proxy will have two nicut for test purposes my computer will have only one (for test purposes, the tree computer will be in the same net)
View 11 Replies View Relatedin order to do full backup system, i have to shutdown the oracle database. My backup software can stop the services by running the shutdown script. But in order to shutdown the oracle database, the script must be run under oracle privilege. The conflict is our backup system which is reside under root privilege cannot run the oracle shutdown script which is needed to triggered by oracle privilege.
View 1 Replies View RelatedHow to compare oracle database table contains using (Perl/Shell)scripts.
View 4 Replies View RelatedMy DataBase Teacher wants us to install SQL 2008 cause on 3 days i gotta practice for the big test But the requirements are a ton "Visual Basic 2008 with service pack 1 & IIS" but thats just a tiny part of the problem.! My Windows 7 crashed.! So iam thinking can linux oracle be the answer of my ugly problems.?!Can SQL 2008 open database made from linux Oracle?
View 3 Replies View RelatedI'm trying to configure a reverse proxy for Oracle Database connections. What I have:
Host outside --> Reverse proxy --> Oracle Database
The "Revese proxy" has two IP, one for local and another for outside.I've tried with iptables, but unable.Now I'm trying with "redir".When I do a tnsping database, it works and says OK. But executing sqlplus user/pass@database, it tries to connect but time later I receive a timeout. What i do is a redir from port 1521 in "Reverse proxy" to 1521 in "Oracle database" why this doesn't work or any other way to do it?
I need to check with nagios an oracle database that is located on a server. There are a lot of plugins that are provided, the problem is that the database is located on a remote server (i have an hostaddress) and then i need to log on the database (i have username and pass)So i only need to have a plugin that connects to that hostaddress and logs on, but i can't find any plugin which does that
View 14 Replies View RelatedI need to configure autostart of oracle database 11g & oracle soa suite 11g after successful OS startup. Linux: Redhat version 5. I have commands needed for startup, but not sure on where to keep the file.
View 2 Replies View RelatedWe have a Dell PE6600 with a QLA2460 FC HBA in it. Server is running RedHat AS 4.7 (kernel 2.6.9-78), FC driver used is the file qlafc-linux-8.02.23-3-install.tar downloaded from the QLogic website. On this server is an Oracle database running (11.1.0.6). Files for the Oracle database are located in mountpoint /u02. The SAN is an iQStor 2880. Since several weeks we suddenly have problems with the Oracle database after a reboot of the server. After a reboot the mountpoint /u02 is readable and writable (tested by creating, opening and removing files).
However, when we try to start the database we get an error which give you the idea that the database is corrupt. The Oracle error is quite a general error. After doing a lot of testing we found out that if we unmount /u02 and mount it again (using mount -a so it reads the /etc/fstab), the database can be started after all. So the database is not corrupt but for some weird reason we have to remount /u02 first before the Oracle database can use it. We don't know if it's a linux issue, fibre issue, san issue or an oracle issue.
I have installed Redhat Enterprise Linux Server 5 on my laptop. I want to install Oracle 10g database on RHEL5 server. I want to know whether any additional rpm's need to install before installing the Oracle 10g.
View 1 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.
At work we have a Sybase Adaptiver Server 9.0 database running, it has to stay there for now, and we are developing a web application that will connect to it using PHP.I was already able to make it work using ODBC on Windows and using odbc_connect on PHP.But now we are moving to Ubuntu, and we are trying to get it to work on it.I already have Apache2 and PHP5 up and running.There are two ways (I can think of) we can do this, one is using ODBC and then use "odbc_connect" and the other is making "sybase_connect" work on PHP. Being the latter probably the best one since you wouldn't have ODBC as an intermediary.
Either way, as long as it works I'm happy. ODBC would be fine to meet our requirements for now.I already have ODBC Data Source Administrator but no idea how to create/include/add the Sybase driver.We also tried setting freetds up, but that didn't work either, we might be missing something.
Well i have got a problem with connecting to a mysql database using php. I used this package "mysql-noinstall-5.1.44-win32.zip" and extracted it to c:mysql and added c:mysqlin to the PATH variable and used the following command in command prompt to start mysql: c:mysqlinmysqld --standalone
well mysql did start and everything went well accessing mysql in command prompt. Well under the database "mysql" in the table "user" i created a new user "php" with a password="****" and hostname = "localhost" but when i try to access this database with a following php routine:
And when i accesses it with my browser using localtost/test.php, all i get is "localhost" displayed on screen, "Connected to mysql" never gets displayed not i get any error..i am using windows 7(32-bit-ultimate)and mysql 5.1.44.
I want to connect to MySQL Database installed on RHEL 5 using perl v 5.8.8.The available DBD perl drivers installed on my machine are:DBM, ExampleP, File, Pg, Proxy, Sponge..I downloaded DBD-mysql-2.1012 and tried installing DBD again but got the following error:Can't exec "mysql_config": No such file or directory at Makefile.PL line 167.readline() on closed filehandle PIPE at Makefile.PL line 169.On searching I found that I need to install libz-devel prior to installing driver for MySQL for Perl.
View 1 Replies View RelatedI've installed Oracle XE yesterday (forcing architecture, cause i am using amd64), it was working fine until i reboot my computer.
At the beginning i wasn't able to start because i was getting an error:
- "Operation failed. my_user is not a member of 'dba' group."
So, i went to System -> Administration -> Users and Groups -> Manage Groups -> (selected 'dba') -> Properties, and checked my user.
But now, when i click on "Start Database", the cursor stay 'waiting' and after some time it goes back to the pointer and nothing happens. On "Run SQL Command Line" i get "SP2-0640: Not connected" and in "Go To Database Homepage": - "Firefox can't establish a connection to the server at 127.0.0.1:1234"
(When installing i chose port 1234)
Now i cant uninstall it (I've installed it through dpkg for forcing architecture, and opening the .deb package i don't get the "uninstall" button)
I've got a database and I've got a Java program that I'm programming in Netbeans that is suppose to run queries to the database. how I will set about to connect the database with the Java program so that I can run the queries?
It is very important that I learn how to do this, else I am forced to go back to XP in order to finish this project on time.
I get some trouble setting up good environment in linux.. i have problem regarding connecting php(under linux) to a sybase server(under windows),,, is there anyway connecting this two technologies?..
View 7 Replies View RelatedWe are hoping to build a central database server so that we can take all the singular instances of mysql off our web servers and have the data stored in one place (we also run a number of syslogging servers that use mysql, netflow servers that use mysql, and many other servers that have mysql tables that we would like to consolidate as well). Now I have run into the problem that requires all the customer web sites to change the configuration for their connection to the mysql server from a local connection to a remote connection, which is something we are trying to avoid. I am wondering if there is a software suite or a function of mysql itself that allows you to present the remote database information as local databases to a server, allowing customer configurations to remain intact, as if the mysql server never moved off the local machine? Or a different question, can you configure mysql server to take local requests and forward them to a central mysql server?
View 9 Replies View RelatedI have recently installed Java in my Ubuntu 9.04 environment so that I can teach myself Java. Basic Java programs work, but I am having trouble connecting to a MySQL database. I installed these packages using Synaptic Package Manager.
1.gsfonts-x11
2.java-common
3.odbcinst1debian1
4.sun-java6-bin
5.sun-java6-jdk
6.sun-java6-jre
7.unixodbc
After these packages were installed, I was not sure if I needed to do this, but I downloaded the MySQL connector from MySQL :: MySQL Connectors and installed in a directory called /home/mark/mysql/.
I then did "sudo gedit /etc/environment" and added a CLASSPATH to where I installed the connector:
Code:
I found an example Java program from Using JDBC with MySQL, Getting Started and stripped it down even further to test the MySQL connection.
This is the program I am running:
Code:
Could not find the main class: Jdbctest. Program will exit. I am new to Linux, Ubuntu, Java and MySQL, so I have probably left out something that is very obvious.
I'm new to linux, and setting up the mysql database server.
Here are my situation:
OS: CentOS 6
mysql version: 5.5
I tried to use MySQL Administrator to connect to my database on the host 192.168.1.120
and my computer is under the same network with ip: 192.168.1.105
But it shows the error msg: Could not connect to MySQL instance at 192.168.1.120
Error: Can't connect to MySQL server on '192.168.1.120'(61)(code 2003)
On the server side I've tried:
Code:
skip_networking is off and I've set the port for it.
When I check the process in OS:
Code:
When I try netstat:
Code:
I thought it's the problem of firewall, so I have check it also:
Code:
I'm trying to connect to a remote database but can't connect directly (I think due to security reasons). Here's the setup:
Computer A - my computer
Computer B - server, I can SSH to this from computer A
Computer C - server that runs database, I can SSH to this from B but can't from A
Any ideas how I can can connect to C directly from A? I think I need to setup a tunnel or something like that but I can't figure it out.