如何将 Teamcity 连接到现有的 SQLServer 2005 数据库 [英] How do I connect Teamcity to an existing SQLServer 2005 database

查看:42
本文介绍了如何将 Teamcity 连接到现有的 SQLServer 2005 数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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?

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

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

我认为数据库包含项目的配置.事实并非如此:它在 Teamcity 数据目录 (.BuildServer) 的文件夹 Configuration 中

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.

推荐答案

  1. 下载 MSSQL 驱动程序 并将其复制到 TeamCity 安装的 WEB-INF/lib(如果您运行的是 Windows,可能在程序文件下).

  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).

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

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.DriverconnectionUrl=jdbc:jtds:sqlserver://:1433/connectionProperties.user=connectionProperties.password=

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

最大连接数=50poolPreparedStatements=true

maxConnections=50 poolPreparedStatements=true

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

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.

这篇关于如何将 Teamcity 连接到现有的 SQLServer 2005 数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆