sync
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/* Configuration des postes pour éviter le deadlock lors des rajout d'abonnements suite à des mises à jours doit être passé après la virtualisation des serveurs.*/
|
||||
Exec ActivePos_server.dbo.ExecuteOnAllPos '
|
||||
|
||||
DECLARE
|
||||
@delay varchar(5),
|
||||
@message NVARCHAR(4000)
|
||||
|
||||
BEGIN TRY
|
||||
DECLARE @mac AS TABLE (MacAddress VARCHAR(400) null)
|
||||
DECLARE @posId AS VARCHAR(5)
|
||||
|
||||
INSERT INTO @mac
|
||||
EXEC xp_cmdshell ''getmac''
|
||||
SELECT @posId = Number FROM ActivePos_read..PointOfSale pos
|
||||
join @mac m
|
||||
ON LEFT(m.MacAddress, 18) = pos.MacAddress
|
||||
SET @delay = ''@'' + convert(varchar(2),2*@posId) + ''m''
|
||||
UPDATE ActivePos_write.dbo.[Settings]
|
||||
SET [SettingValue]= @delay
|
||||
WHERE [SettingId]=''Configuration.ConfigSections.Plugins.Parts.ManageSqlSubscriptionJob.Schedule''
|
||||
AND [ApplicationId]=''e9f3ada2-555c-4fb9-b109-5d8684d77135''
|
||||
and @posId < 30
|
||||
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
select @message = ERROR_MESSAGE()
|
||||
select @message = ''Error while updating schedule on POS '''' + convert(varchar(2),2*@posId) + ''''.'' + @message
|
||||
raiserror (@message, 13,1)
|
||||
END CATCH
|
||||
', 1
|
||||
Reference in New Issue
Block a user