PostgreSQL ODBC - EnableBulkLoad parameter - postgresql

Please, help, Does "EnableBulkLoad" parameter (maybe under a different name) exist for ODBC PostgreSQL driver?
Watched ODBC driver(version 11.0) from https://www.postgresql.org/ftp/odbc/versions/src/ and can't find in docs about this parameter(
Tried add it in odbc.ini like "EnableBulkLoad = 0" for PostgreSQL entry and there was't any difference.
I hope that parameter for disabling bulk load does exist because I get error trying to insert some data "The session failed to run because bulk mode is enabled in the DSN entry. Disable bulk mode for ODBC."

Related

Can you update/insert/delete via MongoDB ODBC driver?

I'm looking to migrate a system that uses an ODBC driver to talk to MySQL and change it to talk to MongoDB. By using mongosqld, BI Connector and a DRDL schema I can access the data and my "select * from ..." queries all work fine. However, I keep getting an error when I try to UPDATE the data. Is this a limitation of the driver or am I doing something wrong?
The error I get is:
[MySQL][ODBC 8.0(w) Driver][mysqld-5.7.12 mongosqld v2.14.0]parse sql 'update `User` set name='Simon Sawyer' where `userid`='3ecdf4a51478644780782b20'' error: unexpected UPDATE at position 8 near update

Connecting to PostgreSQL Data Source in SQL Server Import Export Tool

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.

Linking Access tables into a PostgreSQL Database using a foreign data wrapper

I'm new to postgres so this problem is probably a relatively easy one for someone else. However, I have spent many frustrating hours trying to figure out the solution. I have an Access Database of metadata that must be kept updated for sending records to other groups. I also have a database using PostgreSQL and PGAdmin which also has these same metadata tables. Currently these tables in the Postgres database get updated manually by exporting the Access tables as excel files, and then importing them into the SQL tables. It's not the most efficient process and could lead to errors in the SQL database if someone forgets to check before running any queries that they are using the most recent data from Access. So I would like to integrate some of the tables from my Access database with my Postgres database.
Originally I tried just installing drivers to export the Access tables directly to Postgres which worked, but not in the way that I wanted since it just brings in a table which I would still need to manually update. From my understanding, I can create a server connection in postgres to access and that would then bring in updated data using a foreign data wrapper.
I tried to use ogr_fdw.
CREATE EXTENSION ogr_fdw;
When I try:
CREATE SERVER metadata
FOREIGN DATA WRAPPER ogr_fdw
OPTIONS (
datasource 'H:\Databases\20170712.accdb',
format 'ODBC' );
I receive: ERROR: unable to connect to data source "H:\Databases\20170712.accdb"
SQL state: HV00D
When I try:
CREATE SERVER metadata
FOREIGN DATA WRAPPER ogr_fdw
OPTIONS (
datasource 'H:\Databases\20170712.accdb',
format 'ACCDB' );
I receive: ERROR: unable to find format "ADDCB"
HINT: See the formats list at http://www.gdal.org/ogr_formats.html.
I also tried MDB and received the same error. However, MDB is the code name given by the website but it says that it needs JDK/JRE to compile and I'm not really sure if that's another type of driver that I would need or what it is.
When I try:
CREATE SERVER metadata
FOREIGN DATA WRAPPER ogr_fdw
OPTIONS (
datasource 'H:\Databases\20170712.mdb',
format 'ODBC' );
I receive: ERROR: unable to connect to data source "H:\Databases\20170712.mdb"
SQL state: HV00D
Hint: Unable to initialize ODBC connection to DSN for DRIVER=Microsoft Access Driver (*.mdb);DBQ=H:\Databases\20170712.mdb,
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
However I thought after looking at the github help page for ogr_fdw didn't need ODBC and special drivers https://github.com/pramsey/pgsql-ogr-fdw/blob/master/FAQ.md.
A lot of this is probably due to my limited knowledge of the terminology when I'm reading through a lot of this stuff. Also my Access database is an .accdb file but since that wasn't working I tried around with mdb and ODBC as the "format" too. If anyone has any suggestions I would greatly appreciate it.
Thanks!

DB2 Connection String

I have a problem connecting to DB2 through VBScript. I am using the connecting string as
Driver={IBM DB2 ODBC
DRIVER};Database=mydatabase;Hostname=myHostName;Port=myPortName;Protocol=TCPIP;Uid=myUserID;Pwd=myPassword;
Upon using the above connection string, I am getting an error message stating:
[IBM][CLI Driver] SQL3006 1N The database alias or database name
"myDatabase" was not found at the remote node. SQLSTATE=08004
Can anyone please suggest a solution for this? I tried using DBALIAS in place of Database, but it says the parameter is incorrect.
Suggestions?
Looks like your database name is incorrect.
You can find the correct value by issuing following query in either QMF or SPUFI :
SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1
Yes, most likely incorrect database name has been specified. Also you can not perform SQL without connection as proposed by Vivek8086, bit you can try to find it in Db2 MSTR output in JES if you have ID on remote system or try to perform -DIS DDF Db2 command (if you know Db2 SYSID).

ODBC Call failure from Microsoft Access to PostgreSQL -Client Encoding Mismatch

i tried to create a linked table from Microsoft Access (2007) to PostgreSQL (9.0) in Windows 7. When I tried to linked table as follows:
1)Select link to the data source by creating a linked table
2)Machine Data Source in 'Selectr Data Source' pop up.
3)Select the PostgreSQL DB visible which ends in error:
ODBC call failed
Clientencoding mismatch(#214).
Could you please help?
I used Google to find this.
It seems that there is some problem with PostgreSQL 8.1 and the encoding names: see this post or google. It looks that UTF8 used by default with the new Postgres is not compatible with old ODBC drivers. I am not sure where the problem really is, but a quick fix is to change default encoding for the user connecting to the database:
alter user <user> SET client_encoding to LATIN1;