<!-- wp:html -->
<p style="font-size: 20px; line-height: 1.5em;"> We're going to delve into a topic that regularly crops up via emails and calls - deploying with - or upsizing PaperCut to - an external database, DUN DUN DUN! - &nbsp;Don’t worry, it is not anything to be scared about. Cup of tea in hand? Great, then keep scrolling!</p> <p><br></p>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>The process involved in deploying PaperCut with, or moving it to, an external DB can seem daunting at first, but in fact the process isn't all that complicated, the steps listed in the PaperCut manual under <a href="https://www.papercut.com/support/resources/manuals/ng-mf/common/topics/ext-db-upsizing.html"><strong>Upsize to an external database</strong></a> will show you how to tackle it with speed and confidence (all you ever need in this game). </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But first, it's worth taking a moment to look at some reasons why you might want to consider doing it and how it may be beneficial. By default, PaperCut MF uses an internal database called <a href="https://db.apache.org/derby/">Apache Derby</a>. You might, however, consider running PaperCut MF on an external database if:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Your <g class="gr_ gr_21 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" id="21" data-gr-id="21">organisation</g> has existing database infrastructure and wants to consolidate all applications on the same database platform.</li><li>Your <g class="gr_ gr_20 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" id="20" data-gr-id="20">organisation</g> has existing database maintenance and backup procedures and wants PaperCut MF to take advantage of this.</li><li>People want to use 3rd party reporting and analysis tools (like Crystal Reports or PowerBI etc) to view and <g class="gr_ gr_23 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" id="23" data-gr-id="23">analyse</g> the data in the PaperCut MF database. The built-in Apache database won't allow this due to concurrent connection limitations (your PaperCut MF install is all that is allowed to talk to the database).<br></li><li>You want to keep that data super safe. Probably the most important area to consider for failover is in the database (as data is important, right?) anything else can be rebuilt/installed again.</li><li>Your <g class="gr_ gr_34 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" id="34" data-gr-id="34">organisation</g> is very large and requires the performance benefits of a dedicated database. This also allows the database to reside on a separate server to PaperCut MF, which improves the system scalability. Unsure? <a href="mailto:ps@selectec.com">email</a> our pre-sales experts.</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>The last of those points is also of relevance when discussing future growth and capacity...</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"align":"left"} -->
<h3 style="text-align:left">Database sizing and growth</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>One of the important things to consider for any database is how big will that database get? Care must be taken to ensure there is enough disk space to hold the growing database, which is one of the more popular issues we see on our support desk. <br>A PaperCut install can get very upset if it is trying to write info to the internal database and there is no space on the disk, the same can be said if there is activity in the database and the power to the machine is removed in a rude and abrupt fashion. PaperCut has a great article on <a href="https://www.papercut.com/support/resources/manuals/ng-mf/common/topics/ext-db-upsizing.html">database size</a>, have a read over a cuppa and get the calculator out and at the same time remember hard drives are cheap!</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"align":"left"} -->
<h3 style="text-align:left">Supported database</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>PaperCut MF supports the following external databases out-of-the-box:<br></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Microsoft SQL Server 2000/2005/2008/2012/2014/2016 (either 32-bit or 64-bit)</li><li>Microsoft SQL Server Express 2005/2008/2012/2014/2016 (free from Microsoft)</li><li>PostgreSQL 7.1+ (a free open source database)</li><li>MySQL 5.5+ (a free and open source database) while not officially supported MariaDB and Percona also work as drop-in replacements for MySQL)</li><li>Oracle 9.2+ (including the free Oracle Express Edition).</li></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3,"align":"left"} -->
<h3 style="text-align:left">SQL, SQL, SQL</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Sure, other databases exist we've even listed some above, but our stats show most people use good old MS SQL. So, if you are going to use an external database (and you should) and you are going to use MS SQL (one of our favourites) then the following tips might help make that experience better for you and your customer. </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"align":"left"} -->
<h3 style="text-align:left">Use the MS SQL database driver</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Let us start by setting you off on the right footing.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Anyone using MS SQL 2014 or later should look at using a certain driver from Microsoft to help their database interact with PaperCut in a nicer way. You can download the latest version of Microsoft’s JDBC driver for SQL Server <a href="https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-2017">here</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Now, to install it requires some extra steps but nothing tricky, if we take the version 7.0 driver as an example<br></p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><li>Run the exe file, (in this example) sqljdbc_7.0.0.0_enu.exe to extract the files.</li><li>Copy the file mssql-jdbc-7.0.0.jre8.jar from the extracted directory and place it in C:\Program Files\PaperCut MF\server\lib-ext\</li><li>Comment out your current SQL entries from the server.properties file in C:\Program Files\PaperCut MF\server (these will form your backup plan)</li><li>Copy the following entries into the server.properties file and modify to point to your SQL server:</li></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>database.type=SQLServer</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>database.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>database.url=jdbc:sqlserver://&lt;serverName&gt;:&lt;portNumber&gt;;databaseName=&lt;databasename&gt;;socketTimeout=600000</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>database.username=&lt;user name&gt;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>database.password=&lt;password&gt;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Your database will love you for it.<br></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Anything else? Good question! Our last tip would be to let you know that PaperCut 19.0+ ships with the 7.0 driver by default so any new installs of PaperCut are going to be super happy.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"align":"left"} -->
<h3 style="text-align:left">Set statistics to auto update</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Each table inside of your PaperCut database has lots going on, especially when information needs to be found. All of that data is indexed nicely so if you are searching for all print jobs by “Eric Brooks” the database knows it can scan the indexes for “Eric Brooks” to get what it needs without having to read each record in the table. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To keep things fast that index needs some love sometimes, you can set up this optimisation as a scheduled task out of hours to avoid the database getting too busy during the workday. <br><br>The optimisation PaperCut recommend you run is:<br>exec sp_msForEachTable @COMMAND1= 'DBCC DBREINDEX ( "?")';<br>exec sp_updatestats;<br><br>In PaperCut's own words:<br><em>Databases with large databases with millions of print jobs can complete this command in less than three minutes. The result was seen where reporting took 10-15 minutes before optimisation, and now takes a matter of seconds.</em><br></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Why? data loves a reindex, magic happens and things move faster, do it, do it now! As always, consult with the customers DB Admins before making any changes.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"align":"left"} -->
<h3 style="text-align:left">What's next?</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Any questions? - <a href="https://staging.selectec.com/contact/">Get in touch!</a> We enjoy learning about the new challenges customers face and are more than happy to offer our experience to assist you. We also hope you all know who Eric Brooks is...(best Marvel Film ever....)<br></p>
<!-- /wp:paragraph -->