24 abr. 2008

Migrar Proclarity (PerformancePoint Analytics) a una nueva instalación


Les facilito un script de Migración de Proclarity.
Proclarity_BKP seria la antigua base de datos que contiene todos los reportes/datos.
Proclarity_PAS1 seria la nueva base de datos recíen instalada (sin contenido).
No olviden de poner el usuario PAS datareader y datawriter de la nueva base de datos.

use ProClarity_BKP
insert into ProClarity_PAS1..MDStores select * from ProClarity_BKP..MDStores
insert into ProClarity_PAS1..Libraries select * from ProClarity_BKP..Libraries where caption not like '%FAVORITES%'
insert into ProClarity_PAS1..Books select * from ProClarity_BKP..Books --where Doctype not like '%briefing%'
insert into ProClarity_PAS1..BookElements select * from ProClarity_BKP..BookElements
insert into ProClarity_PAS1..Users select
UserID, Caption, Description, CreatedBy, CreatedTime, ModifiedTime, XMLData, FavoritesID, AllowUserModifications, GridRowPageSize, DimTreePageSize,
(select min(languageID) from ProClarity_PAS1.dbo.Languages) LanguageID, FramesetURL,
AllowRichAccess, AllowComponentDownload, AllowSendView, Username, ClickPreference,
AllowRichAuthor, Reserved1, Reserved2
from ProClarity_BKP..Users where userid not like ( select min(userid) from ProClarity_PAS1.dbo.Users)
insert into ProClarity_PAS1..Roles select * from ProClarity_BKP..Roles where roleid not like ( select min(roleid) from ProClarity_PAS1.dbo.Roles)
insert into ProClarity_PAS1..RoleAssociations select * from ProClarity_BKP..RoleAssociations
insert into ProClarity_PAS1..Members select * from ProClarity_BKP..Members
go
use ProClarity_PAS1
update bookelements set servername='@OLDSERVER' where servername='@NEWSERVER'
update dbo.MDStores
set xmldata= replace(convert(varchar(8000),xmldata), '@OLDSERVER', '@NEWSERVER')
update Books
set linkurl=replace(convert(varchar(8000),linkurl), '@OLDSERVER:80', '@NEWSERVER:80'),
DocText=replace(convert(varchar(8000),DocText), '@OLDSERVER', '@NEWSERVER')

No hay comentarios: