简体   繁体   English

Redmine与SQL Server 2008 R2

[英]Redmine with SQL Server 2008 R2

I used the installation guide here to install Redmine to our Windows production server using IIS 7. The installation was smooth and required almost no input from me --- I just hit "go" and it did everything. 我在这里使用安装指南,使用IIS 7将Redmine安装到我们的Windows生产服务器上。安装过程很顺利,几乎不需要我输入任何信息-我点击“ go”就可以了。

However, our production server already has SQL Server 2008 R2. 但是,我们的生产服务器已经具有SQL Server 2008 R2。 In setting Redmine up, it appears to have automatically installed and set up the required database in a separate engine. 在设置Redmine时,它似乎已自动在单独的引擎中安装并设置了所需的数据库。 I'd like to migrate this to our SQL Server 2008 R2, just to centralize everything into one engine, so we have one less thing to keep tabs on. 我想将其迁移到我们的SQL Server 2008 R2中,只是为了将所有内容集中到一个引擎中,因此,我们需要注意的另一件事。

According to that installation guide, Redmine supports multiple database engines. 根据该安装指南,Redmine支持多个数据库引擎。 But I don't understand the instructions given in the "Custom Database" section. 但是我不理解“自定义数据库”部分中给出的说明。 For one, it says to go the config folder of the Redmine application and choose the file that corresponds to my desired database engine and rename it to database.yml. 首先,它说要转到Redmine应用程序的config文件夹,然后选择与我所需的数据库引擎相对应的文件,并将其重命名为database.yml。

Here's what I have in my Redmine config folder: 这是我的Redmine config文件夹中的内容:

[folder] environments
[folder] initializers
[folder] locales
additional_environment.rb.example
application.rb
boot.rb
configuration.yml.example
database.yml
database.yml.example
environment.rb
preinitializer.rb
routes.rb
settings.yml

So first of all, I don't see any kind of "database.yml.mssql" file like I was hoping for. 因此,首先,我没有看到任何我想要的“ database.yml.mssql”文件。 I went ahead and opened database.yml in Notepad just to see what I'm working with, and this is the contents of that file: 我继续并在记事本中打开database.yml只是为了查看我正在使用什么,这是该文件的内容:

production:
  adapter: sqlite3
  database: db/test.sqlite3
  host: localhost
  username: root
  password:
  encoding: utf8

development:
  adapter: mysql
  database: redmine_development
  host: localhost
  username: root
  password:
  encoding: utf8

I have absolutely zero experience with databases other than Microsoft SQL Server 2008 R2. 我对Microsoft SQL Server 2008 R2以外的数据库绝对没有零经验。 My first question is, where in the world did mysql and sqlite3 get installed? 我的第一个问题是,在世界上哪个地方安​​装了mysql和sqlite3? I can't find any trace of them, and I have no idea how to "see" the databases, even through command line. 我找不到它们的任何痕迹,而且我也不知道如何“查看”数据库,即使通过命令行也是如此。

Of interest is a folder called "db" inside the Redmine application folder. 感兴趣的是Redmine应用程序文件夹中的一个名为“ db”的文件夹。 This folder contains: 该文件夹包含:

[folder] migrate
schema.rb
test.sqlite3

These files are almost surely related, but I'm not seeing how everything ties together. 这些文件几乎可以肯定是相关的,但是我看不到所有东西如何联系在一起。 The migrate folder contains a bunch of .rb files like 001_setup.rb and 105_build_projects_tree.rb. migration文件夹包含一堆.rb文件,例如001_setup.rb和105_build_projects_tree.rb。

I did search Google for like "redmine sql server", and the problem with the results is that in some cases a thread was begun with the same question and never followed up on, OR, the post/thread is years old and possibly no long reliable. 我确实在Google上搜索了“ redmine sql server”,结果的问题是,在某些情况下,某个线程是从同一个问题开始的,并且从未跟进,或者,发布/线程已经存在很长时间了,可能不再可靠。

Right now Redmine appears to be working. 目前,Redmine似乎正在运行。 I can create users, log in, and so on. 我可以创建用户,登录等等。 But it's a huge blackbox. 但这是一个巨大的黑箱。 If migration to SQL Server 2008 R2 is not feasible and I'm stuck using whatever the default is, I want to know where the database that Redmine is using is, and how I can view the tables, etc. 如果无法迁移到SQL Server 2008 R2,并且我坚持使用默认值,那么我想知道Redmine使用的数据库在哪里,以及如何查看表等。

The bottom line question: how can I modify Redmine to use SQL Server 2008 R2? 底线问题:如何修改Redmine以使用SQL Server 2008 R2?

I don't have any experience using Redmine with MSSQL, so I can't answer your main question. 我没有将Redmine与MSSQL结合使用的经验,所以我无法回答您的主要问题。 But I can offer some info on two of your sub-questions: 但我可以提供一些有关您的两个子问题的信息:

First, I'm pretty sure that the "development" db (the mysql one) doesn't exist. 首先,我非常确定“ development”数据库(MySQL数据库)不存在。 The database.yml always seems to include that (I guess as an example of how to have one Redmine instance that has both a test and prod database), but the installation only creates the production database. database.yml似乎总是包括该内容(我想作为一个示例,说明如何拥有一个同时具有测试和生产数据库的Redmine实例),但是安装仅创建生产数据库。

You also asked about how to see the database, if you're stuck using the sqlite db for now. 您还询问了有关如何查看数据库的信息,如果您现在仍无法使用sqlite db。 There is a command-line program at http://www.sqlite.org/sqlite.html that ought to enable you to query and modify the db. http://www.sqlite.org/sqlite.html上有一个命令行程序,可以使您查询和修改数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM