Dashboard > GreenPepper Server > ... > HowTo's > HowTo - Use SQL Server as database for GreenPepper
 GreenPepperThis Space is not registered in GreenPepper Server.

Prerequisites

Creating JNDI connection pool

  • Stop Confluence if it is actually running
  • Move the file confluence.home/confluence/WEB-INF/lib/jtds-x.x.jar to confluence.home/lib. This jar file represent the JDBC driver to connect to a SQL Server database (where x.x is the version in the filename of the jar)
  • Add a JNDI resource inside the Context element of the configuration file conf/server.xml :
    <Server port="8000" shutdown="SHUTDOWN" debug="0">
        <Service name="Tomcat-Standalone">
            ...
    
            <Engine name="Standalone" defaultHost="localhost" debug="0">
    
                <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false">
    
                    <Context path="" docBase="../confluence" debug="0" reloadable="false">
                        <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
                        <Manager pathname="" />
                        
                        <!-- Sql Server -->
                        <Resource name="jdbc/GreenPepperDS" auth="Container" type="javax.sql.DataSource"
                                maxActive="100" maxIdle="30" maxWait="10000"
                                username="{sql-username}" password="{sql-password}"
                                driverClassName="net.sourceforge.jtds.jdbc.Driver"
                                url="jdbc:jtds:sqlserver://{sqlserverhost}:1433;DatabaseName={databaseName}"/>
    
                    </Context>
                </Host>
    
            </Engine>
            ...
    
        </Service>
    </Server>
    
  • Restart Confluence

Basic Configuration

  • From the Administration Console of Confluence, click the Plugins link (shortcut), find and click on the GreenPepper Toolbox link.
  • Click the Configure plugin link
  • On the database tab, select Custom Install from the Installation Type list
  • Select the SQLServer database and enter jdbc/GreenPepperDS as the JNDI Name
  • Click the Test link to see if the database connection is working
  • If the Test is failing, try using java:comp/env/jdbc/GreenPepperDS as the JNDI Name and click the Test link again
  • If the Test is successfull then click the Save link
  • If the Test is not successfull, consult the log file to see what is causing the problem
© Pyxis Technologies Inc.. All rights reserved. GreenPepper® is registered to Pyxis Technologies inc.