Connecting to PostgreSQL Data Source in SQL Server Import Export Tool - postgresql

I'm trying to setup an easily-replicable (or even manual and I do it once a month or so) process for moving data from a large Azure PostgreSQL database to a more manageable Azure SQL database for end users that are most familiar with SQL Server. I've successfully connected to the PostgreSQL database via PGAdmin, so I know all my connection string info.
I started by installing the latest ODBC driver from here.
I then used a connection string which was given to me from the Azure portal, filled in the proper database name and password, and attempted to use the following drivers:
PostgreSQL ODBC Driver(UNICODE)
PostgreSQL ODBC Driver(ANSI)
I am getting the following error with either of them:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
What step am I missing in this process? Or how best can I troubleshoot this?
After more research, I attempted to add the ODBC driver here:
And got the following error (I'm not sure why Tableau is relevant to this?):
Thank you.

Related

Has someone connected a PostgreSQL DB hosted in GCloud with Microsoft SSMS?

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

Failed PostgreSQL database connection in Pentaho Data Integration PDI

Objective: Set up a connection with PostgreSQL db in PDI. I'm a noob in all this stuff, so each step forward requires long resolution time.
I'm trying to set up the connection to a PostgreSQL database in order to prepare some queries for an ETL process in PDI. But there's no way to succeed with the connection.
I've tried with PostgreSQL connection type and with Generic database connection type and the error is always related with the drivers.
The version of the PostgreSQL db I'm trying to connect is 9.5.25 and I'm working in Ubuntu 20.04 and Java 8 as demands Pentaho Data Integration.
Below the error message after failed connection:
"Connection failed. Verify all connection parameters and confirm that the appropriate driver is installed. Connection to [IP]:[Port] refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections."
I am literally in despair, don't know what I'm doing wrong. Will be very grateful with anyone who can help me.
You need to add the jdbc driver to connect to postgresql DB in the pdi-installation/lib directory, you just put the *.jar file there and restart spoon to have the library available.
That driver can be downloaded from postgresql downloads. The Community Edition of PDI only comes with a small number of jdbc drivers, for each type of database you need to connect to, you should check if the jdbc driver is available in that directory, and if it's up to date or if you need a more recent version of the driver.
This is a link for the official Pentaho documentation, looking for information in Hitachi Vantara documentation is becoming more and more difficult, they don't always clarify what steps apply only for the Enterprise Edition and are not available for the Community Edition: https://help.hitachivantara.com/Documentation/Pentaho/9.2/Setup/JDBC_Drivers_Reference

Postgres OLBC Connection error: FATAL: No pg_hba_conf entry

I am trying to create a linked server between the warehouse and a amazon cloud service.
The service provide is using a PostgreSQL database.
I have installed the ODBC Driver (12.10) on my server but I keep getting this error.
I am not sure how to work around this as I have never used Postgres before.

Is there a way to use Flyway on AS400?

I need to implement migration tool like Flyway in order to use Jenkins to deploy DB changes.
I tried to add jt400.jar file and added configuration as follows:
flyway.url=jdbc:as400://192.168.171.251:446/DBDEV
flyway.driver=com.ibm.as400.access.AS400JDBCDriver
as a driver and it would not connect with this message:
ERROR: No database found to handle jdbc:as400://192.168.171.251:446/DBDEV
I also tried with using IBM DB2 driver and had configuration
flyway.url=jdbc:db2://192.168.171.251:50000/DBDEV
flyway.driver=com.ibm.db2.jcc.DB2Driver
this time I am getting this kind of refusal message
ERROR:
Unable to obtain connection from database (jdbc:db2://192.168.171.251:50000/DBDEV) for user 'DEVUSER':
[jcc][t4][2043][11550][4.26.14] Exception java.net.ConnectException: Error opening socket to server
/192.168.171.251 on port 50,000 with message: Connection refused (Connection refused).
ERRORCODE=-4499, SQLSTATE=08001
With this test migration I am trying to create a simple table by executing this sql
CREATE TABLE PERSON (
ID INT NOT NULL,
NAME VARCHAR(100) NOT NULL
);
Anyone had this situation and solved it?
I believe that at present there is no support for flyway to work with IBM i (as/400) regardless of whether you use jt400.jar or an IBM jdbc driver.
You can either use a different database-schema versioning tool, or find a fork of flyway that supports i-series (or pay someone to create and support such a fork, it is open source...).
It seems that currently (flyway 7.7.2) does not recognize a URL that starts with "jdbc:as400:" as a Db2 URL, so it throws an exception, which is the reason that the jt400.jar style URL is rejected with exception:
"No database found to handle ..."
The github history tells a story (see: https://github.com/flyway/flyway/issues/105).
Looks like the devs did not succeed to get the AS400 support added due to the lack of a suitable available i-series testing/dev environment (and also available to travis ci) . There may have been at least one PR for such support in the past, although it seems to be removed.
If you try to use the IBM db2jcc4.jar driver to connect to i-series (as400) with a url similar to: jdbc:db2://hostname/dbname, and you explicitly use an IBM jre , and have the relevant license file (e.g. db2jcc_license_cisuz.jar on the CLASSPATH), then flyway will connect and then report the exception similar to:
Unsupported Database: AS 7.4
The flyway source code shows that flyway does not recognize this database product-name and version, at current flyway version 7.7.2.
Are you sure DBDEV is the name of your Db2 data base on the IBM i?
Use the Work with RDB Directory Entry (WRKRDBDIRE) from the green screen, and look for the *LOCAL entry.
Or use the Access Client Solutions (ACS) "Schemas" tool to see a list of DB on your system.
The above shows 2 DB's, UT29p63 and Dbtest

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.