Move archived LAP Files
From time to time the number of LAP files located in the root Q:\LAP\ folder increases to a point where LapMgr slows down or may crash when adding new files. In order to avoid this, we move a years worth of files to a subfolder with Q:\LAP.
Section 1
This section is to be performed by Dan or Windstar
Inform all LAP users (or MSERV Mgmt) to log out of LAP (its best to schedule this for off hours if possible)
You may perform all tasks listed without users logging out, but this prevents unnecessary tickets about files not found while they are being moved, and users will need to exit the MA application they are in, if one of their files is corrected as the file reference is only updated when you access the application or click the refresh button.
Log onto the DataPath server and access the LAP StoredFiles directory
Create a new folder with the year you will be moving.
As of 4/11/2022, the next set of files to move will be for the 2021 year
Copy the files from the main folder into the newly created “year” folder
Provide the individual(s) completing section 2 with the folder name
It is HEAVILY advised to perform the steps above while logged on the server and not through an Explorer connection from your local PC.
Section 2
This section can be run by the development team, Dan or Windstar
Using SSMS connect to the Datapath server (192.168.100.160)
Update the “@Year” variable at the top of the following script and run it to verify there are files to move
If there are no files to move, STOP and check the value you entered for the @Year variable and try again
DECLARE @Year INT = 0 DECLARE @Continue INT = 0 IF (@Continue = 0) BEGIN SELECT * FROM tblLAPStoredFile WHERE YEAR(DateStored) = @Year END IF (@Continue = 1) BEGIN DECLARE @NewPath VARCHAR(25) = FORMATMESSAGE('Q:\LAP\%d\',@Year) UPDATE tblLAPStoredFile SET [Path] = @NewPath WHERE YEAR(DateStored) = @Year PRINT FORMATMESSAGE('All stored files for the year %d have been moved to the %s folder.',@Year,@NewPath) END
Update the script you just ran by setting the @Continue variable to 1 and run the script again.
If the MSERV team was advised to logout, let them know to log in.