Accessing Data Source of SSAS Project from within an SSAS Assembl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

within an SQL Server Analysis Services project we are using an assembly to
retrieve dimension permissions based on data stored in a adminstration
database.

Currently we store the connection string used to access in the
administration database within the assembly:
Dim locCon As New SqlConnection
....
locCon.ConnectionString = "data source=eira; database=ServiceAdmin;
Integrated Security=SSPI;"
....

Obviously this is not a nice solution. As I understand it is not possible to
access a application.config file from a DLL, because the DLL will use the
config file belonging to the corresponding application.
I wonder if it is not possible to access one of the data sources deployed
with the cube from the assembly.

somthing like:
locCon.ConnectionString = "data source=cubedatasource"
with cubedatasource beeing the name of the data source used in the cube
Well, it doesn't seem to work that way. Any help is appreciated

Thanks

bjh
 
If you have hard-coded the ConnectionString property, your logic can set it
to whatever you need at runtime. However, I might approach this problem by
creating a TCP/IP alias to redirect your connection to the appropriate
server instance. This can be done with SQL Server Configuration Manager.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top