on 09-30-2020 4:06 PM
Good day everyone
I want to change the company name automatically with an SQL Agent Job when I restore a copy of the live database to a test database.
The following work well and changes the name and display the new name after you have logged into the test company. The only problem I’m not sure where to change the company name there where you want to choose a company to logon, it still shows the live system's name and not the test system's name.
BEGIN
UPDATE [SAP_XXX_TEST_FINANCE].[dbo].[OADM]
SET CompnyName = 'z*** XXX TEST FINANCE ***'
UPDATE [SAP_XXX_TEST_FINANCE].[dbo].[OUSR]
SET WallPaper = '\\XXX-sap\B1_SHR\Pictures\Database_Wallpapers\Wallpaper_XXX_TEST_FINANCE.png' ,WllPprDsp = 2
END
BEGIN
UPDATE [SBO-COMMON].[dbo].[SRGC]
SET cmpName = 'z*** XXX TEST FINANCE ***'
WHERE dbName = 'SAP_XXX_TEST_FINANCE'
END
Thank you in advance!
Regards
Hein
Good day everyone
When I’ve changed the field CompnyName in table CINF, it shows then the correct company name on the “Choose Company” dialog box.
See code below:
BEGIN
UPDATE [SAP_XXX_TEST_FINANCE].[dbo].[AINF]
SET CompnyName = 'z*** XXX TEST FINANCE ***'
UPDATE [SAP_XXX_TEST_FINANCE].[dbo].[CINF]
SET CompnyName = 'z*** XXX TEST FINANCE ***'
UPDATE [SAP_XXX_TEST_FINANCE].[dbo].[OADM]
SET CompnyName = 'z*** XXX TEST FINANCE ***'
UPDATE [SAP_XXX_TEST_FINANCE].[dbo].[OUSR]
SET WallPaper = '\\XXX-sap\B1_SHR\Pictures\Database_Wallpapers\Wallpaper_XXX_TEST_FINANCE.png' ,WllPprDsp = 2
END
BEGIN
UPDATE [SBO-COMMON].[dbo].[SRGC]
SET cmpName = 'z*** XXX TEST FINANCE ***'
WHERE dbName = 'SAP_XXX_TEST_FINANCE'
END
Kind regards
Hein
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
heinvr,
Even when you manually restore them, until you refresh in SAP B1, the name change will not reflect, so I think this is out of SQL Server's scope.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.