Tuesday, February 14, 2012

create data source, data source view from XML?

hi everybody,
i want to create data source and data source view for data mining, with using C Sharp.
i have create data source and data source view and export to XML file, but when i change to another computer, run those XML file, it return error, when i run statement to create and biuld mining model, what can i change on xml or how to run XML on another computer sucessfully,
and have i build data source and data source view, how to do it.?

thanks for you helps

Basically, you need to double check that you can the following: 1) You can connect to the server successfully; 2) The database for containing the target data source and data source view has been created, and you can access it; 3) You specify the connection appropriately.

Please double check your script against the following sample XMLA script for creating Data Source:

<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

<ParentObject>

<DatabaseID>Your Database ID</DatabaseID>

</ParentObject>

<ObjectDefinition>

<DataSource xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlnsBig Smiledl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlnsBig Smiledl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xsi:type="RelationalDataSource">

<ID>Your Data source ID</ID>

<Name>Your Data source name</Name>

<ConnectionString>Provider=SQLOLEDB.1;Data Source=Server Name;Integrated Security=SSPI;Initial Catalog= Your Database ID </ConnectionString>

<ImpersonationInfo>

<ImpersonationMode>Default</ImpersonationMode>

</ImpersonationInfo>

<Timeout>PT0S</Timeout>

</DataSource>

</ObjectDefinition>

</Create>

I have marked out the xml elements that you need to pay extra attention. As to the script for data source view, you also need to make sure the related data source exist on the server.

Good luck,

No comments:

Post a Comment