Yes, you can do this. I've done it in the past -- but the syntax is very
specific for the type of role you want to create.
So sending you the code isn't particularly useful since you'd probably have
to modify it heavily. But it is easily doable.
What I would advise you to do is to get the Analysis Services meta-data
scriptor that is on the SQL Server 2000 Resource Kit.
It generates a sample VB program that would re-create the current Analysis
Services database.
Then follow the following sequence of events:
1) Run the meta-data scriptor to create a VB program from your current
database.
2) Create the role you want by-hand using Analysis Manager
3) Run the meta-data scriptor a second time to create a VB program from your
current database.
4) Do a windiff between the two VB programs to see what structures Analysis
Manager created for you
5) Write a VBS script to do the same thing :-)
There are several sources for the Resource Kit -- you could buy it at your
local bookstore, locate a collegue that has a copy, find a TechNet
distribution (TechNet has a Resource Kit DVD on it that contains all of the
Microsoft Resource Kits -- SQL Server included).
Hope this helps.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI Practices Team
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"stats12" <vhs180 (AT) polbox (DOT) com> wrote
Quote:
Hi,
Does anybody know where to find references to dynamicly create ROLES with
external code (ex. VBScript)?
Regards.. |