From 4d0e306b0338187e2fb0727e78bebb32129e721f Mon Sep 17 00:00:00 2001 From: Thierry Schork Date: Thu, 7 Mar 2024 17:13:13 +0100 Subject: [PATCH] removed GO statements --- .../20_update_system_site_centrale.sql | 5 ++--- .../21_update_point_of_sale_centrale.sql | 1 - TPDT-268 - ACP in task sequence/acp_auto.ps1 | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/TPDT-268 - ACP in task sequence/20_update_system_site_centrale.sql b/TPDT-268 - ACP in task sequence/20_update_system_site_centrale.sql index 7581739..ebf73c3 100644 --- a/TPDT-268 - ACP in task sequence/20_update_system_site_centrale.sql +++ b/TPDT-268 - ACP in task sequence/20_update_system_site_centrale.sql @@ -21,14 +21,13 @@ Modifications: 07.03.2024 TSC Rewrote to connect to the central through the pharmacy linked server ArizonaCash The values in the local pharmacy are updated as well =============================================================================*/ -USE master; -GO +USE [master]; DECLARE @ou_id INT; DECLARE @fqdn VARCHAR(100) = '$fqdn'; DECLARE @alias VARCHAR(100) = '$alias'; -EXECUTE Arizona.[dbo].[sp_bmc_Bmc_Applic_Default] +EXECUTE [Arizona].[dbo].[sp_bmc_Bmc_Applic_Default] @in_job_type = 3, @in_param_int_1 = NULL, /* Company */ @in_param_int_2 = NULL, /* Subsidiary */ diff --git a/TPDT-268 - ACP in task sequence/21_update_point_of_sale_centrale.sql b/TPDT-268 - ACP in task sequence/21_update_point_of_sale_centrale.sql index 8f5132e..1a97d4c 100644 --- a/TPDT-268 - ACP in task sequence/21_update_point_of_sale_centrale.sql +++ b/TPDT-268 - ACP in task sequence/21_update_point_of_sale_centrale.sql @@ -22,7 +22,6 @@ Modifications: The values in the local pharmacy are updated as well =============================================================================*/ USE [master]; -GO DECLARE @ou_id INT; DECLARE @fqdn VARCHAR(100) = '$fqdn'; diff --git a/TPDT-268 - ACP in task sequence/acp_auto.ps1 b/TPDT-268 - ACP in task sequence/acp_auto.ps1 index a1f4b2f..8790725 100644 --- a/TPDT-268 - ACP in task sequence/acp_auto.ps1 +++ b/TPDT-268 - ACP in task sequence/acp_auto.ps1 @@ -537,7 +537,7 @@ if($true -eq $instanceReachable){ $query = $query.Replace("`$fqdn", $fqdn.HostName) $query = $query.Replace("`$alias", $alias) - Invoke-Sqlcmd -ServerInstance $SqlInstance -Database master -Query $query -Credential + Invoke-Sqlcmd -ServerInstance $SqlInstance -Database master -Query $query Write-Output "Executed 20_update_system_site_centrale.sql" ##step 21: update Point_of_sale on the central @@ -553,6 +553,7 @@ if($true -eq $instanceReachable){ if($macs.Count -gt 1){ #we have several mac addresses, unable to define which one should be used in point_of_sale Write-Error "Several mac addresses are active, no clue which one to save in Point_of_sale" + exit 42102 } else{ $query=Get-Content -Path .\21_update_point_of_sale_centrale.sql