Attività Esegui DDL Analysis ServicesAnalysis Services Execute DDL Task

L'attività Esegui DDL Analysis ServicesAnalysis Services consente di eseguire istruzioni DDL (Data Definition Language) in grado di creare, eliminare o modificare modelli di data mining e oggetti multidimensionali, quali cubi e dimensioni.The Analysis ServicesAnalysis Services Execute DDL task runs data definition language (DDL) statements that can create, drop, or alter mining models and multidimensional objects such as cubes and dimensions. Tramite un'istruzione DDL è ad esempio possibile creare una partizione nel cubo Adventure Works o eliminare una dimensione in Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012, il database di Analysis ServicesAnalysis Services di esempio incluso in SQL ServerSQL Server.For example, a DDL statement can create a partition in the Adventure Works cube, or delete a dimension in Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012, the sample Analysis ServicesAnalysis Services database included in SQL ServerSQL Server.

L'attività Esegui DDL Analysis ServicesAnalysis Services utilizza una gestione connessione Analysis ServicesAnalysis Services per connettersi a un'istanza di Analysis ServicesAnalysis Services o a un progetto di Analysis ServicesAnalysis Services .The Analysis ServicesAnalysis Services Execute DDL task uses an Analysis ServicesAnalysis Services connection manager to connect to an instance of Analysis ServicesAnalysis Services or an Analysis ServicesAnalysis Services project. Per altre informazioni, vedere Gestione connessione Analysis Services.For more information, see Analysis Services Connection Manager.

Integration ServicesIntegration Services include numerose attività che eseguono operazioni di Business Intelligence, ad esempio l'elaborazione di oggetti di analisi e l'esecuzione di query di stima basate su modelli di data mining. includes a number of tasks that perform business intelligence operations, such as processing analytic objects and running data mining prediction queries.

Per ulteriori informazioni sulle attività di Business Intelligence correlate, fare clic su uno degli argomenti seguenti:For more information about related business intelligence tasks, click one of the following topics:

Istruzioni DDLDDL Statements

Le istruzioni DDL sono rappresentate come istruzioni in ASSL ( Analysis ServicesAnalysis Services Scripting Language) e inserite nell'ambito di un comando XMLA (XML for Analysis).The DDL statements are represented as statements in Analysis ServicesAnalysis Services Scripting Language (ASSL), and framed in an XML for Analysis (XMLA) command.

  • Il linguaggio ASSL consente di definire e descrivere un'istanza di Analysis ServicesAnalysis Services, nonché dei database e degli oggetti di database contenuti.ASSL is used to define and describe an instance of Analysis ServicesAnalysis Services and the databases and database objects it contains. Per altre informazioni, vedere Guida di riferimento ad Analysis Services Scripting Language (ASSL).For more information, see Analysis Services Scripting Language (ASSL for XMLA).

  • XMLA è un linguaggio di comando che consente di inviare a un'istanza di Analysis ServicesAnalysis Services comandi di azione quali Create, Alter o Process.XMLA is a command language that is used to send action commands, such as Create, Alter, or Process, to an instance of Analysis ServicesAnalysis Services. Per altre informazioni, vedere Guida di riferimento a XML for Analysis (XMLA).For more information, see XML for Analysis (XMLA) Reference.

    Se il codice DDL è archiviato in un file separato, l'attività Esegui DDL Analysis ServicesAnalysis Services userà una gestione connessione file per specificare il percorso del file.If the DDL code is stored in a separate file, the Analysis ServicesAnalysis Services Execute DDL task uses a File connection manager to specify the path of the file. Per altre informazioni, vedere File Connection Manager.For more information, see File Connection Manager.

    Poiché le istruzioni DDL possono contenere password e altre informazioni sensibili, per i pacchetti che contengono una o più attività Esegui DDL Analysis ServicesAnalysis Services è necessario usare il livello di protezione del pacchetto EncryptAllWithUserKey o EncryptAllWithPassword.Because DDL statements can contain passwords and other sensitive information, a package that contains one or more Analysis ServicesAnalysis Services Execute DDL tasks should use the package protection level EncryptAllWithUserKey or EncryptAllWithPassword. Per altre informazioni, vedere Pacchetti di Integration Services (SSIS).For more information, see Integration Services (SSIS) Packages.

Esempi di DDLDDL Examples

Le tre istruzioni DDL seguenti sono state generate da oggetti di script in Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012, il database di Analysis ServicesAnalysis Services incluso in SQL ServerSQL Server.The following three DDL statements were generated by scripting objects in the Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012, the Analysis ServicesAnalysis Services database included in SQL ServerSQL Server.

L'istruzione DDL seguente elimina la dimensione Promotion .The following DDL statement deletes the Promotion dimension.

<Delete xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">  
    <Object>  
        <DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>  
        <DimensionID>Dim Promotion</DimensionID>  
    </Object>  
</Delete>  

L'istruzione DDL seguente elabora il cubo Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012 .The following DDL statement processes the Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012 cube.

<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">  
  <Parallel>  
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  
      <Object>  
        <DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>  
      </Object>  
      <Type>ProcessFull</Type>  
      <WriteBackTableCreation>UseExisting</WriteBackTableCreation>  
    </Process>  
  </Parallel>  
</Batch>  

L'istruzione DDL seguente crea il modello di data mining Forecasting .The following DDL statement creates the Forecasting mining model.

<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">  
    <ParentObject>  
        <DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>  
        <MiningStructureID>Forecasting</MiningStructureID>  
    </ParentObject>  
    <ObjectDefinition>  
        <MiningModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  
            <ID>Forecasting</ID>  
            <Name>Forecasting</Name>  
            <Algorithm>Microsoft_Time_Series</Algorithm>  
            <AlgorithmParameters>  
                <AlgorithmParameter>  
                    <Name>PERIODICITY_HINT</Name>  
                    <Value xsi:type="xsd:string">{12}</Value>  
                </AlgorithmParameter>  
            </AlgorithmParameters>  
            <Columns>  
                <Column>  
                    <ID>Amount</ID>  
                    <Name>Amount</Name>  
                    <SourceColumnID>Amount</SourceColumnID>  
                    <Usage>Predict</Usage>  
                </Column>  
                <Column>  
                    <ID>Model Region</ID>  
                    <Name>Model Region</Name>  
                    <SourceColumnID>Model Region</SourceColumnID>  
                    <Usage>Key</Usage>  
                </Column>  
                <Column>  
                    <ID>Quantity</ID>  
                    <Name>Quantity</Name>  
                    <SourceColumnID>Quantity</SourceColumnID>  
                    <Usage>Predict</Usage>  
                </Column>  
                <Column>  
                    <ID>Time Index</ID>  
                    <Name>Time Index</Name>  
                    <SourceColumnID>Time Index</SourceColumnID>  
                    <Usage>Key</Usage>  
                </Column>  
            </Columns>  
            <Collation>Latin1_General_CS_AS_KS</Collation>  
        </MiningModel>  
    </ObjectDefinition>  
</Create>  

Le tre istruzioni DDL seguenti sono state generate da oggetti di script in Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012, il database di Analysis ServicesAnalysis Services incluso in SQL ServerSQL Server.The following three DDL statements were generated by scripting objects in the Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012, the Analysis ServicesAnalysis Services database included in SQL ServerSQL Server.

L'istruzione DDL seguente elimina la dimensione Promotion .The following DDL statement deletes the Promotion dimension.

<Delete xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">  
    <Object>  
        <DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>  
        <DimensionID>Dim Promotion</DimensionID>  
    </Object>  
</Delete>  

L'istruzione DDL seguente elabora il cubo Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012 .The following DDL statement processes the Adventure Works DW Multidimensional 2012Adventure Works DW Multidimensional 2012 cube.

<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">  
  <Parallel>  
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  
      <Object>  
        <DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>  
      </Object>  
      <Type>ProcessFull</Type>  
      <WriteBackTableCreation>UseExisting</WriteBackTableCreation>  
    </Process>  
  </Parallel>  
</Batch>  

L'istruzione DDL seguente crea il modello di data mining Forecasting .The following DDL statement creates the Forecasting mining model.

<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">  
    <ParentObject>  
        <DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>  
        <MiningStructureID>Forecasting</MiningStructureID>  
    </ParentObject>  
    <ObjectDefinition>  
        <MiningModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  
            <ID>Forecasting</ID>  
            <Name>Forecasting</Name>  
            <Algorithm>Microsoft_Time_Series</Algorithm>  
            <AlgorithmParameters>  
                <AlgorithmParameter>  
                    <Name>PERIODICITY_HINT</Name>  
                    <Value xsi:type="xsd:string">{12}</Value>  
                </AlgorithmParameter>  
            </AlgorithmParameters>  
            <Columns>  
                <Column>  
                    <ID>Amount</ID>  
                    <Name>Amount</Name>  
                    <SourceColumnID>Amount</SourceColumnID>  
                    <Usage>Predict</Usage>  
                </Column>  
                <Column>  
                    <ID>Model Region</ID>  
                    <Name>Model Region</Name>  
                    <SourceColumnID>Model Region</SourceColumnID>  
                    <Usage>Key</Usage>  
                </Column>  
                <Column>  
                    <ID>Quantity</ID>  
                    <Name>Quantity</Name>  
                    <SourceColumnID>Quantity</SourceColumnID>  
                    <Usage>Predict</Usage>  
                </Column>  
                <Column>  
                    <ID>Time Index</ID>  
                    <Name>Time Index</Name>  
                    <SourceColumnID>Time Index</SourceColumnID>  
                    <Usage>Key</Usage>  
                </Column>  
            </Columns>  
            <Collation>Latin1_General_CS_AS_KS</Collation>  
        </MiningModel>  
    </ObjectDefinition>  
</Create>  

Configurazione dell'attività Esegui DDL Analysis ServicesConfiguration of the Analysis Services Execute DDL Task

È possibile impostare le proprietà tramite Progettazione SSISSSIS o a livello di codice.You can set properties through SSISSSIS Designer or programmatically.

Per ulteriori informazioni sulle proprietà che è possibile impostare in Progettazione SSISSSIS , fare clic su uno degli argomenti seguenti:For more information about the properties that you can set in SSISSSIS Designer, click one of the following topics:

Configurazione dell'attività Esegui DDL Analysis Services a livello di codiceProgrammatic Configuration of the Analysis Services Execute DDL Task

Per ulteriori informazioni sull'impostazione di queste proprietà a livello di codice, fare clic sull'argomento seguente:For more information about programmatically setting these properties, click the following topic: