Database configuration and maintenance. Sage 2015
Advertentie
Advertentie
3 | Deploying Sage 200 across a network
Database configuration and maintenance
Once you have sized your system, you can start looking at optimising access to the database to ensure maximum performance. For smaller databases this is not so essential but as the database increases in size, especially once it starts getting over 4GB, real performance improvements can be obtained by having appropriate database configuration and maintenance plans in place.
Setting up a Database Maintenance Plan
We strongly recommended that you set up a database maintenance plan as part of your Sage 200 deployment. You should include both the Sage 200 and CRM databases in the maintenance plan.
For detailed information on setting up the tasks and plan for SQL Server please refer to the manufacturer’s web site but we recommend the following:
To set up a new database maintenance plan for Microsoft SQL Server
1. Open Microsoft SQL Server Management Studio and connect to the instance of SQL that hosts your Sage 200 and CRM databases.
2. Right click
Management > Maintenance Plans
and select
Maintenance Plan Wizard
.
3. Follow the steps in the wizard until all the tasks have been defined. We recommend that you include the following: n
Check Database Integrity
– We recommend that you run this nightly for both the
Sage 200 and CRM databases.
n
Shrink Database
– Avoid this option for large or rapidly growing databases. see the following section on
for further advice on database size.
n
Reorganize Index
– We recommend that you run this nightly for both Sage 200 and
CRM databases.
n
Rebuild Index
– We recommend that you run this weekly for both Sage 200 and
CRM databases.
n
Update Statistics
– We recommend that you run this nightly for both Sage 200 and
CRM databases.
You should only run maintenance plans ‘out of hours’ when no users are on the system. We recommend that you run the plan once initially to ensure the plan completes successfully and then schedule the tasks to run automatically overnight.
Before any maintenance tasks can be run, check that the SQL Server Agent is running.
Disk Management
If you have a large Sage 200 Suite deployment, the databases for Sage 200 and Sage 200 CRM can grow rapidly as large numbers of transactions are recorded. Rather than letting SQL Server adjust the size of your database as it grows, we recommend that you pre-empt this growth manually by
41
Sage 200 On Premise disabling the
Auto Shrink
and
Auto Grow
options within SQL Management Studio and manually padding the database to accommodate future growth.
To Disable Auto Shrink
1. Open Microsoft SQL Server Management Studio and connect to the instance of SQL that hosts your Sage 200 and CRM databases.
2. Right click
Databases > <
Sage 200 database name>
, and select
Properties
.
3. Choose the
Options
page.
4. Set
Auto Shrink
to
False
.
5. Repeat for your Sage 200 CRM database.
To manually grow your database
1. Open Microsoft SQL Server Management Studio and connect to the instance of SQL that hosts your Sage 200 ERP and CRM databases.
2. Right click
Databases > <
Sage 200 database name>
, and select
Properties
.
3. Choose the
Files
page.
4. For both the MDF and LDF files, click the browse button in the
Autogrowth
column.
5. Set the
File Growth > In Megabytes
value to an amount of disk space that will allow for plenty of growth.
For example, if your current database is 2GB, you could set this value to 6GB. Increasing this value does not increase the size of your SQL backups.
6. Repeat for your Sage 200 CRM database.
Other Disk Management Tips
n
Separating the operating system and database onto their own separate drives is best practice for large databases to make sure that Windows and system disk don't compete with SQL IO requests.
n
Make sure that the space you’re allocating to the MDF/LDF files is largely contiguous and kept defragmented.
n
The Sage 200 database must remain synchronisied with the Sage 200 CRM and Sage 200 BI warehouse and analysis services databases.
Make sure you backup or restore Sage 200 CRM and the Sage 200 BI warehouse and analysis services databases at the same time as your Sage 200 database.
Database management for Sage 200 Business Intelligence
For Sage 200 BI, if you need to recover to a specific point in time (i.e. just before the disaster happened) and wish to avoid hard disk space issues, we recommend that you:
1. Set up a disaster recovery model.
2. Reduce the size of the log file.
42
3 | Deploying Sage 200 across a network
This is because the data warehouse’s database log file grows when the data warehouse is upgraded and cubes refreshed using the Sage200 BI Admin tool. This growth is usually proportional to the number of record updates performed on the data warehouse.
If you have a relatively large Sage 200 database, the data warehouse’s log file will grow significantly every time the data warehouse is updated.This can lead to disk space problems on the database server fairly quickly for large datasets, and over a longer period of time for smaller datasets.
However the log file contains information about all the changes made to the data warehouse required for the database administrator to perform any required disaster recovery procedures.
Set up a disaster recovery mode
The disaster recovery mode that you choose for the data warehouse database depends on how you use BI.
When 'As At' cubes are updated, data is pulled down from Sage 200 to provide a typical snap shot of your data for a specific point in time. The recovery mode that you choose depends on whether you need to recover your data this specific point in time or whether the accuracy of the as 'as at' data is not crucial, i.e. the snap shot is out by one day.
You can choose one of the following modes: n
Full - choose this to recover data to a specific point in time.
This uses full, differential and transaction log backups to provide the best protection against failure. It allows the database to be restored to the point of failure or to a specific point in time.
n
Simple - choose this if the accuracy of the “as at” status of the BI reports is of low importance.
This recovers data to the most recent successful full database or differential backup. The underlying transaction logs are truncated each time a checkpoint is issued for the database.
This mode restricts the database log file growth.
To set the data recovery mode
1. Open Microsoft SQL Server Management Studio and connect to the instance of SQL that hosts the Sage 200 BI databases.
2. Right click
Databases > (data warehouse database name)
, and select
Properties
.
3. Choose the
Options
page.
4. Select the required
Recovery model
.
Reduce the database size
1. Set the data warehouse database to “restricted user” mode.
This prevents new connections being made to the database for users who do not have appropriate roles assigned.
43
Sage 200 On Premise
This will be blocked until users are already connected to the database have close their connection. This ensures that no transactions are rolled back unexpectedly (i.e. a user in the middle of updating the warehouse).
Follow the steps below or run the following SQL script:
[ALTER DATABASE database-name SET RESTRICTED_USER]
.
a. Open Microsoft SQL Server Management Studio and connect to the instance of SQL that hosts the Sage 200 BI databases.
b. Right click
Databases >
<data warehouse database name>
)
, and select
Properties
.
c. Choose the
Options
page.
d. In the
Other options > State
section, set
Restrict Access
to
RESTRICTED_
USER
.
2. Backup the transaction log and database.
a. Right -click the data warehouse database and select
Tasks > Backup
b. Make a
Full
backup if you don't already have one, otherwise skip to the next step.
c. Run the SQL command [checkpoint] against the data warehouse database. This flushes the contents of the transaction log into the main database files.
d. Make a
Transaction Log
backup. Make sure that
Truncate the transaction log
is selected on the
Options
page. This is only be available if your database is in
Full
Recovery
or
Bulk Logged
mode.
e. Make a
Full
backup of the database.
3. Shrink the database.
a. Right -click the data warehouse and select
Tasks > Shrink > Database
.
b. Verify that the database log file is now reduced in size.
4. Remove the
Restricted user
set in step 1 by either reversing the steps or by running the following SQL script:
[ALTER DATABASE DATABASE-NAME SET MULTI_
USER]
.
44
4
Installing Sage 200
Sage 200 uses a single installer to install all modules apart from Sage 200 CRM. When you run the Sage
200 installer, you can choose which modules of Sage 200 you install.
Before beginning the installation procedure, please refer to the section
Deploying Sage 200 across a network on page 17
to make sure that you know where you want to install each component.
To install Sage 200 CRM, use the Sage 200 CRM installer. This can be found in the CRM folder on your
Sage 200 DVD. For instructions on installing and setting up Sage 200 CRM, see
.
Key facts about the installer
1. You use the installer to install the various components of Sage 200 on your server and on your client machines. Use the installation wizard to select the relevant server components and client components.
The following table shows which components of the additional modules are installed when the Sage
200 components are selected.
Sage 200 components selected: Additional components installed, if selected:
Sage 200 Server Sage 200 Business Intelligence Server
Sage 200 Manufacturing Server
Sage 200 Client Sage 200 Business Intelligence Client
Sage 200 Manufacturing Client
45
Sage 200 On Premise
2. Where possible, the Sage 200 installer checks to make sure you have the correct prerequisites installed. When this is not the case, an error message is displayed. You must install the required components and run the installer again.
See
.
3. The Financials, Commercials, Project Accounting, Bill of Materials,and Self Service modules are always installed. They are activated by your licence key.
4. The Sage 200 Client must be installed on the same machine as the Sage 200 Server.
Therefore, the
Sage 200 Client
is selected by default when choosing to install
Sage 200
Server
.
5. You can choose whether to install Sage 200 Business Intelligence and Sage 200
Manufacturing, however you must install both the sever and client elements on your server.
You don't have to install BI and Manufacturing on all client machines.
6. If you are installing Sage 200 Manufacturing on a PC which has Sage 50 Manufacturing installed, uninstall Sage 50 Manufacturing before installing Sage 200 Manufacturing.
7. To install Sage 200 Self Service on separate external facing web server, use the Self Service standalone installer. This can be found on the Sage 200 DVD.
See
Install Sage 200 Self Service on an external facing web server on page 58
.
Steps to install Sage 200 On Premise
1.
Create Windows user accounts and groups on page 47 .
2.
Install Sage 200 on your server on page 50
.
3.
Install Sage 200 on your client machines on page 53
46
Downloaden
Advertentie