How To Maintain and Optimize the SQL Database for DocuShare
applies to DocuShare 6.5.x, 6.6.x, 7.0 and 7.5.
For active sites it is
recommended that the following maintenance/optimization is done to the
• Daily update statistics
• Check on fragmentation once a
Consult your DBA or
Administrator before attempting to run these commands. The DBA or Administrator
will determine the appropriate settings and configurations for your
environment. Only the DBA has the security permissions to run the database
Depending on the size and usage of your DocuShare site, performance may be slow
during database optimization. We recommend that you use Site
Management/Access and set Site Access Authority to Administrator.
Changes may be
necessary to fit your specific environment. All commands in the examples are to
be run on the database server, which may or may not be the same server that is
running your DocuShare site.
database optimization procedure example below assumes that SQL Express was
installed with during the installation of DocuShare by our installer and is on
the same server as DocuShare .
an experienced DBA or Windows Administrator should be running the commands
Choose one of the
following options to optimize the SQL database.
1: Optimize the database using the SQL Management Console
1. Open SQL Server Management Studio.
2. Open a New Query window.
3. Type the following:
4. Press F5 to execute the command.
2: Optimize the database using the Command Line
1. Open a command prompt window.
2. Use the CD command to change into the Binn directory
3. From the Binn directory, run the osql.exe command by entering the
following line, replacing all the bracketed names with the correct values for
-S [servername]\[MSDE_InstanceName] -d [DocushareDatabaseName] -U
SA -P [SA_Password]
Note : The default Instance Name at
the time of install is SQLEXPRESS (when selecting Install as Default Instance)
and the default Database Name is Docushare. If you selected a Named Instance
during the installation or installed SQL Express separately then modify your
command to match your environment settings.
4. Press Enter. The
command displays the OSQL prompt 1>.
Note: If the 1> prompt is not
displayed then you will need to verify the information specified in step 3 is
correct for you server.
5. At the 1> prompt type sp_updatestats and press Enter.
6. At the 2> prompt type go and press Enter. When the optimization processing is complete,
OSQL displays a 1> prompt.
7. Once completed type exit and press Enter.
February 4, 2021
Solution ID: 701