Migrate your SQL Server Database

Unanet Strongly recommends that you backup your system before performing any type of upgrade!!  Please make sure you have completed Step 2 prior to attempting to migrate your database.

REPLICATION Notice:  If you are running any type of database replication, it must be disabled prior to running the migration scripts.

 

Note: See the Systems Requirements page to confirm you are running a supported database version.


The topics covered on this page include:


Run the migrate script

Please backup your database prior to running any migration scripts!

You can use the SQL Server Management Studio tool to perform the migrate in SQL Server.

  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, select (click on) your unanet database.

  3. Please note that if you are migrating more than one major release (i.e., 10.1 to 10.3 ), you MUST run all the migrate scripts in order (all migrate scripts are included in the current release download package).  For instance, in the previous example, you would need to run unanet102 migrate.sql and then unanet103 migrate.sql (to move from 10.1 to 10.2 and then from 10.2 to 10.3 ).

    Important Note:  The migration from 9.6 to 10.0 includes the running of multiple scripts and potentially a java conversion program.  See Important - Migration to 10.0 note below.

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

  5. 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 desired migration script (ie unanet1030migrate.sql) file and click Open.

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

  7. 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.

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

  9. 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.

  10. 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 - Migration to 10.0 -- Additional Step(s)

 

For the migration to version 10.0, more than one script is necessary.  If you're migrating from a version earlier than Unanet 9.6, you'll take this next step after having successfully run the unanet96migrate.sql.   If migrating from Unanet 9.6, this will be the first script run.  So, you'll either run steps 1, 2 & 3 or just 1 & 3.

 

 

  1. Run the unanet99migrate.sql (this is an intermediate step that partially migrates the 9.6 database).


  2. Depending on the output of the previous step, you may or may not need to run the cost_plus_conversion.jar java program step.

    If the step 1 output includes the following statement, "You are required to perform a cost plus data migration before continuing with subsequent migration scripts.", you will need to run the java conversion utility.  If that statement is not included in the output message, you can continue with step 3 to run the unanet100migrate.sql script.

In order to run this utility, you will need to use java (which should already be installed on your system as it is required to run Unanet).

  1. Launch your command prompt environment (ie Windows cmd, powershell, linux shell, etc).

  2. Change directory to your Unanet installation/database directory (ie c:\unanet\database\costplusconversion).

  3. Run the following command:   

java -jar cost_plus_conversion.jar c:\unanet\config

where c:\unanet\config is the location of your unanet config directory.

  1. The output from this java program step will resemble the following (depending on your data):


  1. Run the unanet100migrate.sql (this is the final step in the migration of the database from 9.6 to 10.0).

 

 
  


Review and save Output

As the migrate script runs, output will come to the screen.  

You should review the output and make sure there are no errors.  Save the output in case any issues are discovered.  By saving the output, you can email it to the Unanet support staff if you have any questions about specific errors you might have encountered.

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

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

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

 

Database Performance Note!!  This may be a good time for you to review and cleanup any large transaction logs and otherwise check that you have adequate disk and memory space for continued smooth database operation.

See Microsoft support site for tips regarding managing database transaction log size.


Having Problems?

If you are experiencing difficulties contact Unanet Customer Support for assistance.


Next Step

Step 6 -- Servlet Engine Configuration

This step depends on the Servlet Engine your Unanet Installation uses.  Please choose the link appropriate for your system: