Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Data Source Profile for SQL Server (Bob Swift's SQL for Confluence)

JamesT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2015

Looking at the documentation for Bob Swift's SQL for Confluence addon (https://bobswift.atlassian.net/wiki/display/SQL/Data+Source+Profiles), I don't see any examples for SQL Server.  There are application server based data source configurations (https://bobswift.atlassian.net/wiki/display/SQL/Data+source+configuration+-+application+server), but those require rebooting Confluence.  I'd like to try the dynamic data source profile first.

Does anyone have an example for this?  The format should be something like:

 

dbUrl=jdbc:jtds:sqlserver://localhost:1433|
dbUser=username|
dbPassword=password|
dbDriver=??? |
dbJar=???

 

Thanks!

1 answer

1 accepted

2 votes
Answer accepted
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2015

This is what I have used.

dbDriver=net.sourceforge.jtds.jdbc.Driver|dbUrl=jdbc:jtds:sqlserver://{server}:1433/{database}|dbUser=user|dbPassword=password|dbJar=c:\Program Files\Atlassian\Confluence\confluence\WEB-INF\lib\jtds-1.2.2.jar
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2015

The configuration for data source profiles mirrors the information from the application server examples.

JamesT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2015

The app-server example doesn't explicitly reference a JAR: <Resource name="jdbc/myDS" auth="Container" type="javax.sql.DataSource" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://mysqlserver:1433/mydatabase" username="username" password="password" maxActive="20" maxIdle="10" maxWait="-1" validationQuery="Select 1" /> But, I see that the app-server's "driverClassName" maps to the data source profile's "dbDriver".

JamesT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2015

@Davin Studer Thanks, I'll try that today!

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2015

The dbJar reference is equivalent to putting the jdbc driver into the lib directory for the application server.

JamesT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 19, 2015

@Davin Studer Thanks, that did the trick! Wow, super easy to put SQL reports in Confluence now, even easier than using ASP.NET, which is somewhat similar with its SQL Data Sources.

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 19, 2015

Glad to hear it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events