Tempo aproximado para leitura:00:01:36 min
Dúvida
Como proceder para importar ambientes do Planning?
Ambiente
Framework - Framework (Linha Datasul) - Business Intelligence (BAS) - Todas as versões
Solução
1. Caso já exista no SQL Server as que estão sendo importadas, exemplo: DecisionModeling, Datasul_BI_Metadata, etc.., clique com o botão direito sobre a base desejada, menu Tarefas, menu Restaurar e Banco de Dados:
2. Selecione o arquivo de backup para que possa ser restaurado no banco de dados desejado, conforme imagem abaixo:
3. Após selecionar o arquivo backup, selecione Opções e marque para Substituir o banco existente.
Clique em OK e a base será restaurada.
Passos após as restaurações das bases do Planning:
1. No banco de dados Datasul_BI_Metadata, alterar o nome do servidor na coluna Datasource na tabela Technical_Scopes para o nome do servidor onde está sendo restaurado o banco.
update Technical_Scopes
set Datasource = 'JVD0748\PLANNING'
where
Integrated_Security = 1
2. Insira permissões para seu usuário em todos os planos/objetos executando o script abaixo:
USE Datasul_BI_Metadata
DECLARE @OWNER AS VARCHAR(128)
SET @OWNER = 'seu.usuario'
DELETE FROM PERMISSIONS WHERE Object_Instance_Id NOT IN
(select distinct object_id AS 'Object_Instance_Id'
from DecisionModeling.dbo.analysisobject
union
select distinct object_security_id AS 'Object_Instance_Id'
from DecisionModeling.dbo.planfolder)
DELETE FROM OBJECT_SECURITY_INSTANCES WHERE Object_Instance_Id NOT IN (select distinct object_id AS 'Object_Instance_Id' from DecisionModeling.dbo.analysisobject union select distinct object_security_id AS 'Object_Instance_Id' from DecisionModeling.dbo.planfolder)
UPDATE object_security_instances SET Owner_Id = @OWNER
INSERT INTO Object_Security_Instances
SELECT DISTINCT Object_Id AS 'Object_Instance_Id', NULL, NULL, NULL, @OWNER As 'Owner_Id'
FROM DecisionModeling.DBO.AnalysisObject
WHERE DecisionModeling.DBO.AnalysisObject.Object_Id NOT IN (SELECT DISTINCT Object_Instance_Id FROM Object_Security_Instances)
UNION
SELECT DISTINCT object_security_id AS 'Object_Instance_Id', NULL, NULL, NULL, @OWNER As 'Owner_Id'
FROM DecisionModeling.DBO.PlanFolder
WHERE DecisionModeling.DBO.PlanFolder.object_security_id NOT IN (SELECT DISTINCT Object_Instance_Id FROM Object_Security_Instances)
INSERT INTO Permissions
SELECT 'Everyone' AS 'Identity_Id', 2 AS 'Read', 2 AS 'Write', 2 AS 'Delete', 0 AS 'Group', Object_Instance_Id As 'Object_Instance_Id'
FROM Object_Security_Instances WHERE Object_Instance_Id NOT IN (SELECT DISTINCT Object_Instance_Id FROM Permissions)
Assim concluirá a importação de um ambiente do Planning.
0 Comentários