I am trying to allow php scripts running on my Linux openSUSE system to access IBM DB2 mainframes running Z/OS. I am having problems installing some kind of required license. [Stackoverflow #02484][1] provides good background on what is going on but no detail.
I was originally instructed to install the Enterprise edition of the ibm_data_server_driver_package, this went well and my php script worked fine with a local express version of db2, but failed when I tried to access our company mainframe with:
[IBM][CLI Driver] SQL1598N An attempt to connect to the database server failed because of a licensing problem. SQLSTATE=42968
This 'Enterprise' data server package does not appear to contain any of the utilities needed to install licenses. I was then directed to download and install an ibm_db2_connect_unlimitedEdition_SystemZ_QuickStart_Activation_11.1 this contained a simple script db2connectactivate.sh which called a java program, which I used as follows:
java -classpath db2jcc.jar:db2connectactivate.jar com.ibm.db2.jcc.DB2ConnectActivate -caller db2connectactivate.sh -host x.y.z.com -port 7777 -database abc123 -user UUUUUU -password XXXXXX -activatorsqlid '$DDDDDD'
It failed:
[license activator][709][13431]Activation failed.
SQLCODE: -552
SQLSTATE: 42502
Message: DB2 SQL Error: SQLCODE=-552, SQLSTATE=42502, SQLERRMC=$DDDDDD;CREATE PROCEDURE, DRIVER=3.71.22
The local DB2 support staff are all Microsoft based and little help on Linux. They state my account does have sufficient rights and then tried to get to me to all kinds of things with a 'db2' command which did not exist. I am confused. Where is the license? Is it on the main frame or was it within the QuickStart_Activation pack? What does the java program do, does it download and save any keys or tokens which need saved? I have tried running the java program as local root and as myself.
Can anybody explain what is going on and what I have to do to licence my driver?
There is DB2 and then there is DB2. Depending on the particular DB2 server variant you MAY need a license from IBM to enable the driver. There appears to several different types and ways of installing the licence, depending on your agreement with IBM and how you connect to the DB.
The server may not require a license for the driver to connect at all. This applies to the DB2 express edition.
The mainframe edition may contain a special license allowing any driver to connect without particular licence set-up. This may be the unlimited variant.
A licence file may need to be added to each driver as it is installed. This may be the enterprise variant.
This is in addition to the account you use to perform the install needing appropriate rights on the DB2 server. Depending on how you install the client the messages are unclear and indicate the account has insufficient rights rather than a licence is missing. The driver installation appears to differ considerably depending on the licence situation.
In our case IBM support were particularly unhelpful. Indeed two months after engaging with IBM support we still dont have a working driver!
SQLCODE=-552 means that authorization-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation
Could you run with parameters as below with correct database, db user and password.
./db2connectactivate.sh -host x.y.z.com -port 7777 -database abc123 -user db2admin -password adminpassword
take a look at db2connectactivate - Server license activation utility
Related
I've successfully installed the Pervasive 13's 64bit Client onto Ubuntu Server 18.04.
How can I now establish a connection to the Pervasive 13 server (which is installed on a Windows 2008 R2 server) and perform a sql query?
I'm extremely confused by the documentation, which directs me to the bcfg tool after client installation. I'm not clear if that tool is for configuring the server or for setting up the client connection. Ether way, the documentation is too abstract for my comprehension; I need concrete examples of someone successfully establishing a connection to (at least a hypothetical Pervasive server located at some hypothetical ip address) and NOT JUST abstract syntax that never shows an example of SQL statement being submitted from command line Linux.
Seriously, the documentation covers so much detail of stuff I don't immediately care about, that I can never seem to figure out my practical needs which are to simply establish a connection to the database, perform a SQL query, and get a result set.
The installation of the client should have sensible defaults, and the documentation, after installation, should focus on getting you connected and running sql statements as quickly as possible, instead of going on and on about details that are only of interest if the defaults aren't sensible. Let me connect first! Then if I have a problem, only then do I care to learn further detail about other aspects of configuring the connection.
Pervasive is such an obscure database server, that I'm left with only this documentation to figure this out. Any other database would probably have YouTube videos that show you how to install the client, and start making some SQL queries and getting result sets.
Someone at Actian, ought to be kind enough to make a quick start video for the client on Ubuntu Server that quickly covers installation and finishes where you're submitting sql queries and get result sets. After all, that's the purpose of database client.
Can someone please provide some concrete examples of how I can turn this successful installation into a relationship with the database server where I can submit SQL queries and receive result sets?
I'm not sure why the documentation points to bcfg.
If the Client is installed and didn't display any errors, you need to add an ODBC DSN using dsnadd (https://docs.actian.com/psql/PSQLv13/index.html#page/uguide%2Fuguide.dsnadd.htm%23ww68699). An example of creating a client side DSN pointing to a remote database is:
dsnadd -dsn=clientDemodata -db=Demodata -host=WindowsServerName
(where clientDemodata is the DSN created on the Linux box, Demodata is the PSQL database on the remote server called WindowsServerName).
Once the DSN has been added, you should be able to use isql or isql64 (https://docs.actian.com/psql/PSQLv13/index.html#page/uguide%2Fuguide.isql.htm%23ww138933) to execute a query.
Running isql / isql64 with just the DSN will let you execute SQL queries interactively:
isql64 clientDemodata
An example of running isql using a file as input for the SQL statement(s) is:
cat two-queries.sql | isql clientDemodata -b
If you've done all that, what errors or behavior are you seeing?
I'm working with python 3.6 on ubuntu 16.04 and trying to connect with Oracle database which is installed in another machine. So i have installed "cx_Oracle" python module by following this link.
Now, my doubt is what is the necessity to install oracle client in my machine when i need to access the database from another machine in my python script?
The Oracle Client libraries provide all the necessary network connectivity (e.g. things like network encryption), connection management (e.g. connection pooling), high availability features, cross platform and Oracle-version support, data caching, etc etc etc. They are used by many different user and applications. They have significant engineering in them, not to mention testing.
cx_Oracle makes calls to the Oracle Client libraries (which are freely available in Oracle Instant Client), so you need those libraries.
On installing kurento-media-server-6.0, it automatically created an extra account "kurento" and the password is still unknown. Although it does not have sudo access, but still an unwanted user account is a security concern.
On deleting user account, kurento-media-server does not function properly and has to be reinstalled. What is the significance of that account or why this account is being created?
OS: Ubuntu 16.04.3 LTS 64-bit
That is how almost all "service" applications work on Ubuntu, and is actually a security feature. Installation of an application creates a user that is used only by that application and can have its privileges limited to only what that application needs.
For example, Apache uses www-data, Nginx uses nginx (or www-data if you install from certain sources), PostgreSQL uses postgres, MySQL uses mysql, Postfix mail server uses postfix, etc.
There's no reason for this to be a security concern. The password isn't "unknown" as you say, there is actually an invalid password -- meaning that it is impossible to log in to this account unless you give it SSH keys or use sudo -u (which only administrators can do anyway).
Just leave the account the way it is.
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.
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.