dbTalk Databases Forums  

Execute a SQL Server Analysis Query inside SSIS?

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Execute a SQL Server Analysis Query inside SSIS? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jesse O
 
Posts: n/a

Default Execute a SQL Server Analysis Query inside SSIS? - 02-21-2006 , 04:35 PM






I've written some AMO code and would like to execute it. Rather than
executing it within a SQL job, I'd rather use a SSIS package.

Any such way to do this?



Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Execute a SQL Server Analysis Query inside SSIS? - 02-21-2006 , 06:00 PM






You can access AMO objects in an SSIS Script task - see this Adventure
Works SSIS sample package:

http://msdn2.microsoft.com/en-us/library/ms161545.aspx
Quote:
The Synchronizing Adventure Works DW Partitions Package Sample is a
sample package that demonstrates how to automate the identification and
creation of new partitions.
...
Script task

Within the Foreach Loop task, the Script task, named Partition Already
There?, uses Analysis Management Objects (AMO) to identify whether a
corresponding partition already exists in the Analysis Services
database. This finding is then used to set the IsNotPresent variable.
Additionally, this task also populates the XMLA_Script variable. This
variable can be used, if required, to create a new partition in the
Analysis Services database.
...
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #3  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Execute a SQL Server Analysis Query inside SSIS? - 02-23-2006 , 07:15 PM



Make sure that when you use this technique that you follow the instructions
in the sample code I wrote which tells you where to put the AMO .NET
assembly. One of the restrictions of the script task is that it can only
reference assemblies in the .NET framework folder. Thus you must manually
copy the assembly.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI Systems Team
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> wrote

Quote:
You can access AMO objects in an SSIS Script task - see this Adventure
Works SSIS sample package:

http://msdn2.microsoft.com/en-us/library/ms161545.aspx

The Synchronizing Adventure Works DW Partitions Package Sample is a
sample package that demonstrates how to automate the identification and
creation of new partitions.
..
Script task

Within the Foreach Loop task, the Script task, named Partition Already
There?, uses Analysis Management Objects (AMO) to identify whether a
corresponding partition already exists in the Analysis Services
database. This finding is then used to set the IsNotPresent variable.
Additionally, this task also populates the XMLA_Script variable. This
variable can be used, if required, to create a new partition in the
Analysis Services database.
..



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.