4)编辑conf/server.xml 文件,将<Context ... .../>中的内容,修改为:
<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false">
<Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
username="sa"
password="sa"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://localhost:1433/jira_db" />
5)编辑 atlassian-jira/WEB-INF/classes/entityengine.xml文件, 修改field-type-name 的属性值为mssql(field-type-name="mssql"),
<datasource name="defaultDS" field-type-name="mssql"
schema-name="dbo";注意schema-name ,架构要选对,表明表创建在哪个架构下
(官方文档:
Configure the JIRA Entity Engine
1. Edit the JIRA Entity Engine configuration file and change the field-type-name attribute to mssql .
o If you are using JIRA Standalone, the JIRA Entity Engine configuration file that you need to edit is atlassian-jira/WEB-INF/classes/entityengine.xml .
o If you are using JIRA WAR/EAR, the JIRA Entity Engine configuration file that you need to edit is edit-webapp/WEB-INF/classes/entityengine.xml . If you forget to do to make this change and start JIRA, it may create database tables incorrectly. See this page if this happens to you.
2. Change schema-name="PUBLIC" to the name of the schema associated with the database (i.e. the schema you created in step 1.3 above), e.g. schema-name="jiraschema" . Note that the schema must exist in the database before you perform this step.
01.<!-- DATASOURCE - You will need to update this tag for your installation.
02.
03.-->
04. <datasource name="defaultDS" field-type-name="mssql"
05. schema-name="jiraschema"
06. helper-class="org.ofbiz.core.entity.GenericHelperDAO"
07. check-on-start="true"
08. use-foreign-keys="false"
09. ...
)
6)下载连接MS SQLServer数据库的JDBC Driver,推荐使用JTDS(http://jtds.sourceforge.net/),将 jtds-[version].jar文件拷贝到common\lib目录下;
7)运行bin目录下的startup.bat,启动JIRA;