Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on Windows #53

Open
isapir opened this issue Jan 10, 2016 · 66 comments
Open

Installation on Windows #53

isapir opened this issue Jan 10, 2016 · 66 comments

Comments

@isapir
Copy link

isapir commented Jan 10, 2016

How can I install this on Windows?

Given that this is useful for MSSQL databases it'd be very useful to be able to run it on Windows. Is there any binary distribution available to download? If not, how can I build it for Windows?

Thanks!

@GeoffMontee
Copy link
Collaborator

I haven't tried installing it on Windows yet.

It looks like FreeTDS supports Windows, so it may also be possible to build tds_fdw on Windows.

@ivomts
Copy link

ivomts commented Jan 27, 2016

Hello GeoffMontee,
I really need to create a "view" in Postgres from a table in mssql (both db on windows)...
Are you planning to build it on windows? If not, how can I build it?

Thank you.
Ivo

@GeoffMontee
Copy link
Collaborator

Hi @ivomts,

I still haven't tried installing it on Windows yet, so I'm not sure exactly what process you would use. I would like to try some day, if I can find the time.

If anyone else wants to try, here are some tips:

You'll probably need to build FreeTDS on Windows, so this documentation might be helpful.

For building tds_fdw, this wiki page might be helpful. There are different steps shown depending on whether you are compiling with Visual Studio or MinGW. If you plan to use Visual Studio, this blog post might also be useful.

@isapir
Copy link
Author

isapir commented Jan 28, 2016

If you're going the MinGW-w64 route I created a video tutorial on how to install it at https://youtu.be/pb6Yb819pF0

I, too, would try to compile this for Windows but not sure when I will get to it, or if I'll have any success at all.

@GeoffMontee
Copy link
Collaborator

Thanks for sharing, @TwentyOneSolutions! That should be useful if I try to test this out with MinGW.

@ivomts
Copy link

ivomts commented Jan 28, 2016

Thanks you @TwentyOneSolutions and @GeoffMontee.
This is new for me, but I will check the tips and give you some feedback.

@jkort
Copy link

jkort commented Mar 9, 2016

Clearly this exceeds my capabilities. Goal was to get to a 64bit version of tds_fdw. Building FreeTDS 0.95.87 with this:

nmake /A /I -fNmakefile -nologo apps PLATFORM=x64 CONFIGURATION=release
threw a bunch of warnings, mostly C4018, C4146 and C4267, but when it was done I have a TSQL.EXE that works. Able to connect to a remote SQLServer db and execute queries.

Using this as a guide (http://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/) with VS Studio 2015 Community edition, adding include paths as needed (e.g., to find tds_sysdep_public.h in \win32 directory), hit a wall of 26 LNK2001 unresolved external symbols in tds_fdw.obj for symbols such as dbiscount, dbconvert, etc.

Has anyone smarter than me succeeded in creating a Win64 binary?

Best Regards,
-Jack

@GeoffMontee
Copy link
Collaborator

Hi @jkort,

The dbiscount and similar functions are functions provided by FreeTDS. If Visual Studio can't resolve those symbols, then this suggests to me that the FreeTDS library isn't being linked into tds_fdw. You may have to add the FreeTDS .dll file to the Visual Studio project that you are using to compile tds_fdw. I'm not a Windows expert, so I don't have instructions on how to do this, but maybe some of these references will help:

@jkort
Copy link

jkort commented Mar 9, 2016

Thanks Geoff,

The only library created by the nmakefile is db-lib.LIB, I get no .DLL

I imagine I'm doing something very basic incorrectly.

@GeoffMontee
Copy link
Collaborator

It sounds like .LIB is the extension for static libraries in Windows, so you are probably on the right track.

You might just have to add dblib.LIB to your Visual Studio project. This Stack Overflow question might help.

@jkort
Copy link

jkort commented Mar 10, 2016

Realized I could use Cmake instead of Nmake, so started over with FreeTDS. Got FreeTDS to build, then after many iterations of adding .LIB dependencies under VS, got a tds_fdw.DLL to build. Copied it to PG's 9.4\lib folder.

Just tried to run your CREATE FUNCTION sql, with 'tds_fdw' for 'MODULE_PATHNAME', and got an eror that no function by that name. Under Dependency Walker I see that the handler and validator functions are named:
pg_finfo_tds_fdw_handler
pg_finfo_tds_fdw_validator

So if I modified the CREATE FUNCTION calls and the CREATE FOREIGN DATA WRAPPER as below for the prefixed names, they execute. But the CREATE EXTENSION throws an error:

CREATE FUNCTION pg_finfo_tds_fdw_handler()
RETURNS fdw_handler
AS 'tds_fdw'
LANGUAGE C STRICT;

CREATE FUNCTION pg_finfo_tds_fdw_validator(text[], oid)
RETURNS void
AS 'tds_fdw'
LANGUAGE C STRICT;

CREATE FOREIGN DATA WRAPPER tds_fdw
HANDLER pg_finfo_tds_fdw_handler
VALIDATOR pg_finfo_tds_fdw_validator;

CREATE EXTENSION IF NOT EXISTS tds_fdw

with schema my_extensions;

ERROR: could not find function "tds_fdw_handler" in file "C:/Program Files/PostgreSQL/9.4/lib/tds_fdw.dll"

********** Error **********

ERROR: could not find function "tds_fdw_handler" in file "C:/Program Files/PostgreSQL/9.4/lib/tds_fdw.dll"
SQL state: 42883

Is there something I can do to rename those functions to make this work?

@jkort
Copy link

jkort commented Mar 10, 2016

I may have solved my own problem using ALTER FUNCTION ... RENAME TO ...

@jkort
Copy link

jkort commented Mar 10, 2016

The SQL in \share\extension\ with the control file was changed to this to accommodate the prefixed function names I see in the tds_fdw.DLL:

CREATE FUNCTION pg_finfo_tds_fdw_handler()
RETURNS fdw_handler
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

ALTER FUNCTION pg_finfo_tds_fdw_handler()
RENAME TO tds_fdw_handler;

CREATE FUNCTION pg_finfo_tds_fdw_validator(text[], oid)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

ALTER FUNCTION pg_finfo_tds_fdw_validator(text[], oid)
RENAME TO tds_fdw_validator;

CREATE FOREIGN DATA WRAPPER tds_fdw
HANDLER tds_fdw_handler
VALIDATOR tds_fdw_validator;

All of these commands (sanitized with dummy strings as needed) run without error:

CREATE EXTENSION IF NOT EXISTS tds_fdw
with schema my_extensions;

CREATE SERVER xyz
FOREIGN DATA WRAPPER tds_fdw
OPTIONS (servername 'xx.xx.xx.xx', port '1433', database 'XYZ', tds_version '7.3');

DROP USER MAPPING IF EXISTS FOR postgres SERVER xyz;

CREATE USER MAPPING FOR postgres
SERVER xyz
OPTIONS (username 'myuserid', password 'mypass');

DROP FOREIGN TABLE IF EXISTS objecttyper;

CREATE FOREIGN TABLE objecttyper (
objecttypeid smallint,
objectname varchar(100))
SERVER xyz
OPTIONS (table 'dbo.ObjectTypeR', row_estimate_method 'showplan_all');

But when I try to run this I get the following error:

select * from objecttyper;

ERROR: foreign-data wrapper handler function 16508 did not return an FdwRoutine struct

********** Error **********

ERROR: foreign-data wrapper handler function 16508 did not return an FdwRoutine struct

SQL state: XX000

I see tds_fdw in pgAdmin III as a FDW, but do not see it listed as an Extension.

Now when I try to run a query like:
select * from information_schema.tables;

get the same error as above.

I thought I was close to getting this to work...maybe not. :(

@jkort
Copy link

jkort commented Mar 10, 2016

Found a similar posting about "pg_finfo_" prefixing, with no clear direction on what preprocessor definitions I could use in my Visual Studio project to fix the function creations:

http://stackoverflow.com/questions/13776232/why-does-c-name-link-symbol-of-the-specific-function-should-be-prepended-with

@jkort
Copy link

jkort commented Mar 10, 2016

I realized I had not followed Craig Ringer's requirement to have a PGDLLEXPORT prototype, so I added these first two lines to tds_fdw.c:
PGDLLEXPORT Datum tds_fdw_handler(PG_FUNCTION_ARGS);
PGDLLEXPORT Datum tds_fdw_validator(PG_FUNCTION_ARGS);

PG_FUNCTION_INFO_V1(tds_fdw_handler);
PG_FUNCTION_INFO_V1(tds_fdw_validator);

Datum tds_fdw_handler(PG_FUNCTION_ARGS)
...
then inserted "PGDLLEXPORT" into the function declarations in tds_fdw.h to avoid a C2375 error.

Rebuilt the tds_fdw.DLL, and under Dependency Walker still saw the functions with the pg_finfo_ prefix, but now two versions with correct names.

Put new DLL into the 9.4\lib folder; corrected the SQL file in 9.4\share\extension to use correct func names and take out my ALTER FUNCTION code.

CREATE EXTENSION, CREATE SERVER, CREATE FOREIGN TABLE all run without error, but as soon as I try to SELECT from it my conenction to postgres db is dropped.

Unless someone can see an obvious error, I think I best admit defeat and leave extensions to the experts. Thanks for your time!

@GeoffMontee
Copy link
Collaborator

It sounds like you've made some great progress!

If your connection is getting dropped, then it sounds like the backend might be crashing. Is there any information in your PostgreSQL error log that can give us a clue about what's happening?

@jkort
Copy link

jkort commented Mar 10, 2016

Thanks Geoff! I was ready to give up and stop bothering you. Took me a bit as a newbie to find the log; here's what it shows around that SELECT from the foreign table I defined:

2016-03-10 08:36:01 PST LOG: database system was interrupted; last known up at 2016-03-10 08:30:11 PST
2016-03-10 08:36:02 PST FATAL: the database system is starting up
2016-03-10 08:36:02 PST LOG: database system was not properly shut down; automatic recovery in progress
2016-03-10 08:36:02 PST LOG: record with zero length at 0/1909D20
2016-03-10 08:36:02 PST LOG: redo is not required
2016-03-10 08:36:02 PST LOG: MultiXact member wraparound protections are now enabled
2016-03-10 08:36:02 PST LOG: database system is ready to accept connections
2016-03-10 08:36:02 PST LOG: autovacuum launcher started
2016-03-10 08:39:41 PST LOG: server process (PID 5840) was terminated by exception 0xC0000005
2016-03-10 08:39:41 PST DETAIL: Failed process was running: select * from objecttyper;

2016-03-10 08:39:41 PST HINT: See C include file "ntstatus.h" for a description of the hexadecimal value.
2016-03-10 08:39:41 PST LOG: terminating any other active server processes
2016-03-10 08:39:41 PST WARNING: terminating connection because of crash of another server process
2016-03-10 08:39:41 PST DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2016-03-10 08:39:41 PST HINT: In a moment you should be able to reconnect to the database and repeat your command.
2016-03-10 08:39:41 PST WARNING: terminating connection because of crash of another server process
2016-03-10 08:39:41 PST DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2016-03-10 08:39:41 PST HINT: In a moment you should be able to reconnect to the database and repeat your command.
2016-03-10 08:39:41 PST LOG: all server processes terminated; reinitializing
2016-03-10 08:39:51 PST FATAL: pre-existing shared memory block is still in use
2016-03-10 08:39:51 PST HINT: Check if there are any old server processes still running, and terminate them.

@GeoffMontee
Copy link
Collaborator

According to Microsoft, 0xC0000005 represents STATUS_ACCESS_VIOLATION. There are some clues about what that might mean here.

I will try to find time to take a look at this at some point.

@jkort
Copy link

jkort commented Mar 10, 2016

Thanks Geoff! I'm sure there are numerous places I could have gone wrong. If I can figure out how to run this under a debugger I will. Any time you can give to it will be greatly appreciated, and if there's anything else I can provide let me know.

@jaitor1
Copy link

jaitor1 commented Apr 4, 2016

Hi,

I am also very very interested in this wrapper for windows x64.

I don't have a technical profile to help with the compilation but I hope there is some progress soon.

Great job @GeoffMontee

Regards.

@lorenati
Copy link

Hello, I compiled the tds_fdw in Visual Studio 2013, I followed some of @jkort comments and I got his same issue, PG crashes right after performing the select

I did a little debug in visual studio and I noticed the extension crashes in this line of code in iconv.c

assert(strcmp(canonic_charsets[POS_UCS2LE].name, "UCS-2LE") == 0);
assert(strcmp(canonic_charsets[POS_UCS2BE].name, "UCS-2BE") == 0);

I commented those lines and the extension worked perfect

I'm not quite sure what's exactly going on, this is not about the extension I think; I think it has to be about the canonic_charsets array

@GeoffMontee
Copy link
Collaborator

Nice work, @lorenati!

FreeTDS uses iconv to do character set conversions. The version of the FreeTDS protocol that you are using can effect what conversions are used. For example, when you are using tds_version set to 7.0 or higher, data is always transferred over the wire in UCS-2. What tds_version did you use when you were testing? It looks like the crash may have been related to UCS-2 conversions. Maybe try setting tds_version to something like 7.0, and then also something like 5.0?

http://www.freetds.org/userguide/choosingtdsprotocol.htm

@lorenati
Copy link

This is what I did: I downloaded a copy of the freetds release and I included the required dependencies in my project and I compiled those along with the tds_fdw extension code. I did not make a separate build of freetds and tds_fdw. Probably I need to compile those individualy in order to set some configurations, specially with freetds. I used a freetds version from like 3 days ago.

Also, with my extension 'as is' I did a select of a column with UTF-8 encoding (words like 'pasé' in spanish) these columns appears blank in PG.

@isapir
Copy link
Author

isapir commented Apr 20, 2016

@lorenati - Can you please publish your compiled binaries somewhere so that we can download it without needing to compile? Thanks!

@jaitor1
Copy link

jaitor1 commented Apr 21, 2016

+1 Great job @lorenati

@XisXis
Copy link

XisXis commented Jun 23, 2016

@lorenati Thank you very much for your input on this, but can you help me here in the compilation process?

I'm trying to do the exact same setup that you and @jkort described here to compile a x64 windows version of tds_fdw for postgres 9.5, but i'm at the point where @jkort described that after making a select the connection is dropped.

I have exactly the same output in the postgres log file as @jkort described.

I also did comment the lines you said in the iconv.c, but my tds_fdw code does not seem to be influenced in any way by that change.

Can you describe a little better how did you compiled freetds and tds_fdw together on the same visual studio solution?
And how do you debug the resulting library? I try to attach to the postgres.exe process but Visual Studio cannot show me debug information because it will not load the tds_fdw.dll.

Thanks!

@jaitor1
Copy link

jaitor1 commented Jul 8, 2016

@lorenati Please can you publish your compiled binaries???

@lorenati
Copy link

I made a blog post showing how I compiled the code @jaitor1 @TwentyOneSolutions @XisXis @jkort

@isapir
Copy link
Author

isapir commented Jul 13, 2016

@lorenati Great, thanks! I'll check it out.

@jaitor1
Copy link

jaitor1 commented Jul 13, 2016

@lorenati Thanks!!! I'll check it out too

@jaitor1
Copy link

jaitor1 commented May 17, 2019

@alexeyfadeev thanks for sharing the binaries!
I tried it in two different servers:

  • Windows Server 2012 x64 with PostgreSQL 9.3.
  • Widnows Server 2016 x64 with PostgreSQL 11.3

After pasteing the files in PostgreSQL folder I go to pgadmin and type:
CREATE EXTENSION tds_fdw;

I get the same error in both servers:

ERROR:  Could not load library «D:/Installed/PostgreSQL/11/lib/tds_fdw.dll»: unknown error 126
Estado SQL: XX000

@alexeyfadeev
Copy link

@jaitor1, I think tds_fdw should be built with the same major version of Postgres. This binaries for PG 10.
Also there are different builds of PostgreSQL for windows, e.g. from EnterpriseDB and from PostgresProfessional. I saw cases when one extension build worked with both, but in other cases an extension worked with one and crashed with other.
What build do you use? I hope I'll find some time and try to build for your version

@jaitor1
Copy link

jaitor1 commented May 18, 2019

@alexeyfadeev if you could help me it would be imcredible. I've been years waiting for someone to compile it for windows :)
I am using EnterpriseDB PostgreSQL 11.3 for Windows x64.
You can find the installer here:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

@alexeyfadeev
Copy link

alexeyfadeev commented May 20, 2019

@jaitor1, I built it.

  1. Install Visual C++ Redistributable for Visual Studio 2015, if you don't have it
    https://www.microsoft.com/en-us/download/details.aspx?id=48145

  2. Ensure that theese files exist in C:\Windows\System32:
    KERNEL32.dll
    SHELL32.dll
    WS2_32.dll
    VCRUNTIME140.dll
    VCRUNTIME140D.dll
    ucrtbased.dll

If some files are missing, you can copy them from here:
https://yadi.sk/d/5wM5S1hwS9djlg

  1. tds_fdw binaries, PostgreSQL 11 for Windows x64
    EDB build: https://yadi.sk/d/6F36zfA96m0WNA
    PostgresPro build: https://yadi.sk/d/4y5MygygnZrj3A

  2. freetds.conf should be located: C:\freetds.conf

@jerome-peng
Copy link

@alexeyfadeev

i test it on win10 x64,but it does't work.

tds_fdw binaries, PostgreSQL 11 for Windows x64
EDB build: https://yadi.sk/d/6F36zfA96m0WNA

c:\PostgreSQL\11\bin>psql -p 5555 -U postgres
用户 postgres 的口令:
psql (11.3)
输入 "help" 来获取帮助信息.

postgres=# create extension tds_fdw;
错误: 无法加载库 "C:/PostgreSQL/11/lib/tds_fdw.dll": The specified module could not be found.

@jerome-peng
Copy link

what i need :

Windows Server 2008 R2 Enterprise sp1 x64 with PostgreSQL 9.X or 10 or 11.
SqlServer 2005 x64

@arulraj2k6
Copy link

@jaitor1, I built it.

  1. Install Visual C++ Redistributable for Visual Studio 2015, if you don't have it
    https://www.microsoft.com/en-us/download/details.aspx?id=48145
  2. Ensure that theese files exist in C:\Windows\System32:
    KERNEL32.dll
    SHELL32.dll
    WS2_32.dll
    VCRUNTIME140.dll
    VCRUNTIME140D.dll
    ucrtbased.dll

If some files are missing, you can copy them from here:
https://yadi.sk/d/5wM5S1hwS9djlg

  1. tds_fdw binaries, PostgreSQL 11 for Windows x64
    EDB build: https://yadi.sk/d/6F36zfA96m0WNA
    PostgresPro build: https://yadi.sk/d/4y5MygygnZrj3A
  2. freetds.conf should be located: C:\freetds.conf

It is working on Windows 8 PC
but not worked in Windows Server2012R2
ERROR: could not load library "C:/Program Files/PostgreSQL/11/lib/tds_fdw.dll": The specified procedure could not be found. SQL state: XX000

@jaitor1
Copy link

jaitor1 commented Jun 14, 2019

@alexeyfadeev Firstly, thanks for you awesome work. I've been waiting for this SW on windows for years.
SecondIy, I managed to create the extension properly and got trough some errors when creating foreign server/table. Everything fixed. Your files work like a charm!

@yyjdelete
Copy link

yyjdelete commented Mar 26, 2020

tds_fdw-pg_edb_11_winx64.zip

Attached an new prebuild binary for pg_EDB_11_win-x64, and add an linked with iconv to avoid some server encoding issue for varchar in alexeyfadeev's version.
Thanks @lorenati for the blog post, and @alexeyfadeev for the old binary.
Build with VS2019 and tds_fdw 93e9b7b (2.0.1) and FreeTDS/freetds@2909105 (1.2-dev)

Compile-time settings (established with the "configure" script)
                            Version: freetds v1.2.dev.20200326
             freetds.conf directory: c:
     MS db-lib source compatibility: no
        Sybase binary compatibility: no
                      Thread safety: yes
                      iconv library: yes
                        TDS version: auto
                              iODBC: no
                           unixodbc: no
              SSPI "trusted" logins: yes
                           Kerberos: no
                            OpenSSL: yes
                             GnuTLS: no
                               MARS: yes

For Install:

Copy share folder to postgres. And please choose any single version from lib folder in the zip, copy tds_fdw.dll to lib folder of postgres, and sybdb.dll to bin folder of postgres if exists. I forget to save symbols when compile, so there is no debug_symbols.

Versions:

dynamic: dynamic linked to sybdb.dll, and you can easily replace it with any compilable version of prebuild freetds with Artifacts from https://ci.appveyor.com/project/FreeTDS/freetds/history (but it linked to OpenSSL 1.0, so you needed to drop libeay32.dll and ssleay32 to bin folder of postgresql >=11.5. It can be get as Win64 Light from http://slproweb.com/products/Win32OpenSSL.html). NOTE: sybdb.dll should be dropped to bin folder of postgresql instead of lib.
static: static linked to db-lib.lib, so you only need to drop tds_fdw.dll to lib folder.
-LTL: An modify version to use https://github.com/Chuyu-Team/VC-LTL to link to msvcrt.dll instead of vcruntime140.dll, so no special vc runtime is needed. And change to use libiconv-2.dll instead of static linked https://github.com/FreeTDS/win-iconv from freetds since it's already available in postgresql.

NOTE:

  1. For non-LTL versions, vcruntime140.dll is needed(Install Visual C++ Redistributable for Visual Studio 2015/2017/2019 x64).
  2. All files is linked to OpenSSL 1.1(used by postgresql from EDB >= 11.5), if you are use postgresql from EDB <11.5(which use OpenSSL 1.0 instead), you needed to drop libcrypto-1_1-x64.dll and libssl-1_1-x64.dll to bin folder of postgresql(It can be get as Win64 Light from http://slproweb.com/products/Win32OpenSSL.html ), or you can use dynamic version and replace sybdb.dll with prebuild freetds with Artifacts from https://ci.appveyor.com/project/FreeTDS/freetds/history (which linked to OpenSSL 1.0).

@feelmercy
Copy link

Thank you @yyjdelete !
Your binary can work from GBK to UTF-8

@Signaluser1
Copy link

Hello,
is it possible to get a version for PostgreSQL 12.2 (EDB)? The database runs on a Windows2012R2 and a Windows2016 server.
This would be very friendly and helpful.
Thanks.

@yyjdelete
Copy link

@Signaluser1
https://github.com/yyjdelete/temp_storage/files/4605716/tds_fdw-pg_edb_12_winx64.zip

Build with pg12.2(winx64 EDB), VS2019,tds_fdw@93e9b7b (2.0.1) and FreeTDS/freetds@779975b(master or 1.2-dev).

Use the same build config as dynamic-LTL in #53 (comment)

@Signaluser1
Copy link

Signaluser1 commented May 10, 2020

Very impressive. Thank you very much. I can test it next week.
Thank you.👍

@Signaluser1
Copy link

Hello,
I have installed it.
CREATE EXTENSION works fine
CREATE SERVER works fine with

CREATE SERVER fdw_mssql
FOREIGN DATA WRAPPER tds_fdw
OPTIONS(servername'IP', port 'xxxx', msg_handler 'notice', database 'xxxx');

Usermapping works fine.

But when i create foreign tables they are empty. When i am IMPORT FOREIGN SCHEMA, i got the message

No table where found in schema...

Whats wrong?

@Ruiwen2
Copy link

Ruiwen2 commented Aug 27, 2020

Can someone help me to create a tds_fwd for windows 10 with PostgreSQL 12 free version?

I tried @yyjdelete's build and specified tds_version=7.1
https://github.com/yyjdelete/temp_storage/files/4605716/tds_fdw-pg_edb_12_winx64.zip

yyjdelete commented on May 10
Build with pg12.2(winx64 EDB), VS2019,tds_fdw@93e9b7b (2.0.1) and FreeTDS/freetds@779975b(master or 1.2-dev).

Use the same build config as dynamic-LTL in #53 (comment)

I got following error:
ERROR: DB-Library error: DB #: 20002, DB Msg: Adaptive Server connection failed (assetmgmt02.it.att.com), OS #: 0, OS Msg: No error, Level: 9
SQL state: HV00N

@huolijian
Copy link

感谢你的提供的https://github.com/yyjdelete/temp_storage/files/4605716/tds_fdw-pg_edb_12_winx64.zip ,这是一个非常好的贡献!@yyjdelete

@David-Moreira
Copy link

Hello guys.
Sorry for my ignorance.
How can you build tds_fdw for Windows?
I wanted to try this with PostgreSQL v13.

@huolijian
Copy link

huolijian commented Feb 19, 2021 via email

@ArmaghanIqbal
Copy link

@yyjdelete
Need to make with pgsql = 13 runs on windows server 2012 r2

i copied the files as you said in the specific folders but when i run CREATE EXTENSION tds_fdw;

it says
SQL Error [58P01]: ERROR: could not load library "C:/Program Files/PostgreSQL/13/lib/tds_fdw.dll": The specified procedure could not be found.

@Signaluser1
Copy link

Hello,

would it be possible to get a current version of tds_fwd for PostgreSQL14 and Windows64 (Server 2016)?

That would be very helpful. Thanks a lot.

Greetings

@westede
Copy link

westede commented Aug 3, 2022

Hello,

would it be possible to get a current version of tds_fwd for PostgreSQL14 and Windows64 (Server 2016)?

That would be very helpful. Thanks a lot.

Greetings

I would also be interested.
With this version Link I get the following error when creating the extension:

could not load library "C:/Program Files/PostgreSQL/14/lib/tds_fdw.dll": unknown error 127

Greetings

@alexeyfadeev
Copy link

alexeyfadeev commented Aug 5, 2022

Hello everybody.
With WSL 2 you can easily run Linux based Postgres on Windows (via Docker), and no problem to use tds_fdw or any other extension

@RaukampMika
Copy link

Hello,

can anyone compile it for PostgreSQL 14? or can tell me how to do it?

greetings

@asdio
Copy link

asdio commented Apr 14, 2023

Hello,

can anyone compile it for PostgreSQL 14? or can tell me how to do it?

greetings

Me too!!

@ContyChen
Copy link

@Signaluser1 https://github.com/yyjdelete/temp_storage/files/4605716/tds_fdw-pg_edb_12_winx64.zip

Build with pg12.2(winx64 EDB), VS2019,tds_fdw@93e9b7b (2.0.1) and FreeTDS/freetds@779975b(master or 1.2-dev).

Use the same build config as dynamic-LTL in #53 (comment)

I need to try out this plugin in versions PG14 and 15. Can you share your build environment? If there are build documents available, it would be the best

@XotoX1337
Copy link

Hi, I would really like to build/use this extension with PG15. Would it be possibly for either @yyjdelete or @alexeyfadeev to share their process of building the extension for Windows? Maybe it could even be added to the README of the project?

@lovelarbix
Copy link

Buenas!! me ayudan por favor? Tengo el PostgreSQL 14.7, compiled by Visual C++ build 1914, 64-bit en Windows 11, cómo podría hacer para compilar los binarios necesarios para poder conectarme a SQL Server que se encuentra en un Suse Linux.

@xychul
Copy link

xychul commented Feb 8, 2024

Hi, I would really like to build/use this extension with PG15. Would it be possibly for either @yyjdelete or @alexeyfadeev to share their process of building the extension for Windows? Maybe it could even be added to the README of the project?

Any successes? I have PG15 and would like to mount MSSQL tables.

@HighKeys
Copy link

If someone knows how to build or have a newer prebuild for windows server, let me know, can't use docker as Windows Server 2019 does not support WSL2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests