Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

XMLA Queries in Execute SQL Task

$
0
0

I have a very simple SSIS package with one connection and one Execute SQL Task.

The connection is a Native OLE DB\ for Analysis Services 9.0

The execute SQL task fires off this XMLA query created through the syncronize database wizard from MSAS2005.

All I want to do is dynmaicaly replace the Source on the connection String in this script to a local variable. I have tried the @variable and the ? syntax as I found some good info in BOL. However neither of these work.

I supposed I could use scripting to handle this but I didn't want to add that layer and feel that SSIS should be able to handle this.

Here is the raw script which works fine withing SSIS:

<Synchronize xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
  <Source>
    <ConnectionString>Provider=MSOLAP.3;Data Source=ServerName;ConnectTo=9.0;Integrated Security=SSPI;Initial Catalog=catalogname</ConnectionString>
    <Object>
      <DatabaseID>Recommended Pricing</DatabaseID>
    </Object>
  </Source>
  <Locations />
  <SynchronizeSecurity>CopyAll</SynchronizeSecurity>
  <ApplyCompression>true</ApplyCompression>
</Synchronize>

Here is what I want to execute (Which gives this error

failed with the following error: "The following system error occurred: No such host is known. .".

):

<Synchronize xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
  <Source>
    <ConnectionString>Provider=MSOLAP.3;Data Source=?;ConnectTo=9.0;Integrated Security=SSPI;Initial Catalog=catalogname</ConnectionString>
    <Object>
      <DatabaseID>Recommended Pricing</DatabaseID>
    </Object>
  </Source>
  <Locations />
  <SynchronizeSecurity>CopyAll</SynchronizeSecurity>
  <ApplyCompression>true</ApplyCompression>
</Synchronize>


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>