Upgrading to MaintSmart Enterprise 4.1 using a SQL Server (2005

Upgrading to MaintSmart Enterprise 4.1 using
a SQL Server (2005-2008 R2) database
Copyright ©
Copyright MaintSmart Software, Inc., 1996-2014. All rights reserved. No part of this publication may be reproduced, transmitted,
transcribed, stored in a retrieval system, or translated into any language in any form by any means without the written permission
of MaintSmart Software, Inc.
Software License Notice
Your license agreement with MaintSmart Software, Inc., which is included with the product, specifies the permitted and prohibited
uses of the product. Any unauthorized duplication or use of this software, in whole or in part, in print, or in any other storage and
retrieval system is forbidden.
Licenses and Trademarks
MaintSmart, MaintSmart Web, and MaintSmart Enterprise Edition are trademarks of MaintSmart Software, Inc. Windows, Microsoft
Access, and Microsoft SQL Server are registered trademarks of Microsoft Corporation. Crystal Reports is a registered trademark of
Business Objects. All third-party software and/or code is the property of their respective owners. The right to copyright and
trademark this software has been granted. See your MaintSmart license agreement for additional information.
Information in this document is subject to change without notice and does not represent a commitment on the part of MaintSmart
Software, Inc. Unless otherwise noted; all companies, products, street addresses, and persons contained herein are purely
fictitious. Mention of third party companies and products is for informational purposes only and does not constitute an
endorsement. MaintSmart Software, Inc. assumes no responsibility with regard to the selection, performance, or use of these
products.
All understandings, agreements or warranties, if any, take place directly between the vendor and prospective users.
MaintSmart Software, Inc.
66164 Homestead Rd.
North Bend, OR 97459
(541) 751-0450
http://www.maintsmart.com
Skype: “maintsmart”
Printed in the USA
For instruction on upgrading the Access database option:
http://www.maintsmartftp.com/Support/UpgradeInstructionsMaintSmart41
00ForAccess.pdf
1
What is MaintSmart Enterprise Edition?

All of the features of previous MaintSmart versions

Version 4.1 supports MS SQL Server 2005-2008, 2008 R2 databases and MS Access 97 databases
(NOTE: Access is not needed to use MaintSmart nor does MaintSmart Access drivers interfere with
existing installs of Access. Version 97 drivers are used because they are 13X faster than newer Access
version and more robust and reliable.)
Typical Resource Consumption
Hard drive space requirements
Depend upon previously installed components
but range from 292-675 MB.
CPU usage
4%-7% at idle
20%-37% loading a screen
53%-55% loading first report (Crystal Reports)
64% loading “Hot Sheet” with all options
Memory usage
34188K open to home screen
50000K open one screen
73000K open 2 screens
98000K opening report components
110000K + multiple screens
System Requirements
Client Workstation Requirements
Operating System
Windows: XP, 2003, 2008, Vista, Win 7, Win 8-8.1 (32bit/64 bit) on a
stand-alone computer. MaintSmart Software has not been certified or
tested to run in a Terminal Server or Citrix environment.
RAM Memory
Minimum 2 GB RAM memory. 4+ GB of RAM or greater is recommended.
Processor
Minimum 1.5 GHz processor , 2+GHz. or better is recommended. Single or
dual processors.
Disk Space
Minimum 475-610 MB of free disk space for standalone. Minimum 475 MB
of free disk space for client workstation and 500 MB (version 4.1) for
server when using on a network.
Display
Minimum 15 inch monitor using 800x600 resolution. Program windows
resize automatically for various resolutions and monitor sizes above the
minimums. 1024x768 resolution is recommended.
Drive
CD-ROM drive for installation.
Mouse
A minimum two-button mouse is required.
2
Server Requirements (MS Access)
Operating System
Windows: XP, 2003, Vista, 2008, Win 7, Win 8-8.1 (32 bit/64 bit)
RAM Memory
Minimum 2 GB RAM memory. 4+GB of RAM or greater is recommended.
Processor
Minimum 1.5 GHz processor , 2+ GHz. or better is recommended. Single
or dual processors.
Disk Space
Minimum 100-500MB of free disk space for database.
Display
Minimum 15 inch monitor using 800x600 resolution. Program windows
resize automatically for various resolutions and monitor sizes above the
minimums. 1024x768 resolution is recommended.
Drive
CD-ROM drive for installation.
Server Requirements (MS SQL Server)
Please visit the Microsoft web site for SQL Server requirements:
http://msdn.microsoft.com/en-us/library/ms143506.aspx
For Microsoft system requirements for SQL Server 2000-2008 R2 Microsoft Corporation Support should be consulted
with. A general summery is presented here (however the below requirements are not representative of all system
requirements and all versions of SQL Server
Operating System
Windows: XP, 2003, Vista, 2008, Win 7, Win 8-8.1 (32 bit/64 bit)
RAM Memory
Minimum 2GB RAM memory. 4 GB of RAM or greater is recommended.
Processor
Minimum 1 GHz MHz Intel Pentium , 1.4GHz. or better is recommended.
Single or dual processors.
Disk Space
Minimum 270-500 MB of free disk space for standalone. Minimum 125 MB
of free disk space for client workstation and 100 MB (version 4.1) for
server when using on a network. Optimally fast.
Display
Minimum 15 inch monitor using 800x600 resolution. Program windows
resize automatically for various resolutions and monitor sizes above the
minimums. 1024x768 resolution is recommended.
Drive
CD-ROM drive for installation.
General Description of the Upgrade Procedure
In most cases MaintSmart major upgrades consist of an upgraded program and an upgraded database
file that match the new program features. This installation requires that both of these items are
upgraded (i.e. program files and database file). Failure to perform both parts of the upgrade process will
result is the program not functioning properly. Fortunately this is a fairly simple and semi-automated
procedure.
NOTE: if you are using MaintSmart Enterprise AND the Access database option please use the upgrade
instructions: Upgrading MaintSmart (when using the Access database option) or download these
instructions from our web site:
3
http://www.maintsmart.com/Support/UpgradeInstructionsMaintSmart400ForAccessDB.pdf
This upgrade procedure should only be performed by an experienced IT person and/or
database administrator with Admin access rights. Please read all of these instructions before
beginning this upgrade process. If you have any other question call 1-888-398-0450 (1-541751-0450).
Overview of MaintSmart Enterprise Upgrade Procedure:
1. Back up your existing MaintSmart Enterprise database (SQL Server database). This is a critical step.
2. Uninstall MaintSmart using Windows Add/Remove Programs..
3. Install the new MaintSmart program from either the CD or the download:
http://www.maintsmartftp.com/setup.exe 222 (+/-) MB
3.1. Customer’s DB Admin performs the database upgrade: Create a new (temporary) SQL
database to convert data from 4.0 to 4.1. Import data directly from 4.0 SQL database (using the
MaintSmart Data Import Utility) into new temporary 4.1 SQL database. Restore the temporary
4.1 database over your existing 4.0 database. By doing so the database main production name
doesn’t change and therefore all workstations that are upgraded to MaintSmart 4.1 will NOT need
to be re-pointed to a new database name. This is the fastest and preferred method especially
when there are multiple workstations (clients) that are updated. This method is detailed
beginning on page 11.
3.2. Customer’s DB Admin performs the database upgrade: Create a new SQL database with a
different name than the existing SQL database. Run the included scripts to populate the new
database with tables, views and stored procedures. Import data directly from old SQL database
(using the MaintSmart Data Import Utility) into new SQL database. The drawback to this method
is that each client workstation that is running MaintSmart will need to be re-pointed to the
database with the new name. The following instructions may be adapted to this method by
leaving out the steps of restoring this temporary database back over the existing MaintSmart 4.0
production database.
3.3. MaintSmart performs the upgrade: Send a SQL Server back-up file (.bak, compressed) to
MaintSmart support along with version of SQL Server and database name. We will then import
the database over to the new 4.1 format, validate the data then send a compressed copy of the
database back-up file back to you. You will then extract the compress .bak file and use the
Restore function in SQL Server to overwrite the old database with this new one. This is
dependent upon MaintSmart Support having the same version of SQL Server as the customer.
NOTE: Data imports must be performed using the MaintSmart Data Import Utility included with
MaintSmart. Imports must be performed from the newest (upgraded version 4.1). Never use Microsoft’s
SQL Server data import utility.
4. Normally the 4.0 license for the MaintSmart software will carry over to MaintSmart 4.1 if not, submit
the system ID for the new computer and enter the license code that we send back. MaintSmart 4.1 is
now ready to use from all workstations linked to this database.
4
MaintSmart Enterprise Upgrade Procedure:
1. Back up your existing MaintSmart database (SQL Server database) to a secure location.
Use SQL Server Enterprise Manager to back-up your existing MaintSmart Enterprise SQL Server
database. This is a critical step.
2. Use Windows “Add/Remove Programs” to uninstall MaintSmart Enterprise 4.0.
3. Install the new MaintSmart 4.1 program from either the CD or the download
http://www.maintsmartftp.com/setup.exe . By default the software must be installed on each
workstation from which it will be used. Alternatively, a Citrix or Terminal server license may be
obtained for installation and licensing in those environments. Run the setup program from the CD
or downloaded installation package. The installer file name is “setup.exe”. Double left mouseclick this file to start the installer. Accept the “Complete” install option.
The "Complete" option will install all program and database files onto your computer. The database
creation scripts needed to create the SQL Server database (4.1) will be copied along with all other
installed files and are located at: “C:\Program Files (x86)\MaintSmart Software\MaintSmart Enterprise
4.1\DatabaseScripts\”. You will still need to create the database as the installer only installs the needed
files and does not create the database automatically.
IMPORTANT: The MaintSmart installer is a four (4) part installer. Use the “Complete” install option for all
parts except for the MaintSmart_Prerequisite in the case of reinstalls or upgrades. In this case, you must
use the “Repair” option if it is available. If not available the use “Complete”.
Enter the installer password: ‘effective’ w/o quotes.
5
Begin Installation Process
DEPENDING UPON YOUR PARTICULAR HARDWARE AND OPERATING SYSTEM CONFIGURATION
SOME OF THE SCREENS IN THE INSTRUCTIONS BELOW MAY NOT BE DISPLAYED. THIS DOES
NOT AFFECT THE INSTALLATION OF MAINTSMART.
The MaintSmart_Prerequisite MUST BE INSTALLED FOR ANY WINDOWS OPERATING SYSTEM (XP, VISTA,
2003, 2008, WIN 7 or WIN 8-8.1 and will install the support components needed by the Crystal Reports
component included with MaintSmart. In some cases, you may need to temporarily disable your virus
software so that this .exe file may successfully install these components. If upgrading MaintSmart 4.1
from an earlier version choose “Repair” if offered this option. Failure to do so will cause the installation to
fail.
Click “Install” for installing MaintSmart_Prerequisite
If offered “Repair” for the MaintSmart Prerequisite then choose this option.
6
Begin installation of main MaintSmart Enterprise Software.
Agree to license.
7
Choose install location (optional)
Click “Install” button. MaintSmart software installation begins.
8
Installation completed.
NOTE: Using option 3.1 on page 4 of this document saves the step of reconnecting (re-pointing) to the
new database because MaintSmart 4.1 stores the database link information as an All USERS setting in an
XML file that is not uninstalled during the upgrade process. MaintSmart 4.1 will require reconnection (repointing) to the new database if database name is changed.
4. Create the new database for MaintSmart Enterprise 4.1 by running the new database
scripts against a new database. From SQL Server Enterprise Manager back-up your existing
MaintSmart SQL Server database if you haven’t already done so. Follow these steps to create the
new database format in your existing SQL Server database for temporary storage of imported
data. Example: “MaintSmart41Temp”
This step requires a database administrator or someone that understands SQL Server.
i.
ii.
Open SQL Server Enterprise Manager
Create a new SQL Server database.
9
It will be necessary to install the MaintSmart 4.1 application on a workstation (Complete install selection)
to get the script (.sql) files. These script files are located at: “C:\Program Files (x86)\MaintSmart
Software\MaintSmart Enterprise 4.1\DatabaseScripts\”. Alternatively you may request the script files
separately from support@maintsmart.com .
iii. Run the following six (6) scripts against the new database (“MaintSmart41Temp”) in the SQL Server
Enterprise Manager from the MaintSmart setup package in the order listed below:
1) Tables.sql
2) UserDefinedFunctions.sql
3) Views.sql
4) StoredProcs.sql
5) Load.sql
6) Translator.sql
NOTE: DO NOT run the SQL script: LoadForNoImport.sql as this is for new users not upgrade users.
iv. Each script must run without errors (NOTE: Tables.sql may generate field length errors. This is
expected and will not affect the installation.)
Location of SQL script files when using
a default install location. DO NOT run the
SQL script: LoadForNoImport.sql.
5. Import data from MaintSmart 4.0 (old) database to MaintSmart 4.1 (new) database.
Begin by opening the MaintSmart Enterprise 4.1 program from: “Start>>Programs>>MaintSmart
Enterprise>> MaintSmart Enterprise” menu.
MaintSmart will recognize the mismatch between program (MaintSmart 4.1) and database
(MaintSmart 4.0). Import existing data from MaintSmart 4.0 (old version) database into newly
created SQL Server database using MaintSmart’s import utility.
Follow the pictures and text below to guide you through the database import process.
10
****************Begin - Database Connection Dialog Instructions *****************
After steps 1-3 (depicted below) have been completed the message box should indicate “Connection
Succeeded”. If you receive an error message here check the server name, database name and the
permissions on the SQL Server database. In all cases it will be one of these issues (99% of the time it
is inadequate permissions on the SQL Server database)
11
****************End - Database Connection Dialog Instructions *******************
Progress of import is displayed. Normally slows at end due to PM archive data import.
12
Import completes. Depending upon size of the database this could take from seconds to hours. If your
SQL Server database (.mdf file) is over 1 GB it is best to consult with MaintSmart support. We have
ways of importing very quickly in our shop and then returning a back-up file (.bak) to you. This is a
free service for supported users but requires 48 hours minimum notice.
Check your progress.
1.) MaintSmart 4.0 uninstalled.
2.) MaintSmart 4.1 installed.
3.) The “MaintSmart41Temp” database created, scripted and populated with data from MaintSmart 4.0.
6. Now that the MaintSmart 4.0 data has been successfully imported into the temporary MaintSmart
4.1 database (“MaintSmart41Temp”) you may re-point all workstations that are running
MaintSmart 4.1 to this new database by using the Database Connection Dialog Instructions
(option 3.2 page 4) as described above OR a better option (option 3.1 page 4) is to simply restore
the “MaintSmart41Temp” database back to your original MaintSmart (4.0) database. By accepting
this option you do not have to re-point all the MaintSmart workstations because this action
overwrites the old 4.0 database with the new 4.1 database schema and imported data. Let’s look
at this option first (a.) below.
a) BEST OPTION: This procedure must be performed by the Database Administrator. Open SQL
Server Enterprise Manager then select the MaintSmart 4.1 database that was populated with data
in an earlier step (MaintSmart41Temp”). Right-click the database then choose menus
“Tasks>>Back-Up…” from the pop-up menu. Take note of where this back-up file
(“MaintSmart41Temp.bak”) is saved on your system as it will be needed in the next step. After
back-up completes select the old MaintSmart 4.0 database that the MaintSmart program is still
13
pointed to. Right-click the database then choose menus “Tasks>>Restore>>Database..”. Restore
from Device by choosing the appropriate radio button then navigating to the
“MaintSmart41Temp.bak” back-up file. Mark this database for restore and choose restore option:
“Overwrite the Existing Database”. Press the OK button and restore the MaintSmart 4.1 database
back-up over your old database (MaintSmart 4.0). You may now start the new MaintSmart
program and begin using MaintSmart 4.1.
NOTE: Troubleshooting the restore process see page 16
b) The database connection is accessed from the Program Configuration screen>>Configuration
screen tab>>”Database Connection” button. See Database Connection Dialog Instructions on
page 13. Alternatively when MaintSmart 4.1 is re-started the Database Mismatch screen appears
you may choose “Point MaintSmart to the New Database Format”. This will cause the Database
Connection dialog screen to appear providing the opportunity to connect to the
“MaintSmart41Temp” database. See pictures below.
After the import completes MaintSmart Enterprise 4.1 is ready to use from all workstations.
Troubleshooting the Database Restore Process
Restoring a back-up set from one database back-up to a completely different database may cause an
error to occur: The file “C:\SQL Directory\DATA\A.mdf' cannot be overwritten. It is being used by
database 'A'.”
1. Choose the database to restore to as described above. When the Restore screen appears choose
items as depicted below.
14
Next page to complete this solution.
15
2. From Options tab
Setting SQL Server database access
permissions is the role of the DB Administrator.
MaintSmart Support engineers are not experts
in SQL server security however the below
setting generally work. Windows
Authentication may also be used. Ultimately
SQL Server security is the responsibility of the
DB Administrator.
Create a SQL Server User Login to use for connecting to the database
16
If you want MaintSmart to log into SQL Server using Windows Integrated Security and have it use the
database owner permissions you can skip this section.
Now, there are two steps necessary to allow a connection to the database to be made if you will not be
using Windows Integrated Security. That is, if you will be logging into SQL Server with a user ID and
password.
1. Create the Login and assign a password
2. Give the correct permissions to the Login
Create the Login and assign a password
In the SQL Server Enterprise Manager tree-view right-click on Security/Logins and select "New Login...".
Enter the login name, password, and set the default database to the MaintSmart database you created to
be.
Give the correct permissions to the Login
Give the Login the db_datareader and
db_datawriter roles in the MaintSmart database.
17
You will also need to:
either give the Login the db_owner role
or else
execute the stored procedure admGrantExecute in
the MaintSmart database. This can be done in the
SQL Server Query Analyzer by executing the
following statement:
exec admGrantExecute <login name>
Be sure to fill in the login name you created in
place of "<login name>".
MaintSmart Support:
Phone: +1-541-751-0450
Toll-Free USA/Canada: +1-888-398-0450
Skype: “maintsmart”
support@maintsmart.com
http://www.maintsmart.com/Support.htm
18