Tech Note 921 - Optimizing SQL Server For Large Galaxy Migration
Tech Note 921 - Optimizing SQL Server For Large Galaxy Migration
All Tech Notes, Tech Alerts and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.
Topic#: 002735
Created: February 2013
Introduction
This Tech Note provides tips and configuration recommendations to migrate a large Galaxy in the context of ArchestrA System Platform
2012 (ASP 2012). The information is intended to mitigate potential problems, such as using the default SQL Server settings for the
migration.
For example, you might see the following logger errors when migrating a large Galaxy:
WWCdi Error 80040E14: Description 'Warning: The join order has been enforced because a local join hint is used'
Error 80040E2F: Description 'Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object'
Application Versions
ArchestrA System Platform 2012 and later (Application Server version 3.5 and later)
Important! Before making any configuration changes, be sure you have backed up your Galaxy, Log (SMC Log) and Registry files.
Optimization Tasks
The following tasks are recommended to ensure your migration is successful:
Note: The content in this Tech Note was included as general guidelines in the Application Server Readme.html as a workaround
procedure for handling unexpected and misleading errors that appear in the logger while migrating large Galaxies. In that scenario, the
transaction log for the Galaxy database reached its maximum allocated size.
Scan windows events (in the Event Viewer) for evidence that the transaction log is in fact full.
If you confirm that the transaction log has exceeded the size restrictions, do the following to remove the restriction:
1. In the SQL Server Management Studio, right click the Galaxy database, then click Properties.
2. In the Database Properties dialog box, locate Log ... in the File Type column, then click the Ellipsis (...) button in the
Autogrowth column.
3. In the Change Autogrowth for Base_Application_Server_log dialog box, click the Unrestricted File Growth option under the
Maximum File Size parameter.
4. Click OK.
5. Complete the Galaxy migration, then repeat these steps to reinstate a file size ceiling on the transaction log.
If this is not possible, ensure the Anti-virus software is enabled as described in the ASP2012 Readme file.
• Ensure the Exclusion list includes the Windows Temp files. The following instructions show how to configure the exclusions in McAfee
VirusScan:
1. Using McAfee, open the VirusScan Console and click Task/On-Access Scanner Properties/All Processes.
3. Click Add.
Wonderware Technical Support recommends setting a smaller maximum memory value for SQL Server. Application Server should
have a configured SQL Server memory setting of approximately 65% of the current physical RAM.
For example, if the current hardware configuration is a 16-core machine with 48 GB RAM, the SQL Server maximum memory would
be 32768 MB (65% of the 48 GB).
Verify the configuration of the database files by clicking the Master DB and clicking Properties, then Files.
Change the initial file size to 100 MB for both the database and the transaction logs.
file:///C|/inetpub/wwwroot/t002735/t002735.htm[6/18/2013 10:49:51 AM]
Optimizing SQL Server for Large Galaxy Migration
For example if you have a database that is 50MB original size, enabling the file growth by 10% grows the database file by
increments of 5MB each time. At 400MB, you then have the database file partitioned many times. When you enable the database
growth by size, your database file is partitioned only 4 times.
USE MASTER
GO
ALTER DATABASE TEMPDB
MODIFY FILE (NAME = tempdev, FILENAME = 'D:TempDBtempdb.mdf')
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = 'D:TempDBtemplog.ldf')
GO
Configure the initial size to 500MB for both MDF and LDF.
(Optionally) Configure the growth to 500MB for both MDF and LDF. This helps reduce fragmentation.
We do not recommend changing this value unless a big operation is going to occur, such as importing thousands of objects or migrating
your Galaxy. Reset the rate to the original value when those operations are finished. This ensures the correct States will be displayed in
the Galaxy Tree View when you perform future operations.
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ArchestrA\Framework]
"ProxyPollingRate"=dword:000001f4 (500)
1. From SQL Server Management Studio, right-click your Galaxy DB and click Properties.
2. Click Files, then click on the Log database file to change the restrictions.
Use Perfmon Alerts to monitor the database size and the Transaction log. If either reaches a certain threshold, you can send an
"alert" email.
To Re-adjust your DB
You can choose to just shrink the transaction log file individually by right-clicking the Galaxy DB, and clicking Tasks/Shrink/Files.
References
Monitoring Log File Growth using PerfMon
http://sqlserverpedia.com/blog/sql-server-bloggers/monitoring-log-file-growth-using-perfmon/
http://bradcorbin.net/2009/09/monitoring-log-file-growth-using-perfmon/
http://www.sqlteam.com/article/integrating-profiler-and-perfmon-log-files
Note: After the Galaxy migration is finished, follow the same procedure to reestablish a ceiling on the transaction log. In other words,
reset it to what it was before the migration was initiated.
M. AbouELsoud
Tech Notes are published occasionally by Wonderware Technical Support. Publisher: Invensys Systems, Inc., 26561 Rancho Parkway South, Lake Forest, CA 92630. There is also
technical information on our software products at Wonderware Technical Support.
Back to top
©2013 Invensys Systems, Inc. All rights reserved. No part of the material protected by this copyright may be reproduced or utilized in any form or by any means, electronic or
mechanical, including photocopying, recording, broadcasting, or by anyinformation storage and retrieval system, without permission in writing from Invensys Systems, Inc.
Terms of Use.