Created
May 27, 2020 09:33
-
-
Save RahulSharma/2af01597d8958cdb426454f9ee7ad143 to your computer and use it in GitHub Desktop.
D365 - Delete db users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update sysglobalconfiguration | |
set value = 'SQLAZURE' | |
where name = 'BACKENDDB' | |
update sysglobalconfiguration | |
set value = 1 | |
where name = 'TEMPTABLEINAXDB' | |
drop procedure if exists XU_DisableEnableNonClusteredIndexes | |
drop procedure if exists SP_ConfigureTablesForChangeTracking | |
drop procedure if exists SP_ConfigureTablesForChangeTracking_V2 | |
drop schema [NT AUTHORITY\NETWORK SERVICE] | |
drop user [NT AUTHORITY\NETWORK SERVICE] | |
drop user axdbadmin | |
drop user axdeployuser | |
drop user axmrruntimeuser | |
drop user axretaildatasyncuser | |
drop user axretailruntimeuser | |
drop user axdeployextuser | |
--Tidy up the batch server config from the previous environment | |
DELETE FROM SYSSERVERCONFIG | |
--Tidy up server sessions from the previous environment | |
DELETE FROM SYSSERVERSESSIONS | |
--Tidy up printers from the previous environment | |
DELETE FROM SYSCORPNETPRINTERS | |
--Tidy up client sessions from the previous environment | |
DELETE FROM SYSCLIENTSESSIONS | |
--Tidy up batch sessions from the previous environment | |
DELETE FROM BATCHSERVERCONFIG | |
--Tidy up batch server to batch group relation table | |
DELETE FROM BATCHSERVERGROUP | |
-- Clear encrypted hardware profile merchant properties | |
update dbo.RETAILHARDWAREPROFILE set SECUREMERCHANTPROPERTIES = null where SECUREMERCHANTPROPERTIES is not null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment