Migrate a Prime Menu from one Database to another

Prashant Lakhlani -

Note: This article applies to Emgage products deployed to SharePoint On-Premises only.

To migrate a Prime Menu from one environment (Development) to another (Production) please follow the provided steps:

  • Go to SharePoint Management Shell.
  • Run (Get-spfarm).Id

Capture.PNG

  • Grab the farm ID from both the farms using above powershell command.
  • Not down the ID for both the farms.
  • Once you have both ID's, production and development, go into SQL and past the following Query statement and execute.Make sure to select Prime Settings database before running the query.

 /****** Script for SelectTopNRows command from SSMS ******/

--Select query to get the data

 SELECT TOP 1000 [WebID]

,[UserID]

,[SettingID]

,[Value]

FROM [Emgage_PrimeSettings].[dbo].[UserSettings]

Where SettingID like '%AteraPrime.Prime635.MegaMenuID_%'

  • The above sql command will give list of entries for all the Mega menus available in a farm.
  • Copy the entries and then paste them in the other farm database(production).
  • Replace the SourceFarmId which will be your source farm's id and DestFarmId  be your destination farm's id which we got from the above powershell command.
  • Run this command to update Source Farm ID with the Destination Farm Id for the SettingID column.

declare @sourceFarmId varchar(max)

set @sourceFarmId = '<SourceFarmId>'

declare @destFarmId varchar(max)

set @destFarmId = '<DestFarmId>'

update UserSettings

set SettingID = REPLACE(SettingID,@sourceFarmId , @destFarmId)

where SettingID like '%AteraPrime.Prime635.MegaMenuID_'+@sourceFarmId+'%' 

  • Run this command to update Source Farm ID with the Destination Farm Id for the WebID column.

update UserSettings

set WebID = REPLACE(WebID,@sourceFarmId, @destFarmId)

where WebID like '%'+@sourceFarmId+'%' and SettingID like '%AteraPrime.Prime635.MegaMenuID_'+@sourceFarmId+'%' 

 

Note:  If you would like to perform the same operation for the Global Navigation menu, you will need to change AteraPrime.Prime635.MegaMenuID_ to AteraPrime.Prime635.MegaMenuID_Global_

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk