IBM DB2 ODBC DRIVER :: SQL1390C The environment variable DB2INSTANCE is not defined or is invalid - db2

I've followed several guides online and I cannot install IBM DB2 ODBC DRIVER on Windows.
I have downloaded the driver from IBM and installed (which was quite a roller-coaster).
If I follow guide1 or guide2 the result is the same:
SQL1390C The environment variable DB2INSTANCE is not defined or is invalid
Note: this is my C:\Program Files\IBM folder and as you can see there is no bin folder
Not sure if db2oreg1.exe -setup is still mandatory, things might have changed.

Thanks to #MarkBarinstein I found where the problem was.
I've followed this guide How to install IBM db2 ODBC driver in Windows 7 - 64 bit? and I downloaded the wrong package: I downloaded the universal_fixpack instead of the client.
I realized that when I saw the two folders in the Download directory:
So I uninstalled the universal_fixpack and installed the client and the installation was successful.

Related

How do I set the JDK in Oracle SQL Developer

Downloaded the Oracle XE and Oracle SQL Developer to my home computer (Windows) to learn PL/SQL. I use PL/SQL Developer at work but never set it up.
I downloaded the Oracle SQL Developer and all went well with the download. Got it working in the application view but when trying to run the sqldeveloper.sh I get errors showing up on the screen. The error reads:
The JDK 'C:Program' is not a valid JDK
The JDK specified by the SetJavaHome directive in
/c/../../.sqldeveloper/21.1.4.1/product.conf
Type the full pathnmae of a JDK installation (or Ctrl-C to quit), the path will
be stored in /c/../../.sqldeveloper/21.1.4.1/product.conf
I opened the product.conf file and added:
SetJavaHome C:\Program Files\Java\jdk
and did not work, so changed the directives from '' to '/'
SetJavaHome C:\Program Files\Java9.0.4\jdk
and still does not work. I even uninstall the version I downloaded first with without the jre and downloaded and installed the version that came with the jdk 8. I read through the post on stackoverflow and tried the solutions but nothing.
Please help
A couple of items to note:
To launch SQL Developer in Windows, you will want to launch sqldeveloper.exe, not sqldeveloper.sh
When you go to the SQL Developer Downloads, if you download Windows 64-bit with JDK 8 included you will not need to specify the path to your Java installation because it will come bundled with the installation.
If you choose to download Windows 32-bit/64-bit, you will then be prompted for the path to your JDK home when you first launch SQL Developer so you do not need to edit any configuration files or environment variables.

QT: driver not loaded, but driver is present

EDIT #2
It works, the first time I installed postgres 64bit, while Qt uses MinGW 32 bit.
EDIT
Following the answer linked by zapredelom, I installed postgres 9 and added to PATH the bin and lib directories. To be sure, I also restarted the machine, but nothing changed. QT_DEBUG_PLUGINS=1 gives me no additional debug infos.
I get this error at runtime:
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
As the error itself displays, postgres driver is already present. Indeed there's a qsqlpsql.dll and qsqlpsqld.dll under C:\Qt\5.8\mingw53_32\plugins\sqldrivers.
I have not built it and I have no Postgres installation on this machine (I test on my Linux OS and deploy on Windows 8.1 VM), the driver was already present after installing QT.
What's the problem?
The driver does not work because it does not find the dependency (it should be depends on libpq.dll), and when you run it, the plugin can not find the required dll. If you are using windows, just try to check using dependencywalker of the qsqlpsql.dll.
You can directly put your libpq.dll to your application exe folder.

postgres odbc connection fails

I am trying to set up a new postgres odbc connection for an application.
This is done on 32-bit Windows 7 system. I installed latest postgresql 9.6 & psqlodbc 0905, and there were no errors. When I add the odbc connection string and test connectivity with postgres login, it fails with the following error:
Test connection failed because of an error in initialized provider.
Specified driver could not be loaded due to system error 182:
(PostgreSQL UNICODE, C:\Program
Files\psqlODBC\0905\bin\psqlodbc35w.dll)
Here's the connection string:
Driver={PostgreSQL
UNICODE};Server=127.0.0.1;Port=5432;Database=postgres;
Uid=postgres;Pwd=postgres;
I then installed Visual C++ redistributable packager versions 2008 and 2010 later. Rebooted the box. Still same issue.
Postgres + odbc + other installs were complete and without any errors.
This is getting too frustrating.
Please.. any ideas on how to fix this will be helpful.?!
Update: I have tested the following:
1. Installed older postgres & psdqlodbc version
2. Added psqlodbc path to PATH env variable at the start
3. Uninstalled standalone psqlodbc installs, and installed Stackbuilder from postgresql package to download and install psqlodbc component.
All of these have not not been any useful.
Final Update: I was able to fix this by using psqlodbc_09_03_0400. For whatever reason, other versions kept throwing error.
Apparently, according to the Microsoft index of error codes, error 182 means ERROR_INVALID_ORDINAL, which with the help of this answer I believe means that the postgresql ODBC driver is loading another DLL and trying to call a function within it that does not exist.
The most likely cause for this would be that the system is loading a wrong version of a DLL on which psqlodbc depends. In fact I found this thread where someone else was having the same issue (although back in 2005).
This could happen if you had installed some other package containing one of the DLLs that psqlodbc relies on, or maybe even another version of psqlodbc.
Try changing the windows search path to put the directory containing the psqlodbc drivers at the front to confirm if this is the case. If that works you might want to try to narrow the problem down until you can find exactly what DLL is conflicting, and if possible remove it.
It is also possible that there is some packaging issue with the psqlodbc package you are using - if that is the case you could try uninstalling that one and installing an earlier version.
Final Update: I was able to fix this by using psqlodbc_09_03_0400. For whatever reason, other versions kept throwing error.

pgAdmin 4 not starting on Windows 10 64bit

After a fresh install of postgres 9.6.0.1 for Windows 10 64bit I am not able to get pgAdmin 4 starting.
First it throws an fatal error message:
After OK, that message appears:
Is there anything wrong? because after OK - the program won't start.
What can I do to get pgadmin 4 running? What should I enter in Python Path and what in Application Path?
I have found now the problem, it was the Java installation on which pgadmin 4 depend heavily.
In Windows when installing Java 8 (Java SE in this case) you do not have to use JAVA_HOME and JAVA_JRE anylonger and you can install java with default path settings (with the version number)
So I installed JAVA SDK 8 32 and 64bit and pgadmin start up normally.
The PATH variable includes only C:\ProgramData\Oracle\Java\javapath, thats all and let you use allways the latest version of java you installed.
In my case, I installed pgAdmin 4 v4.25 (released Aug. 20, 2020) . It solved my issue .
I had the same problem. I think, the installation of Visual C++ 2013 Redistributable is the source.
I fixed it uninstalling pgAdmin 4 and installing it again.
It tried to install Visual C++ 2013 Redistributable again, but it was already installed and now it works.
Hope this helps.
Try to install pgamin 4.5.1, it works for me (w10 x64) pgadmin 4.1.5
After struggling for weeks with this problem I found a solution. In my case I have Anaconda installed and maybe it affects PgAdmin in some way, I don't know. In order to start PgAdmin I followed these steps:
Open cmd and move to C:\Program Files\PostgreSQL\11\pgAdmin 4\web
Run pgAdmin4.py with your Python distribution. I had to install several libraries.
In my case, an error appeared, I needed to change Line #32 of C:\Program Files\PostgreSQL\11\pgAdmin 4\web\pgadmin\browser\__init__.py. More precisely:
from flask_security.views import _security, _commit, default_render_json, _ctx to
from flask_security.views import _security, _commit, _render_json, _ctx
Last, I needed to edited line socket module from Python libraries, gethostbyaddr(name) found non-ASCII symbols in the host name of my computer, I don't have any of them :S. Well, I changed line #687
hostname, aliases, ipaddrs = gethostbyaddr(name) to
hostname, aliases, ipaddrs = gethostbyaddr("")
After all of these steps I run pgAdmin4.py again and it worked.
Hope it helps.
For me there was no way to make it work (pgAdmin4 Version 4.21 that comes with Postgres 11.8 on Windows 10 x64). I really tried every possible solution.
So I gave up and found pgAdmin3 Redux: https://tokavuh.com/pgAdmin3Redux/ that supports Postgres 11, too.
You will probably have problems starting it, because of missing dll's from some Visual C++ Redistributable version I could not find out, but fortunately you will find these missing dll's on https://www.dll-files.com, just search them there as errors pops up.

Oracle - SQL Developer: msvcr100.dll is missing from your computer

Have installed 11g in Windows 7 (64 bit machine). Since the SQL developer wont work with 64 bit jdk.
Installed the 32 bit jdk1.7.0
and changed the ORACLE_HOME\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf file SetJavaHome point to 32 bit jdk1.7.0.
Again started the SQL developer, but it throws msvcr100.dll missing. Find that the SQL Developer3.x supports at max jdk1.6.X.
Even tho the question is answered I would like to point out that downloading random DLLs from untrusted sources should be avoided.
If you are missing MSVCR100.DLL just install the correct redist for your platform.
32Bit: Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)
http://www.microsoft.com/de-de/download/details.aspx?id=8328
64Bit: Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)
http://www.microsoft.com/en-us/download/details.aspx?id=13523
Cheers,
Antonio Huete
These information is specified in ORACLE_HOME\sqldeveloper\releasenotes . So install the jdk1.6 and make the sqldeveloper.conf SetJavaHome point to this.
other workaround is go to jdk1.7.0 installed path jdk1.7.0\jre\bin copy msvcr100.dll and paste it into ORACLE_HOME\sqldeveloper\sqldeveloper\bin and again try start SQL Developer. It will start.
And The file is from
This file was downloaded from: http://www.dll-files.com
If you downloaded it from somewhere else, please let us know: http://www.dll-files.com/contact.php
Installation instructions:
Extract the .dll file from .zip file. We recommend that you extract the .dll to the installation directory of the program that is requesting the .dll.
If that doesn't work, you will have to extract the .dll to your system directory. By default, this is:
C:\Windows\System (Windows 95/98/Me)
C:\WINNT\System32 (Windows NT/2000)
C:\Windows\System32 (Windows XP, Vista, 7, win 8)
If you use a 64-bit version of Windows, you should also place the .dll in C:\Windows\SysWOW64\
Make sure to overwrite any existing files (but make a backup copy of the original file for safety).
Reboot your computer.
If the problem still occurs, try the following:
Open Windows Start menu and select "Run...".
Type CMD and press Enter (or if you use Windows ME, type COMMAND)).
Type regsvr32 .dll and press Enter.
If you have any other problems, see our HELP-section at www.dll-files.com/support/
I have just downloaded latest 4.1.3 version with jdk included - Windows 64-bit with JDK 8 included to my Windows Server 2008 R2 64-bit and faced the same problem. Could not start sqldeveloper.exe, because "msvcr100.dll is missing from your computer".
I did not want to install any additional bloatware, so what I did:
take msvcr100.dll from original download SQLDeveloper folder sqldeveloper\jdk\jre\bin
and copy it to Your's oracle installation bin folder, in my case - C:\oraclexe\app\oracle\product\11.2.0\server\bin
SQL developer started!
Edit (path)\sqldeveloper.sqldeveloper\bin\sqldeveloper.conf with Notepad++ or some other advanced text editor. Don't use Windows Notepad for this.
Locate the SetJavaHome variable. Replace "../../jdk" with your regular PC Java source. On mine it was "C:\Program Files\Java\jdk1.8.0_73".
The line looks like this when you're done:
SetJavaHome C:\Program Files\Java\jdk1.8.0_73
Save and exit.
I got this error while running Oracle JDeveloper.
I have copied the msvcr100.dll file from C:\Windows\System32 to C:\Program Files\Java\jdk1.8.0_261\jre\bin.
It worked for me. Also check the enviromental varibles settings.
The JDK needs msvcr100.dll to either be located in the same directory as sqldeveloper.exe OR already be installed on a Windows machine in a location defined in environment path variable. In testing SQL Developer install on various Windows 7 machines where I have other software installed (not a clean machine), the msvcr100.dll is installed on C: \Windows\system32\msvcr100.dll.
you may get it from sqldeveloper\jdk\jre\bin\msvcr100.dll(refer your installation dir)
I was facing the same issue and it worked for me.
For me the solution was to simply upgrade SQL Developer. When work changed over my laptop I copied SQL Developer between machines and I got the above error except for msvcr120.dll. I copied that dll from my old machine but then it needed another and then another. So I downloaded the latest version of SQL developer and the errors went away. It might not solve the issues for everything but I think updating to the latest version should be done before trying any of the other solutions.