Authority - LIVE to TEST Copy
Authority LIVE to TEST copy
Log on to the application COBAUTHSQLTEST server (through VSphere) as the AuthTech user.
Launch Web Console

Open Files Explorer

F:/SQLBACKUP

Log on to the application COBAUTHSQL server (through vSphere) as the AuthTech user.

Open File Explorer

F:/SQLBAKUP/live/authlive
1 weeks' worth of backups are stored here.
Select the most recent file (in this case from 12-May-2024)
Copy

Open another File Explorer
Enter path \\cobauthsqltest\f$

Navigate to SQLBACKUP à DB Restores 2024
Paste the file here.
You need to repeat the file copy for both the Auth Live and the AWP live backup files.
Go back to F:/SQLBAKUP/live/authlive
Copy the latest awp file.
Go back to \\cobauthsqltest\f$
Navigate to SQLBACKUP à DB Restores 2024
Paste awp file.


You can now Close Server COBAUTHSQL (Live)

Launch from VSphere COBAUTHAPPTEST and COBAUTHAPITEST à Launch Web Console
Log in to both as AuthTech
We want to stop these environments.

COBAUTHAPPTEST
From Desktop open AuthEnvCmd - Select Yes on Pop up
Select the environment (1 [Enter] for Test)
To stop the service, enter the command wasservice -stop test [Enter].

Open Services and check that the TEST server is not 'Running’.

IBM WebSphere Application Server – test

Open the COBAUTHAPITEST server.
Open IIS

Dropdown COBAUTHAPITEST - Select Application Pools
Stop the 4 Test pools, one at a time.


Open Services
Stop Civica Authority Task Service (Test)
Civica Authority Task Service (Instance:test)

Open the COBAUTHSQLTEST server (web tab).
Open Microsoft SQL Server Management Studio within the server.

Authentication: Window Authentication
Select Connect

To check if the environment has stopped, and there is no activity - Right Mouse Click on the server (in this case) cobauthsqltest - select Activity Monitor - then expand Processes - drop down Database and select authtest

The three databases to update are authtest, awptest, and bitest
Right mouse click on the database (authtest) - (menu pops up) à Tasks à Restore à Database

Change the Source to Device then select the box with the 3 dots.
On Pop up - Backup media type should be set to File then click Add.

Use the File locations to drill to where you copied the file in the F:\ - In this case F:\SQLBACKUP\DB Restores 2024
Then select the authlive file that was previously copied. In this case from 2024_05_12 à OK

On Pop Up - OK to confirm the file.

General tab

Files tab

Options tab
Tick both;
þ Overwrite the existing database.
þ Preserve the replication settings.

OK - the restore process begins.

If an error pops up about not having exclusive use of the database - the go back to the activity monitor…
Once complete - you will receive a successful pop up

Repeat the same restore procedure for the awptest and bitest databases, following the same steps used for authtest.
Right mouse click on the database – awptest - (menu pops up) à Tasks à Restore à Database

Right mouse click on the database – bitest- (menu pops up) à Tasks à Restore à Database
Change the Source to Device then select the box with the 3 dots
On Pop up - Backup media type should be set to File then click Add
Use the File locations to drill to where you copied the file in the F:\ - In this case F:\SQLBACKUP\DB Restores 2024
Then select the authlive file that was previously copied. In this case from 2024_05_12
This time select the awplive file à OK. On Pop Up - OK to confirm the file.
View the General and Files Menus to confirm all is as it should be (see previous images)
Options menu - Tick both;
þ Overwrite the existing database.
þ Preserve the replication settings.
OK - the restore process begins. Once complete, you will receive a successful message à OK
Run Script - to apply Live to Test.
Scripts are kept on the desktop on of the SQL server
Open SQL in TEST (COBAUTHSQLTEST)
In SQL Server Management Studio - highlight authtest - File - Open - File

Select file from Desktop - live-to-test.sql à Open
If it’s a TRAIN or DEMO environment, select the appropriate script from the folder, based on the environment type (refer to the second screenshot for guidance)."
TEST

TRAIN or DEMO:

Script Opens - Review databases to ensure correct.
NOTE: this script should not be edited without instruction from CIVICA
Execute

Script runs - there are known errors that will appear.

Close the script.

You can Shrink the LOG files to free up space on the server in file explorer- suggested size is approx. 100MG –
Matt's video has these instructions at the 42 min mark.
Open the web tab for server COBAUTHAPPTEST
Sign in as AuthTech
DOS screen should be open - if not select from desktop

Run the command stamp_dbs [Enter]
Run the command setalparm –ALL [Enter]
Finished updates.

Now we need to restart the environments.
Open web tab for server COBAUTHAPITEST
Open Services

Refresh - Select test - Start

Open IIS
Restart Application Pools


authority.app.test
authority.portal.test
Civica.Authority.Web.Api.test
test-authority

Select COBAUTHAPITEST - Right Mouse Click - select Refresh.
Go back to Application Pools to make sure they have all started.

Open web tab for server COBAUTHAPPTEST
Run command - wasservice -start test [Enter]
You can use the arrow up key to go through the command stack. When you get to the stop command you can replace with start
This can take about 5 minutes.
Type exit [Enter] when you get another command prompt
Once complete - you can open TEST and confirm that it is working..
Check the environment is up to date - do a CRM enquiry or Receipt enquiry to confirm data is up to date as required.
----------------------------------------------------------------------------------------------------------------------------------------------
If 404 page Errors occurred: Especially during LIVE to TEST copy (TEST, TRAIN and DEMO) - CIVICA Incident - C00066939
-> After I completed the LIVE to TEST & DEMO copy, a "404 page error" occurred. I tried all steps like Server restarts, Application pool restart, and IBM WebSphere restart, still the error is happening:

Why it's happened: The metadata for each non Live environment was pointing to Live. This was corrected by running setalparm -all and stamp_dbs in each environment to repoint the metadata. WebSphere was then restarted in each environment to apply the change. CIVICA recommended me: It may be worth adding these two commands to your live to test procedure.
In this situation, run below additional commands in the Server
setalparm -all
stamp_dbs

If anything is not fixed the issue, please log into CIVICA with the server log error and system out.