Linux slow to connect to the oracle database - linux

My working system is Centos7. Now I'am develop a web application, it use Oracle Database. So I use instantclient 11.2 to connect the Oracle on my Centos7, it use long time to connect! Although connect successful, but I have to wait for at least 3 minute! The web application startup will init the datasource, for each datasource, it also use at least 3 minute to finish! How odd that my colleague connect or init datasource is really quick by use Windows OS(only I use linux)! The database installed at the linux server(also Centos7). we all use the same network environment! How can I fix this problem? I love Linux so much that I don't want to change to Windows for working! Thank for helping me to solve this problem!(I am so sorry that my English is very bad )

Related

Oracle: failed to fetch data ZABBIX

So i am trying to monitor oracle database replication using zabbix,
my setup is:
oracle database 11g r2
zabbix 5.4
i did install ODBC client in zabbix server and follow this step, my zabbix server can connect with my oracle database via ODBC. But, when i add template 'Oracle Database by ODBC' i got this error:
i already set host macros, here's the configuration:
i turn off firewall, disable selinux, but it's still can fetch data from my database..
can someone help me? or maybe now zabbix doesn't support monitoring oracle database 11g?
thank you
This setup does not support oracle 11. I am pretty sure the template could be adjusted for that but you do need some oracle and zabbix knowledge to get that working.
Years ago I created https://github.com/ikzelf/zbxdb and that does support about each and every release I could find. It is quite a different setup but it also supports more advanced oracle configurations. Maybe it can help you.

Access to database without installing any client/lib

I am currently on a project where I have 2 VM (virtual machine), a Windows and Linux one.
I also have an Oracle database where I have a simple table called "Material".
On the 2 VM, I want to connect to my Oracle database without any client or libraries. The thing is I want to create a script which would run on the VM and can connect to my database and insert some datas to my table "Material" but I can't install anything on my VM (like the mysqlclient for exemple).
So is it possible to connect to a database without installing anything on my VM? Or perhaps can I access to an online client to send my SQL to my Oracle Database?
I know it's quite difficult to understand my problem so if you have any question, feel free to ask.

Linux Based ODBC Connection to iSeries Suddenly Slow?

I have a Python application residing on Ubuntu Server 14.04.04 x86 that connects via ODBC to an iSeries (AS400) instance for reading data. This application has been in production on the same server for almost a year and everything has worked great.
Last week, for whatever reason, the SQL queries became slow to the point where the application was unusable. For testing purposes I configured a Windows 7 pc with the iSeries ODBC connection and copied over the application files. The application runs flawlessly and the SQL queries are executing quickly without any issues. I have since built a new Ubuntu server instance and have configured everything accordingly. On the new Ubuntu instance, the queries are still slow however, the queries on the Windows box are running like they should.
Can anyone shed some light as to what would cause the sudden slow down in query execution time using the Linux based ODBC connection?

Connecting to Firebird on Linux from a CGI application under Apache gives permissions error

I'm writing a small program in Free Pascal on Linux and connecting to a Firebird database on the same server. For testing, I initially wrote a console application using the TIBConnection components in FP and successfully connected to the Firebird database and listed records from one of the tables.
Now I'm wanting to do the same thing from a CGI application under Apache. A sample CGI app with various parameters displays different HTML results via the WebBroker "actions" like expected.
So both preliminary tests, connecting to Firebird and getting a CGI web app running, have worked. The final test is to combine them and that's where my problem is.
Whenever I run the test cgi application and try to connect to the Firebird database, I get a "permission denied" error. I've left the username, password, and port all at defaults, have checked the firewall, switched between "localhost" and "127.0.0.1" and several other things including setting the permissions on the database file to read/write globally (for temporary testing, of course).
I've found lots of information on the internet about connecting to Firebird on Linux and lots of information about writing CGI applications, but very little where it combines the two subjects. I'm sure there's a subtle yet important security or firewall issue, but it eludes me.
CentOS 6.6 64-bit on a virtual machine
Firebird 2.1.7 64-bit
Lazarus 1.4.0 64-bit
Anyone have any suggestions on what I could try?
I figured out how to get it working by reading the solution to a different problem. Not sure why disabling the firewall didn't work (I had to completely uninstall it) and don't know what SELinux is yet (had to set it to "permissive"), but I will need to study those two issues so the live server won't be left vulnerable.

Using Linux to execute a query from Windows server by ODBC connection

Here is the problem: We have a client that uses Progress Openedge database, we need to execute queries on this database from our servers.
Currently the drivers are installed on our Windows server, and the PHP code uses ODBC to run the queries.
Now we would like to move the code to a Linux server. We tried before to work with their linux drivers but that attempt has failed.
The question is, Is it possible somehow to run PHP code on a linux server, this code communicates with the Windows server, runs the query on the Windows server, and return the results to Linux?
How would you access to this problem.
Thanks!
Yes, it's possible. Your question boils down to "how can my Linux server ask my Windows server to do something" (where the "something" happens to be "talk to a database"), and there are a variety of ways to accomplish that. You could run a web service (RESTful or SOAP) on the Windows server, for example.
Make sure you think about security: if you deploy a service on your Windows server that lets remote clients modify a database, you have to be mindful of which remote clients are allowed to use that service. The last thing you want to do is accidentally allow random strangers to run arbitrary queries against your database.
We have a Knowledgebase Article detailing some setup procedures for Linux installations; it also has a video explaining some aspects of the setup. If the other answered haven't provided a complete solution for you, hopefully our article can at least get you started in the right direction.
Also keep in mind that depending on your version of OE, the driver libraries may be different.

Resources