X3V12 Patch 12.0.32 PowerShell inclusion

3 minute read time.

With the inclusion of Powershell 7 from higher X3V12 Patch Levels it introduces Powershell modules which is required to communicate with the X3 Database Server in-order to populate the X3 Tables inside the Database.

This introduces in some cases some challenges, the compatibility of the SQLServer Module version installed inside Powershell is key to resolving this for Patch 12.0.32.

Where the below error is thrown, it is a result of an incompatible SQLServer Powershell Module that has to be created at a specific Level.

Inside the X3 Management Console you will receive the below error message:-

5/2/2023 3:41:36 PM : INFO  -

5/2/2023 3:41:36 PM : INFO  - ---------------------------------------------------------------------

5/2/2023 3:41:36 PM : INFO  - Sage Application setup 5/2/2023 3:41:36 PM

5/2/2023 3:41:36 PM : INFO  - ---------------------------------------------------------------------

5/2/2023 3:41:36 PM : INFO  - Starting application configuration

5/2/2023 3:41:36 PM : INFO  -

5/2/2023 3:41:36 PM : INFO  - *--- Sage Application setup ---*

5/2/2023 3:41:36 PM : INFO  - Application : reading adxinstalls on tcg-erp-app02.tcg.home...

5/2/2023 3:41:36 PM : INFO  - Information from adxinstalls.xml on application server retrieved.

5/2/2023 3:41:36 PM : INFO  - Ok

5/2/2023 3:41:36 PM : INFO  - Database : reading adxinstalls on tcg-erp-db02.tcg.home...

5/2/2023 3:41:36 PM : INFO  - Information from adxinstalls.xml on data server retrieved.

5/2/2023 3:41:36 PM : INFO  - Ok

5/2/2023 3:41:36 PM : INFO  - Information from adxinstalls.xml retrieved.

5/2/2023 3:41:36 PM : INFO  - Ok

5/2/2023 3:41:36 PM : INFO  - Main runtime : reading adxinstalls on tcg-erp-app02.tcg.home...

5/2/2023 3:41:36 PM : INFO  - Information from adxinstalls.xml on main runtime server retrieved.

5/2/2023 3:41:36 PM : INFO  - Ok

5/2/2023 3:41:36 PM : INFO  - Reading solution.xml on tcg-erp-app02.tcg.home...

5/2/2023 3:41:36 PM : INFO  - Information from solution.xml retrieved.

5/2/2023 3:41:36 PM : INFO  - Ok

5/2/2023 3:41:36 PM : INFO  - Starting configuration from Runtime TCGX3V12 (R090), tcg-erp-app02.tcg.home, WIN32

5/2/2023 3:41:36 PM : INFO  - File E:\Sage\TCGX3V12\folders\X3\X3APPLI.ini retrieved from tcg-erp-app02.tcg.home. (LibAdm.GenerationScriptsAppliNT)

5/2/2023 3:41:43 PM : INFO  - Database schema checked : user 'X3' and roles 'X3_ADX' not found (RunVerifSchemaBaseSqlServer)

5/2/2023 3:41:44 PM : INFO  - User for folder X3 will be created. (LibAdm.GenerationScriptsAppliNT)

5/2/2023 3:41:46 PM : INFO  - Directory E:\Sage\TCGX3V12\folders\X3\FIL initialized.

5/2/2023 3:41:49 PM : INFO  - Creation of tcgx3v12_CrUsr.bat done.

5/2/2023 3:41:49 PM : INFO  - Creation of _adxmainfil.bat.

5/2/2023 3:41:50 PM : INFO  - Tables list from FILPLAT in main folder created. (LibAdm.GenerationScriptsAppliNT)

5/2/2023 3:41:52 PM : INFO  - Tables list from FILPLATSYS in main folder created.

5/2/2023 3:41:56 PM : INFO  - Creation of _adxmainfil.bat done.

5/2/2023 3:41:59 PM : INFO  - File E:\Sage\TCGX3V12\folders\X3\X3APPLI.ini sent on application server tcg-erp-app02.tcg.home.

5/2/2023 3:41:59 PM : INFO  - File E:\Sage\TCGX3V12\folders\X3\FILPLAT\tcgx3v12_CrUsr.bat sent on application server tcg-erp-app02.tcg.home.

5/2/2023 3:41:59 PM : INFO  - Launching tcgx3v12_CrUsr.bat ... (LibAdm.RunCreateUserSQLMainNT)

5/2/2023 3:42:06 PM : WARN  -

5/2/2023 3:42:06 PM : ERROR - Error while executing tcgx3v12_CrUsr.bat : NOK. (LibAdm.RunCreateUserSQLMainNT)

_[31;1mWrite-Error: _[0mE:\Sage\TCGX3V12\runtime\ebin\common_modules\application-mgr-sql.ps1:341_[0m

_[31;1m_[0m_[36;1mLine |_[0m

_[31;1m_[0m_[36;1m_[36;1m 341 | _[0m     _[36;1mAdd-To-Log -line $error_line -file $($env_params.log_name) -error_[0m …_[0m

_[31;1m_[0m_[36;1m_[36;1m_[0m_[36;1m_[0m_[36;1m     | _[31;1m     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~_[0m

_[31;1m_[0m_[36;1m_[36;1m_[0m_[36;1m_[0m_[36;1m_[31;1m_[31;1m_[36;1m     | _[31;1mA connection was successfully established with the server, but then an error occurred during the login process._[0m

_[31;1m_[0m_[36;1m_[36;1m_[0m_[36;1m_[0m_[36;1m_[31;1m_[31;1m_[36;1m_[31;1m_[36;1m     | _[31;1m(provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)_[0m

The process cannot access the file because it is being used by another process.

 

5/2/2023 3:42:06 PM : FATAL - Configuration aborted

5/2/2023 3:42:06 PM : FATAL - NOK

The Solution here is to check and verify that you are running the correct SQLServer Module inside the X3 Application Server and the X3 Database Server in the event where you have a Multi Tiered Server Environment.

Open PowerShell 7.2.x and higher and execute the below commands 1 by 1:-

Get-InstalledModule -Name SqlServer
Uninstall-module -Name SQLServer -RequiredVersion "22.0.59"
Install-Module -Name SqlServer -RequiredVersion "21.1.18256" -Scope AllUsers -force
Get-InstalledModule -Name SqlServer

 

Once the above is done you should be able to proceed with your installation.