# PostgreSQL Plugin error Windows

**URL:** <https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950>\
**Category:** Google Groups archive\
**Created:** [April 5, 2018, 3:19am UTC](https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950 "2018-04-05T03:19:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alberto\_Sueiro](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@Alberto\_Sueiro](https://discourse.orthanc-server.org/u/Alberto_Sueiro)\
**Post date:** [April 5, 2018, 3:19am UTC](https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950/1 "2018-04-05T03:19:15Z")

</div>

Hi,  
I am trying orthanc with PostgreSQL in windows and i cannot ot make it work. I’ve put the configuration just like the orthanc-book example but still not working.

My log file ends with this:

0405 02:41:53.335696 PluginsManager.cpp:269] Registering plugin ‘dicom-web’ (version 0.4)

W0405 02:41:53.335696 PluginsManager.cpp:168] URI to the DICOMweb REST API: /dicom-web/

W0405 02:41:53.336697 PluginsManager.cpp:168] URI to the WADO-URI API: /wado

E0405 02:41:53.337790 SharedLibrary.cpp:65] LoadLibrary(Configuration../Plugins\OrthancPostgreSQL-2.0-Index.dll) failed: Error 193

W0405 02:41:53.337790 PluginsManager.cpp:219] Unregistering plugin ‘dicom-web’ (version 0.4)

W0405 02:41:53.342235 PluginsManager.cpp:219] Unregistering plugin ‘worklists’ (version 1.3.1)

W0405 02:41:53.342235 PluginsManager.cpp:168] Sample worklist plugin is finalizing

E0405 02:41:53.342235 main.cpp:1323] Uncaught exception, stopping now: [Error while using a shared library (plugin)] (code 25)

W0405 02:41:53.342235 main.cpp:1356] Orthanc has stopped

The plugins i’m using are the ones here (2.0): [https://www.orthanc-server.com/browse.php?path=/plugin-postgresql](https://www.orthanc-server.com/browse.php?path=/plugin-postgresql)

Database created with orthanc as name, same as user. the postgresql.json is this (in case I don’t see the mistake):

{  
/\*\*

- Configuration to use PostgreSQL instead of the default SQLite
- back-end of Orthanc. You will have to install the
- “orthanc-postgresql” package to take advantage of this feature.  
\*\*/  
“PostgreSQL” : {  
// Enable the use of PostgreSQL to store the Orthanc index?  
“EnableIndex” : true,

// Enable the use of PostgreSQL to store the DICOM files?  
“EnableStorage” : true,

// Option 1: Specify explicit authentication parameters  
“Host” : “localhost”,  
“Port” : 5432,  
“Database” : “orthanc”,  
“Username” : “orthanc”,  
“Password” : “orthanc”,

// Option 2: Authenticate using PostgreSQL connection URI  
// “ConnectionUri” : “postgresql://orthanc\_user:my\_password@localhost:5432/orthanc\_db”,

// Optional: Disable the locking of the PostgreSQL database  
“Lock” : false  
}

}

PostgreSQL server version is 10.3-1 64 bits, orthanc 1.3.1, SO windows 10 64 bits. Any help will be appreciated. Don’t doubt asking for more info.

---

<div class="post-metadata">

**Author:** ![bdearlove](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/bdearlove/32/1661_2.png) [@bdearlove](https://discourse.orthanc-server.org/u/bdearlove)\
**Post date:** [April 5, 2018, 7:57pm UTC](https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950/2 "2018-04-05T19:57:04Z")

</div>

I would recommend downloading the Orthanc Windows installer, it as the plugins built in already, looks like your is failing to load OrthancPostgreSQL-2.0-Index.dll  
A few people have had trouble downloading the plugins and using them directly, mostly due to Win32/64 mismatch. I would recommend copying configs, removing and installing this, then putting configs back, it is pretty painless: [https://www.orthanc-server.com/download-windows.php](https://www.orthanc-server.com/download-windows.php)

---

<div class="post-metadata">

**Author:** ![Alberto\_Sueiro](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@Alberto\_Sueiro](https://discourse.orthanc-server.org/u/Alberto_Sueiro)\
**Post date:** [April 5, 2018, 8:17pm UTC](https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950/3 "2018-04-05T20:17:39Z")

</div>

I’ve used the windows installer, but it didn’t create the postgresql dll. Searching a bit on the net, seems to be the 32/64bit mismatch (error 193), if it is, dll are 32bits. Tried to compile the sources of postgresql plugin on my pc, but i didn’t suceed.  
I’ll try to install win64 source and hope for the best.  
Also, if there is someone with postgresql dll compiled in 64 bits, i would be so grateful if he or she could send it to me.

---

<div class="post-metadata">

**Author:** ![bdearlove](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/bdearlove/32/1661_2.png) [@bdearlove](https://discourse.orthanc-server.org/u/bdearlove)\
**Post date:** [April 5, 2018, 8:36pm UTC](https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950/4 "2018-04-05T20:36:20Z")

</div>

Wierd, it should have given you the option during the install with it defaulted to install the two dll’s, OrthancPostgreSQLIndex.dll and OrthancPostgreSQLStorage.dll.  
No matter, you should see them in your e-mail.

---

<div class="post-metadata">

**Author:** ![Alberto\_Sueiro](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@Alberto\_Sueiro](https://discourse.orthanc-server.org/u/Alberto_Sueiro)\
**Post date:** [April 5, 2018, 9:17pm UTC](https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950/5 "2018-04-05T21:17:50Z")

</div>

Ok, reinstalling it, it generated the dll (idk what i did the first time). The problem is there still.

---

<div class="post-metadata">

**Author:** ![bdearlove](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/bdearlove/32/1661_2.png) [@bdearlove](https://discourse.orthanc-server.org/u/bdearlove)\
**Post date:** [April 5, 2018, 9:41pm UTC](https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950/6 "2018-04-05T21:41:34Z")

</div>

And they are named the same as I posted above? Did the ones I send Work at all?

---

<div class="post-metadata">

**Author:** ![Alberto\_Sueiro](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@Alberto\_Sueiro](https://discourse.orthanc-server.org/u/Alberto_Sueiro)\
**Post date:** [April 5, 2018, 11:23pm UTC](https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950/7 "2018-04-05T23:23:39Z")

</div>

OK, looks like i find the problem (looks like i’m blind). Your advice about the name make me notice i had 2 dll of each postgresql, index and storage, but didn’t notice.  
When i remove the “\*-2.0.dll” (the ones i download precompiled) and copy in plugins directory, seems like it is working, i am indexing some dcm files and checking the database.

Thanks for your help, i appreciate it so much :).

---

<div class="post-metadata">

**Author:** ![bdearlove](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/bdearlove/32/1661_2.png) [@bdearlove](https://discourse.orthanc-server.org/u/bdearlove)\
**Post date:** [April 5, 2018, 11:27pm UTC](https://discourse.orthanc-server.org/t/postgresql-plugin-error-windows/950/8 "2018-04-05T23:27:11Z")

</div>

Perfect, great to hear!
