SSAS Tworzenie kopii bazy danych SSAS na tej samej instacji serwera

31-sie-2012

Moim celem było utworzenie kilku kopii bazy danych na tym samym serwerze. Ponieważ miałem już gotową wzorcową bazę, uruchomiłem kreatora Deployment Wizard, który w ostatnim kroku pozwolił mi nie wykonywać natychmiast deploy bazy danych, ale zapisanie skryptu XMLA. Ten skrypt może być uruchamiany przez Management Studio. Jednak jak zrobić, aby powstawały nowe bazy danych. W skrypcie wyszukałem miejsca, które odwoływały się do aktualnej nazwy bazy danych i zmieniałem tę nazwę na nową. Było kilka takich miejsc:

<Batch Transaction=”false” xmlns=”http://schemas.microsoft.com/analysisservices/2003/engine„>
  <Alter AllowCreate=”true” ObjectExpansion=”ExpandFull”>
    <Object>
      <DatabaseID>MYOLAP1</DatabaseID>
    </Object>
    <ObjectDefinition>
      <Database xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:ddl2=”http://schemas.microsoft.com/analysisservices/2003/engine/2” xmlns:ddl2_2=”http://schemas.microsoft.com/analysisservices/2003/engine/2/2” xmlns:ddl100_100=”http://schemas.microsoft.com/analysisservices/2008/engine/100/100” xmlns:ddl200=”http://schemas.microsoft.com/analysisservices/2010/engine/200” xmlns:ddl200_200=”http://schemas.microsoft.com/analysisservices/2010/engine/200/200” xmlns:ddl300=”http://schemas.microsoft.com/analysisservices/2011/engine/300” xmlns:ddl300_300=”http://schemas.microsoft.com/analysisservices/2011/engine/300/300„>
        <ID>MYOLAP1</ID>
        <Name>MYOLAP1</Name>
        <DataSourceImpersonationInfo>
          <ImpersonationMode>Default</ImpersonationMode>
        </DataSourceImpersonationInfo>

  <Process>
    <Type>ProcessDefault</Type>
    <Object>
      <DatabaseID>MYOLAP1</DatabaseID>
    </Object>
  </Process>
</Batch>

Odniosłem prawie sukces.  Wprawdzie bazy danych się tworzyły, ale ich procesowanie się nie udawało:

Internal error: The operation terminated unsuccessfully.
The following system error occurred:
Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Adventure Works DW2008R2′, Name of 'Adventure Works DW2008R2′.
Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Promotion’, Name of 'Promotion’ was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Discount Pct’ attribute of the 'Promotion’ dimension from the 'TK 70-448 SSAS Projectx’ database was being processed.
Server: The operation has been cancelled.

O co chodzi? Otóż baza utworzona poprzez skrypt w swoim dataset miała zapisane połącznie do bazy danych z faktami i wymiarami, ale z określonym użytkownikiem. Jego hasło nie zostało przeniesione przez skrypt! Trzeba to więc było poprawić. Wejdź w Data Sources, wybierz połączenie i wypoełnij hasło:

Komentarze są wyłączone

Autor: Rafał Kraik