CSI – Change Site name


After copying data from prod to test, usually site name also need to be changed. Following is the script.

DECLARE @Severity int
, @POldSite [dbo].[SiteType]
, @PNewSite [dbo].[SiteType]
, @RegenerateRowPointers [dbo].[ListYesNoType]
, @Infobar [dbo].[InfobarType]
, @Site [dbo].[SiteType]

— Change XYZ to the name of your current Site Id
SET @Site = ‘SITE-P’

EXECUTE @Severity = [dbo].[SetSiteSp] @Site,@Infobar OUTPUT
PRINT @Infobar

SET @POldSite = ‘SITE-P’ — Enter the Old Site Id
SET @PNewSite = ‘SITE-T’ — Enter new SiteId
SET @RegenerateRowPointers = 0 — 1 To Regenerate Rowpointers

EXECUTE @Severity = [dbo].[ChangeSiteSp]
@POldSite
,@PNewSite
,@RegenerateRowPointers
,@Infobar OUTPUT

PRINT @Infobar

GO

Comments

comments