I downloaded and installed on Windows the following:
IBM DB2 Runtime Client (64-Bit) 10.5
with the aim of connecting to a remote server database.
It installed here:
C:\Program Files\IBM\SQLLIB
But I don't see any DB2 folders in there.
I tried to catalog the remote db like this:
db2 catalog tcpip node testing remote the.server.com server 446
If I then try to connect to it, I get the following:
SQL1031N The database directory cannot be found on the indicated file system.
There is some wizard installed called the 'Default DB2 and IBM Database Client Interface Selection Wizard'. I ran this and it said it would create a default DB2 copy and would be used by default, called DB2COPY1 and it would be installed to C:\Program Files\IBM\SQLLIB.
But I'm nnot sure what this is doing really.
What do I need to do here to connect to the remote DB2??
EDIT:
I have managed to get a bit further based on this article here:
https://www-01.ibm.com/support/docview.wss?uid=swg21008914
my current commands look like:
db2 catalog tcpip node tstnode remote my.server.com server 446
db2 catalog db db1name as mytstdb at node tstnode authentication server
db2 catalog dcs db db1name as A123456DAT
db2 terminate
db2 connect to mytstdb user <username> using <password>
However the connect fails with:
SQL30061N The database alias or database name "A123456DAT " was not
found at the remote node. SQLSTATE=08004
Any ideas?
If you are connecting through port 446, I guess you are trying to connect to DB2 for IBM z or DB2 for IBM i. If yes, you will need at least Db2 Connect.
Regarding error "SQL30061N The database alias or database name "A123456DAT " was not found at the remote node. SQLSTATE=08004" it happens to me when the userid does not have some priviledges on the source system. If it is an IBM i, look at the corresponding spool file. DRDA Connections are attended by jobs called QRWTSRVR. With the IBM i command WRKSPLF SELECT(USERID) (changing USERID by the user trying the DRDA connection) you can see the spool files for jobs related to your connection. Usually spool file messages are very specific on the cause of the failure.
If you are trying to connect to DB2 on z, I don't have experience.
Related
I have a question, I do not know how to solve it yet. Perhaps someone here has faced a similar issue.
We have a PostgreSQL DB hosted on Gcloud. We usually use a cloud proxy to connect with the database. It usually works very well!! In a nutshell the proxy connect a port from local host, to the actual DB host.
However this time, we want to connect it with Microsoft SSMS. We have not find an option where we can connect Microsoft SSMS with a DB running locally (this means connecting to a database on a port in local host).
The ultimate goal is to connect the database with Power BI. So if someone know how to connect a PostgreSQL DB hosted in GCloud to power BI that would also be very helpful!!
We have followed this tutorial:
https://www.anibalum.com.ar/2020/06/creating-linked-server-with-postgres.html
However we get the following error:
The linked server has been created but failed a connection test. Do you want to keep the linked server?
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "PAPERFLOWDB".
OLE DB provider "MSDASQL" for linked server "PAPERFLOWDB" returned message "[Microsoft][ODBC Driver Manager] Invalid connection string attribute".
OLE DB provider "MSDASQL" for linked server "PAPERFLOWDB" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". (Microsoft SQL Server, Error: 7303)
We are using Microsoft SSMS v18.9.1
Can you guide me about the connection between mongodb and power bi through ODBC driver. I have connection between them. but i got unexpected errors like:
"OLE DB or ODBC error: Exception from HRESULT: 0x80040E4E." , "OLE DB
or ODBC error: [DataSource.Error] ODBC: ERROR [42S22] [MySQL][ODBC
1.4(w) Driver][mysqld-5.7.12 mongosqld v2.14.3]Unknown column 'COD' in 'field list'."
and
"DataSource.Error: ODBC: ERROR [08S01] [MYSQL][ODBC 5.3(w) Driver Lost
conection to MySQL server at 'waiting for initial communication
packet', system error: 10060".
Can you tell me where the problem and how can I overcome on it?
I've had the same problem, try to go over the below steps and take a look at my advice under the fourth point (4).
Install mongosqld on your server based on your OS (first prerequisites).
LunchBI connector:
a) Make logs folder and mongosqld.log file in it.
b) Setup mongosqld.conf (IP:<your_server_ip>, PORT:3307)
Install mongosqld as a System Service link
Create a system DSN on your computer based on your OS, link.
Hint: On Windows (in ODBC data source) try to make both ANSI and UNICODE
connectors and do not forget to select a database in the dropdown menu.*
e.g. connect to Mongo via PowerBI via ODBC
a) Select a connector
b) Select the database, that you have selected in the previous dropdown menu.
For more information follow the official guide
you have to install mongosqld on your server and configure the .yalm file.
Inside it you have to uptade 'bind ip' field, by adding the remote ip.
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.
I am trying to use my local DB2 Express-C edition to access remotely a db2 database running on a remote machine at IP 192.168.48.189. The remote machine is running a DB2 Workgroup Server edition.
They are both version v10.1 and I am running them on LINUX.
First of all Is that possible?
When I try the following call it always returns me this error.
If I understood correctly
db2tcp1 is a new node I need to create on my local to be able to connect
db2inst1 is the db2 instance name of the remote db2 instance.
My local instance as well is named db2inst1 like the remote one.
Is my command below correct?
db2 "CATALOG TCPIP NODE db2tcp1 REMOTE 192.168.48.189 SERVER db2inst1"
SQL0512N A three-part name "" that references a remote object is not
supported in the context in which it appears. Reason Code = "".
You can catalog remote databases in your local installation, it does not matter the db2 edition. Your command has a problem with the "server", you put the port number there. I know, that is weird.
Once you have catalooged the instance you will catalog the databases. Make sure to open the ports between two servers.
I have two instances on two separate AIX servers. Both DB2 databases are up with their sample databases. I want to connect with one DB2 instance from the other instance.
I am new on DB2 and want to know how can I do that.
I have executed following commands:
This path is client instance:
#. /home/db2inst2/sqllib/db2profile
db2 catalog tcpip node db2serverinst remote lpar1 server 50005 remote_instance ctginst1
db2 => terminate
DB20000I The TERMINATE command completed successfully.
# db2 connect to db2serverinst user ctginst1
Enter current password for ctginst1: SQL1031N The database directory cannot be found on the indicated file system.
SQLSTATE=58031
The term "Connect to an instance" is not correct. The correct one is to attach:
Machine A
db2inst1
db-1
db-2
sample
Machine B
db2inst2
db-3
db-4
sample
db2inst3
sample
If you want to execute commands from Machine A into Machine B, you have to catalog db2inst2 AND/OR db2inst3 in db2inst1 (catalog tcpip node). Remember that you have to give different names to each cataloged object.
Once you have cataloged a remote instance, you could also issue database commands, but you have to catalog remote databases. You can have a remote sample, and a local sample, but alias should be different.
If you cataloged db2inst2 instance as db2inst2 node in local node from Machine A.
And you cataloged sample database as sample-2 alias in local node from Machine A.
You could execute in Machine A.
db2 attach to db2inst2
db2 connect to sample-2
Attach is for 'administrative' things, like list applciations, create db, etc.
Connect is to use the database.
You have only cataloged DB2 instance. You need to catalog the database at the remote server:
db2 catalog database XXXX at node db2serverinst
Obviously, you'll need to replace the XXXX with the actual name of the remote database. Once you've cataloged the database, you can then connect:
db2 connect to XXXX user ctginst1
Note, this only defines the connection. You won't be able to access objects within this remote database from other databases within the local instance without configuring federation.