cancel
Showing results for 
Search instead for 
Did you mean: 

Company name change for test company

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

Answers (1)

Answers (1)

msundararaja_perumal
Active Contributor

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.