Install and Configure the SQL Server Database for Unanet

Once you have met the Pre-installation requirements, you can create your Unanet database.  This page details instructions on creating the Unanet database using Microsoft SQL Server.  If you are using Oracle follow those installation instructions instead.  

Note: When using SQL Server you must specify the JTDS driver in the unatime.database.driver property in the db.properties file.

Important!!  Please make sure you are installing Unanet in a supported database version -- see System Requirements for more information.

The topics covered on this page include:


Install SQL Server Database

You'll need to follow the Microsoft Installation instructions for installing this product on your servers.  A few important considerations prior to installing the Unanet product include:


Create the Database

  1. Open your Microsoft SQL Server Management Studio. If you're new to this product, this can be found in Start\Programs.   
  2. In the Connect to Server dialog box, use the following settings to connect:

(note: ALWAYS use these connection settings when doing other operations on the Unanet database)


  1. In the Object Explorer Window, you should see the machine name of your database server.  Click on the plus sign to expand this section.
  2. You should see the Databases section.  Click on the plus sign to expand this section (Note: If this is the first time you are installing the  database, you should NOT see the ”Unanet” database under the machine name).
  3. Right click on Databases and chose New Database.  A popup dialog box will appear with the cursor flashing in the Database Name section, enter the word unanet (if this is what you would like to name it) and click the Ok button

 

Note:  If you have a large system, you may want to have your DBA tune the database to take advantage of your server and disk capabilities.


Create the Unanet Schema

These instructions assume you have created the database and called it unanet as explained in the Create the Database section above

  1. From your Microsoft SQL Server Management Studio, select (click on) your new unanet database.

  2. On the File menu, choose the Open->File option. An Open File dialog box should pop up.

  3. Navigate to the database\sqlserver directory that was created as part of your Unanet installation. (the default location of the scripts is c:\unanet\database\sqlserver)  Choose the sqlunanet.sql file and click Open.

  4. A Connect to Database Engine dialog box should pop up along with the contents of the sqlunanet.sql script loading behind it.  

  5. Click on the Options button to reveal more options.  In the Connect to Database dropdown, make sure that ”Unanet” (or whatever name you used) for the Unanet database) is selected.  If you do not see it in the drop down list, select the ”<browse server>” option to refresh the list of databases on that machine.  Click Yes to answer the Do you want to continue warning.  Under the resulting Browse server for Database dialog that appears, find the User Databases tree.  It should have your new Unanet database under it.  Select the new Unanet database and click OK.  Make sure the unanet database is selected -- This is very important.  We don't want to run these scripts in any other database.

  6. Click Connect on the Connect to Database Engine dialog box.  The box will disappear and leave the tab with the sqlunanet.sql script open.

  7. Click on the ”! Execute” button in the toolbar above the tab (or right-click anywhere in the tab and choose ”! Execute”, just be sure not to modify the script in any way).  The script will begin to execute and the screen will split into to halves – the upper half being the script contents and the lower half divided among two tabs, Results and Messages.  The script can take a minute or two depending on your machine specifications.  When the script finishes, the Results tab will go away leaving you with the Messages tab.

  8. Make sure that Query Executed Successfully appears at the bottom of the window.  If there were any errors, please save the results of the Messages tab by right-clicking anywhere inside the Messages tab and choosing Save As.  Choose a location that you will remember and then save the results.  Email this to Unanet support (support@unanet.com) and we will assist you.

 

   *******   !! IMPORTANT !!   *******

Please review the script output file checking for any errors before you continue with the installation.  

If you encounter ANY ERRORS, please contact Unanet Support, DO NOT CONTINUE WITH THE INSTALLATION.

Note 2:  Whenever the sqlunanet.sql script is run, it first tries to delete any Unanet objects that may already be in the database.  For this reason, it is important that you never re-run this script if there is data in the database that you want to keep.  

Note 3: If you think you might need to re-run any of the sql scripts, contact the Unanet support staff first and we'll help you decide the best course of action.  Remember, always back up your database before performing any maintenance activities!!


Grant Roles/Permissions

Note:  If the database was named something other than unanet, you will need to edit the sqlpermissions.sql script, substituting the new database name prior to executing that script.  See instructions below.

Next we need to run the permissions script.

  1. From your Microsoft SQL Server Management Studio, select (click on) your new unanet database.

  2. On the File menu, choose the Open->File option. An Open File dialog box should pop up.

  3. Navigate to the database\sqlserver directory that was created as part of your Unanet installation. (the default location of the scripts is c:\unanet\database\sqlserver)  Choose the sqlpermissions.sql file and click Open.

  4. A Connect to Database Engine dialog box should pop up along with the contents of the sqlunanet.sql script loading behind it.  

  5. Click on the Options button to reveal more options.  In the Connect to Database dropdown, make sure that ”Unanet” (or whatever name you used) for the Unanet database) is selected.  If you do not see it in the drop down list, select the ”<browse server>” option to refresh the list of databases on that machine.  Click Yes to answer the Do you want to continue warning.  Under the resulting Browse server for Database dialog that appears, find the User Databases tree.  It should have your new Unanet database under it.  Select the new Unanet database and click OK.  Make sure the unanet database is selected -- This is very important.  We don't want to run these scripts in any other database.

  6. Click Connect on the Connect to Database Engine dialog box.  The box will disappear and leave the tab with the sqlpermissions.sql script open. Before you run the sqlpermissions.sql script, you may need to change the three variables at the top of the script:

  1.  

  2. **You would be advised to modify the scripts and change the default password to use something other than "unanet", keeping in mind your database password requirements and internal policies.


  1. Click on the ”! Execute” button in the toolbar above the tab (or right-click anywhere in the tab and choose ”! Execute”, just be sure not to modify the script in any way).  The script will begin to execute and the screen will split into to halves – the upper half being the script contents and the lower half divided among two tabs, Results and Messages.  The usually finishes very quickly.  When the script finishes, the Results tab will go away leaving you with the Messages tab.

  2. Make sure that Query Executed Successfully appears at the bottom of the window.  If there were any errors, please save the results of the Messages tab by right-clicking anywhere inside the Messages tab and choosing Save As.  Choose a location that you will remember and then save the results.  Email this to Unanet support (support@unanet.com) and we will assist you.

 

That's it for running the two SQL Scripts. Close the SQL Server Management Studio.


Having Problems?

If you are experiencing the "Database is not currently available" error, you might check out the Common Sql Server Configuration Issues.  

If you are still having problems, contact Unanet Customer Support for assistance.


Next Step

Step 4 -- Install/Configure Java

Once the Database objects are created, you are ready to move on to Step 4 -- Installing and configuring Java.