I am installing TeamCity on a Windows 2012 Server. I'm at the database connection setup screen but getting this error.
"SQL error when doing: Taking a connection from the data source: no sqljdbc_auth in java.library.path"
I've copied the sqljdbc_auth.dll
to the C:\\Windows\\System32
folder and added a system environment variable java.library.path
that points to this folder.
Teamcity installs the 32-bit version even if you're on a 64-bit platform unless you deliberately use 64-bit. So I am just going to give you the 32-bit instructions for using Windows authentication with Teamcity SQL database setup. The instructions are the same for the 64-bit setup, just change x86 to x64
<TeamCity_data_dir>\\lib\\jdbc\\sqljdbc42.jar
auth\\x86\\sqljdbc_auth.dll
from the Microsoft download to <TeamCity_data_dir>\\lib\\sqljdbc_auth.dll
-Djava.library.path=<TeamCity_data_dir>\\lib
or run setx TEAMCITY_SERVER_OPTS=-Djava.library.path=<TeamCity_data_dir>\\lib
Now you can connect Teamcity to the SQL server using Windows Authentication after which the wizard will create the database.
With the 2019.2.1 update I've had to move the sql_jdbcauth.dll file to <TeamCity_data_dir>\\system\\caches\\jdbc\\native\\windows-i386
This could be just a bug in the upgrade process.
This
http://www.mikeobrien.net/blog/teamcity-sqlserver-integrated-security
helped me.
I used the JDBC 4.1 version.
I managed to resolve the issue by using SQL Server authentication instead of Windows authentication during the database configuration setup. Not sure why this should have fixed the error as it relates to a Java environment variable, but I can only assume that the error was generated by it's failure to login to the database and for some reason threw an unrelated error instead.
This appears to be an error with TeamCity throwing the wrong error message. If you get this error, try switching to SQL Server authentication.
如果您在 32 位上运行,您只需将sqljdbc_auth.dll
的 x86 版本(从 jdbc 下载)复制到<TeamCityProgramDir>\\bin
。
You should check your TeamCity server log. Mine (located at c:\\TeamCity\\logs\\teamcity-server.log
) mentions the following:
[2019-03-20 07:54:56,045] INFO - jetbrains.buildServer.STARTUP - Native library sqljdbc_auth.dll was not found under either E:\\BuildServer\\lib\\jdbc\\native\\windows-i386 or E:\\BuildServer\\lib\\jdbc\\native; will continue looking in sun.boot.library.path and java.library.path.
After putting the sqljdbc_auth.dll
library in E:\\BuildServer\\lib\\jdbc\\native\\windows-i386
and restarting the service everything was fine and dandy; without having to meddle with bin
folders (they get reset during TC upgrades) or having to define environment variables.
In my case it didn't worked because there were some files from previous install and version TeamCity isntallation. I uninstalled TeamCity, deleted all TeamCity folders and installed again. Then it worked like a charm.
I was running into this issue today with TeamCity 10.x, with bundled Java, and I wanted to migrate an existing, internal, database to SQL Server.
TEAMCITY_SERVER_OPTS
with the value of -Djava.library.path=C:\\ProgramData\\JetBrains\\TeamCity\\lib
.TEAMCITY_MAINTAINDB_OPTS
with the same value ( -Djava.library.path=C:\\ProgramData\\JetBrains\\TeamCity\\lib
).Now you can run MaintainDB without getting an error about the sqljdbc_auth.dll not being in the JAVA library path.
See Creating Backup via maintainDB command-line tool - maintainDB Startup Options for why both environment variables need to be set.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.