DB2 Connection String in IBM iSeries/AS 400 - db2

I tried searching in the internet for the right connection string for this DB2. Just wanted to know if anyone is familiar with this. Below are the details of the database I want to connect to.
Driver : DB2 iSeries/AS 400
JDBC URL : jdbc:as400://eagle1.eaglegl.com/EAFEDPRDDF/
Host : eagle1.eaglegl.com/EAFEDPRDDF/
Username : *****
Password : *****
Thank you.

Your problem may perhaps be that you do not have a DB2 on i OLE DB driver installed.
Depending on which of the two 'standard' IBM i clients your organisation uses, have a look at either:
IBM i Access for Windows: https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/rzaik/rzaikoledbprovider.htm
(you'll need to change version to the correct one for your system)
or:
IBM i Access Client Solutions :
http://www-01.ibm.com/support/docview.wss?uid=nas8N1022156
P.S. the 'as400' moniker is specifically for jdbc connections using the IBM i Java Toolbox.

Related

SQL Developer missing a library

I'm fairly new to Oracle SQL developer. As I'm trying to make a new connection via TNS, I'm getting this error down below which I've been looking to solve for a while fruitlessly.
Error Message:
Statut : échec -Echec du test : no ocijdbc18 in java.library.path
Assuming MySQL is a typo (You are using port 1521, which is the default port for Oracle database, also its giving you ODBC error, so I assume its an Oracle database. Remember that you can connect SQL developer to a MySQL database, so please clarify if you want to connect to a MySQL database rather than Oracle) your problem is due to lack of Oracle Data Base Connector driver (ODBC). From this link download the latest version of Oracle Instant client and install it on your machine. Then define ORACLE_HOME to the path of Instant client installation (To the actual installation folder, the one that contains folders like bin, network and so on) and restart SQL Developer, then you should be good to go.
P.S. : as #thatjeffsmith has mentioned correctly in the comments, it's not necessary to have Oracle Client and/or ODBC (or similar) drivers in order to connect to an Oracle database. Using basic as the connection type and adding the correct connection info would suffice. This Article in Oracle Magazine has extensively talked about the different connection types.

Passing ssl certificates paths to PostgreSQL ODBC driver

I'm attempting to connect to a Postgres database that requires the client pass the paths to client and server SSL certificates using the ODBC driver for postgres. I'm using psqlodbc v11 x86 on Windows 10. I need to have three options passed to the ODBC driver sslrootcert, sslcert, and sslkey. I know that the paths are not being passed by the odbc driver since when I connect using the following connection string where I specify the pqopts it is able to connect.
Driver={PostgreSQL UNICODE};Server=XXXX;Port=5432;Database=XXXX;Uid=XXXX;Pwd=XXX;sslmode=verify-ca;pqopt={sslrootcert=C:\\ssl\\pgSQL.ca.cert sslcert=C:\\ssl\\pgSQL.cert sslkey=C:\\ssl\\pgSQL.key}
According to the document section
Advanced Options 3/3 Dialog Box->Libpq parameters, I should be able to pass the parameters by typing the values within the braces directly into the text box. It displays the error message saying that it cannot find the certificate because it is looking in the default location and is not using the value that was provided in the Libpq text box. Am I doing something wrong? Any advise on how to connect passing client certificates would be greatly appreciated.
Answering this in case anyone else finds this useful. The problem seems to be that the Test button on the ODBC Driver doesn't take the options set in the libpq parameters into account and just uses the default settings. When I saved the ODBC connection closed the ODBC Data Source Administrator window and used the connection from a different program it was able to connect successfully.

IBM data studio not connecting to local DB2 databases

I have installed DB2 10.5 version on my local Ubuntu 12.04 Machine. Now i need a GUI. I already tried squirrel-sql & Db-Visualizer. While Db-Visualizer give me the view-only database structure, squirrel-sql give me some more options to manage. But now I need a DB2 administrator tool, which can handle all this tasks plus backup/restore, import/export etc.
I have listen a lot for IBM Data Studio as de-facto tool for DB2. So I installed it. After install completion, I am unable connect to my DB2 databases/schemas. It is surprise As I am easily can connect my Dbs through squirrel-sql & Db-Visualizer but IBM Data Studio refuse to connect. It give following errors during try.
Full message content: [jcc][t4][2043][11550][4.17.30] Exception java.net.SocketException: Error opening socket to server localhost/127.0.0.1 on port 50,000 with message: Malformed reply from SOCKS server.
An attempt was made to access a database that was not found, has not been started, or does not support transactions.
Ensure that the specified database name exists in the system database directory. If the database name does not exist in the system database directory, either the database does not exist or the database name has not been cataloged. If needed, issue a db2start command and then resubmit the current command. SQL4499N A fatal error occurred that resulted in a disconnect from the data source. SQLSTATE: 08004
I have specified,
Local : Db2 for Linux, Unix & Windows
Database : <mydbname>
Host : localhost
Port Number : 50000
UserName : db2inst1
Password : XXXXXX
Default Schema : db2inst1
Anybody can suggest if extra steps needed to connect.
UPDATE : Pastebin Link for Stack Trace : http://pastebin.com/ySmrFKNV
UPDATE 1 : Search online for DB2 forums for same problem, Somebody suggested to check system proxy settings. So yes, My system have proxy settings enabled. But even after set proxy to NONE in Netwrok Settings in Ubuntu, problem still persists.
UPDATE 2 : Issue resolved after reinstallation of Data Studio. No idea what problem came, But now it working with same settings.
Not really a answer. But issue resolved after re-installation of Data Studio. No idea what problem came, But now it working with same settings.

Remote Database Connection Setup in Netbeans

I'm totally junior in this area :)
I have JAVA version 7 on my PC.
I want to connect my PostgreSQL database to NetBeans.
Based on my search I found that I should get JDBC driver. so I downloaded JDBC41 Postgresql Driver, Version 9.3-1100 jar files from here.
then based on what I found for connection remote Mysql, did similar changes to connect to my PostgreSQL database.
As you can see in the image, connection couldn't established.
Based on what my host says, I added my IP address to "Remote PostgreSQL Database Access" page of my host.
I'm not sure my host name is correct. I used Dedicated IP Address of my site.
Any suggestion would be appreciated. Thanks
My fault was entering wrong user name and pass instead of using user name and password of database :(

How does ODBC pull database connection details?

I currently have a Macro which is connecting to a sybase database using ODBC. It's making the connection by running the following:
Set conX = wrkODBC.OpenConnection("Connection1", , True, strConn)
where strConn = "ODBC;DSN=Server_Name;APP=Daily Task;DB=db_name;UID=uname;PWD=pwd;"
The problem I am having is that this connection is working for some Server_Name's but not others. When it doesn't work I get a Error "3146 - ODBC--call failed".
What I don't understand is where it is pulling the server details from. So for example, when using embarcadero rapid to connect to a sybase database, it will use the sql.ini file to pull the server connection details based on the server_name.
I have checked and all the Sybase Servers I am testing are in the sql.ini file and my env variables are pointing to the correct sybase version. I've checked ODBC and it is only picking up a SQL Server driver.
Can anyone please explain how ODBC pulls the server name connection details? I don't understand why it works for some server names, but not others (FYI, I have tested the uname and pwd is rapid to make sure it is correct).
Any information would be much appreciated.
So, the issue was that I was looking at my odbc connections under control panel. I should mention that I am on windows 7. What I had to do was update my ODBC connection details here:
C:/Windows/SYSWOW64/odbcad32.exe
--This is for 32bit!
This had some connections set up which is why I could connect to some servers but not all of them.