Scripts of Cubes and DTS packages

  • Can we generate scripts of Cubes and DTS packages, actually i need the script in order to build cubes and corresponding dts package for my project clients. Is there any other option also available or not. I cant make a project of AS and define cubes and DTS packages and send a copy of this project to client becuase in my case cubes will be build depending on the client's configurations of some DB parameters and this configuration will be stored in my underlying DB.

    But the good thing is for value of the configuration parameter same type of cube is required, only the source parameters in DTS package will be different. So if i have the scripts of cubes and DTS i can modify them according to my requirements.

    I think i have portrayed quite a clear picture...so i need suggestions in this regard.

  • For cubes, you may consider taking the backup of the cube database.

    DTS, can be saved as a visual basic file (*.bas) which can be edited using any text editor. You can also try using dynamic properties inside your DTS package so that the configuration values can be stored in a table and accessed inside the package.

    Regards,

    Elan.

  • thanks alot,

    the picking up the configuration from table is a good idea, but what about the cube, i have to create the cube as well for each pair of configuration.

  • You may want to make use of the DSO-XML converter (source code included I think). This may be overkill if you don't need to rename anything though. If the issue is simply that the database server and possibly database itself have different names to the 'model' or template you've created, then you could wrte some code (VB6, event VB.net, C# using interop) that uses DSO (Decision Support Objects) to change the datasource (in the catalog) to point to the new database server. The following example from BOL shows how to do something very similar to this.

    Example

    Use the following code to set the ConnectionString property for a clsDataSource object.

    ' Assume an object (dsoDatasource) of ClassType clsDataSource exists

    ' Set the OLE DB connection string.

    ' The connection string is used to establish the connection

    ' to the relational database that contains the dimension and

    ' fact tables. This example uses the

    ' "Microsoft OLE DB Provider for ODBC Drivers" provider.

    dsoDatasource.ConnectionString = _

    "Provider=MSDASQL.1;Data Source=FoodMart;Connect Timeout=15"

    'Save the datasource definition in the meta data repository

    dsoDatasource.Update

    HTH,

    Steve.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply