Documentation for ProTrack Warehouse 2014.1.
The following migration process is to be completed by a database admin (DBA).
The Move_LocationData_sp makes it easy to move XYZ data from one database to another while maintaining the integrity of the data. This functionality allows the user to configure the XYZs for new facilities or make changes to the configuration of existing facilities on a test environment separate from the production environment. This practice provides the security that any unintentional changes will not have a negative effect on the production standard calculations. Additionally, the XYZ data transfer ensures that ProTrack Warehouse does not process incorrectly any of the production data resulting from importing XYZ data while simultaneously importing WMS data.
Warning
DISCLAIMER: Transferring of XYZ components, travel history, and node data should be done by someone that has knowledge of the system as well as SQL server.
There are two separate stored procedures that may be run to transfer data from a Test Environment to a Production system. The first (Move_LocationData_sp) is used to move the actual XYZ component data. The second only moves the two caches. Depending on the maintenance scenario, it may only be necessary to move the cache.
The Move_LocationData_sp copies all XYZ component data from one database to another. The stored procedure moves data from the following tables:
The Move_Cache_sp is used to move just the cache tables from one database to another:
TravelPathHistoryDetail
Info
All modifications are done in one direction reading from a database that is designated as “Source” and updating the database designated “Destination”. Any errors while executing this request will result in a full rollback of the data.
Click on the Scheduled Task sub-tab.
Fig.1 System Configuration
Select all of the check boxes.
Fig.2 System Configuration - Disable System
Temporarily disable constraints by running the following statement.
EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all"
Delete from level Delete from location Delete from segment Delete from aisle_path_node Delete from travel_path_node Delete from node Delete from aisle_path Delete from travel_path Delete from TravelPathHistoryDetail Delete from TravelPathHistory Delete from NodeCache
Run the following query:
exec dbo.Move_LocationData_sp @SourceDB = 'Insert Source DB Name Here', @DestDB = 'Insert Destination DB Name Here', @SourceServer = 'Insert Source Server Name or IP address Here', @DestServer = 'Insert Destination Server Name or IP address Here', @LinkedUserName = 'protrack', @LinkedUserPwd = 'protrack', @Debug = 0
Wait for the query to result as complete.
Next, open a new Query connected to the destination database and run the stored procedure that will connect the nodes of a floor.
exec PopulateConnectedNodes_sp
Enable the constraints by running the following statement.
EXEC sp_msforeachtable @command1="print '?'", @command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"
Delete all cache data in the destination database by opening a new query (pointed at the destination database) and run the following statements, one-by-one from top to bottom:
Delete from TravelPathHistoryDetail Delete from TravelPathHistory Delete from NodeCache
Run the following query:
DECLARE @return_value int EXEC @return_value = [dbo].[Move_Cache_sp] @SourceDB = N'Insert Source DB Name Here', @DestDB = N'Insert Destination DB Name Here', @SourceServer = NULL, @DestServer = N'Insert Destination Server Name or IP address Here', @Action = N'INSERT' SELECT 'Return Value' = @return_value GO