如何将 Teamcity 连接到现有 SQLServer 2005 数据库

发布于 2024-07-25 03:02:46 字数 321 浏览 8 评论 0原文

我们有一台运行 teamcity 4.0.2 的机器,并使用 SqlServer 2005 作为数据存储。 机器崩溃了,但我们仍然拥有数据库。 如何将新创建的 teamcity 实例连接到数据库?

我找到了有关将现有 teamcity 安装迁移到新数据库的信息。 但这不是我想要的。

编辑: 我认为数据库包含项目的配置。 事实并非如此:它位于 Teamcity 数据目录 (.BuildServer) 的配置文件夹中,

我只需将该文件夹的内容复制到新安装中即可。 我想我的问题是错误的。 无论如何,我保持原样,因为可能还有其他人有相同的想法。

We had a machine that run teamcity 4.0.2 and that used SqlServer 2005 as datastore. The machine crashed, but we still have the database. How can I get a newly created instance of teamcity connected to the database?

I found infos about migrating an existing teamcity installation over to a new database. But thats not what I want.

EDIT:
I thought that the database contains the configuration for the projects. Thats not the case: Its in the folder Configuration of the Teamcity data directory (.BuildServer)

I only had to copy the contents of that folder over to my new installation. I guess my question was wrong. Anyway I leave it as it is, because there might be others who have the same idea.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

铁憨憨 2024-08-01 03:02:46

使用内部数据库启动 TeamCity,以便重新创建 TeamCity 配置目录(除非您已经有该目录的备份)。

然后关闭 TeamCity 并将数据库驱动程序(最新版本为 jtds-1.2.2.jar)复制到 < code>TeamCity\webapps\ROOT\WEB-INF\lib 并在 .BuildServer\config\database.properties 中创建 database.properties 文件:

driverName=net.sourceforge.jtds.jdbc.Driver
connectionUrl=jdbc:jtds:sqlserver://192.168.1.99:1433/TeamCityDB
connectionProperties.user=teamcity_user
connectionProperties.password=teamcity_passwd 
maxConnections=50
poolPreparedStatements=true

重新启动 TeamCity,您应该就可以开始了。

Start TeamCity using the internal database so that the TeamCity configuration directory is recreated (unless you have a backup of that already).

Then shut down TeamCity and copy the database driver (latest version is jtds-1.2.2.jar) to TeamCity\webapps\ROOT\WEB-INF\lib and create the database.properties file in .BuildServer\config\database.properties:

driverName=net.sourceforge.jtds.jdbc.Driver
connectionUrl=jdbc:jtds:sqlserver://192.168.1.99:1433/TeamCityDB
connectionProperties.user=teamcity_user
connectionProperties.password=teamcity_passwd 
maxConnections=50
poolPreparedStatements=true

Restart TeamCity and you should be good to go.

仅一夜美梦 2024-08-01 03:02:46
  1. 下载 MSSQL 驱动程序并将其复制到 TeamCity 安装的 WEB-INF/lib 中(可能位于程序文件(如果您运行的是 Windows)。

  2. 在配置目录中创建一个名为database.properties的文件(在Windows下通常是Documents and settings\user_who_ran_install.buildserver\config)并将以下行放入其中:

    driverName=net.sourceforge.jtds.jdbc.Driver
    ConnectionUrl=jdbc:jtds:sqlserver://:1433/
    连接属性.user=
    连接属性.password=

    最大连接数=50
    poolPreparedStatements=true

重新启动 TeamCity Web Server 服务。 它不会恢复或无法访问的可能性非零。 请按照此处的说明进行操作,并你应该没事。 确保有可用的数据库备份,以防 TeamCity 因某种原因决定重新安装所有数据对象。

  1. Download the MSSQL driver and copy it to WEB-INF/lib of your TeamCity install (probably under program files if you're running Windows).

  2. Create a file called database.properties in your config directory (under Windows it's usually Documents and settings\user_who_ran_install.buildserver\config) and put the following lines into it:

    driverName=net.sourceforge.jtds.jdbc.Driver
    connectionUrl=jdbc:jtds:sqlserver://:1433/
    connectionProperties.user=
    connectionProperties.password=

    maxConnections=50
    poolPreparedStatements=true

Restart TeamCity Web Server service. There's a nonzero chance it won't come back up or will be unreachable. Follow the instructions here to the letter and you should be OK. Make sure to have a backup of your database available in case TeamCity decides to reinstall all the data objects for some reason.

别再吹冷风 2024-08-01 03:02:46

我不知道 team city 是如何运作的,所以我可能没有最好的答案。 但是,您不能尝试备份数据库,重新安装 team city,然后通过 teamcity 创建的实例恢复备份数据库吗?

I don't know how team city works, so I might not have the best answer. However could you not try backing up the DB, reinstalling team city and then restoring the backup DB over the instance created by teamcity?

撧情箌佬 2024-08-01 03:02:46

我在使用 TeamCity 9.1 和 SQL Server 2012 时也遇到了类似的问题。我们的 TeamCity 没问题,但数据库无法访问。 我们必须将数据库的备份副本恢复到另一台服务器,然后将 TeamCity 指向它。 为了将 TeamCity 指向新服务器上的数据库,我们需要修改 C:\programData\JetBrains\TeamCity\config 中的 database.properties 文件。 然后在构建计算机上重新启动 TeamCity 服务。 之后 TeamCity 就可以正常运行了。

I had a similar problem with TeamCity 9.1 and SQL Server 2012. Our TeamCity was ok but db was unreachable. We had to restore a backup copy of the db to another server and then point TeamCity to it. In order to point TeamCity to the db on the new server we needed to modify the database.properties file in C:\programData\JetBrains\TeamCity\config. Then restart the TeamCity services on the build machine. After that TeamCity was able to come up just fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文