dbTalk Databases Forums  

Changing data sources with Analysis Services

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Changing data sources with Analysis Services in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
rachel.jones@talbotuw.com
 
Posts: n/a

Default Changing data sources with Analysis Services - 05-24-2005 , 09:42 AM






We have a test server for our OLAP cubes which until now had a one
Sybase OLEDB data source to the live database server.
All the dimensions & cubes have been created using this data source.
Now I have added another data source pointing at the test database
server, but although I can change the data source of a cube, I can see
no way to change the data source of a dimension, and so to process all
the cubes on the test database as I wish would mean recreating all the
dimensions using the test data source.
I thought to get round this by simply pointing the existing live data
source at the test server but Analysis Services seemed to ignore the
change completely -despite a reboot of the server - and still processed
the cubes on the live server!
Now there was a problem with multiple Sybase data sources where AS
would just use the first one, but I have applied a fix for that - does
anyone have any ideas about the current problems - I notice that in
Books Online it seems to recommend NOT changing the data source of a
cube - why?
Thank you


Reply With Quote
  #2  
Old   
OLAPMonkey
 
Posts: n/a

Default Re: Changing data sources with Analysis Services - 05-24-2005 , 10:27 AM






How are you changing your cube data source? I wasn't aware such an
option existed.

Anyhow...dangerous stuff here...definitely not for the faint of
heart...do not do this without testing the heck out of it on a box you
don't care about.

You can run a query like this against your AS repository...

SELECT
a.[ObjectName],
a.[ObjectDefinition]
FROM [dbo].[OlapObjects] a
INNER JOIN [dbo].[OlapObjects] b ON
a.ParentID = b.ID AND
b.ClassType = 2 AND
b.ObjectName = 'FoodMart_MyVersion'
WHERE a.ClassType = 7

Substitute "FoodMart_MyVersion" with the name of the catalog that
contains the AS objects you want to manipulate.

This query simply lists out the dimensions (class type 7) that are
contained in the catalog and their corresponding XML definition. In
the XML Definition for your dimensions...you will see somethign like '
DataSource="FoodMart" '.

Simply modify that part of the XML to point to the DataSource you
want...and reprocess your dimensions. You can either modify the XML
manually...not necessarily recommended...or you can write code to do
it. Unfornutately since the ObjectDefinition column is a NText
column...you cannot simply do an update statement and use the replace
function...the code get's a little trickier...at least if you are using
T-SQL for your code.

This is a 100% undocumented hack...it will work if executed
properly...but be very careful.


Reply With Quote
  #3  
Old   
Rachel Jones
 
Posts: n/a

Default Re: Changing data sources with Analysis Services - 05-24-2005 , 11:50 AM



If you edit the partition of a cube, it shows you the data source and
the fact table and there's a "Change" button that allows you to change
them - but no such facility exists for dimensions.
Thank you for your hack - but it was to avoid doing something like that
that I thought the easy way would be simply to point the existing "live"
data source at the test database server, leaving it named the same so
all the cubes & dimensions would use it without a problem.
What I can't understand is why it just ignores me!



*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #4  
Old   
rachel.jones@talbotuw.com
 
Posts: n/a

Default Re: Changing data sources with Analysis Services - 05-25-2005 , 04:58 AM



Further to my previous post; what I really want to do is have two data
sources, one for the test database server and one for the live, and be
able to process some cubes on live and some on test - seems reasonable
I think, but from what I read it seems it can't be done once the cubes
are created, because they will include dimensions with a specific data
source and so the only way of pointing them at a different server is to
amend the Sybase data source - which will then affect any cubes using
that data source, so it is all or nothing!
Surely this can't be the way Analysis Services is designed to work? I
would really appreciate comments from any Microsoft people...


Reply With Quote
  #5  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Changing data sources with Analysis Services - 05-25-2005 , 05:58 PM



Sorry. You can't do it that way. AS2K does not support pulling data from
multiple data sources at the same time. You have to consolidate it into one
(using views is the preferred way as was previously mentioned).

This is one of the top new features in SQL Server 2005.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.


<rachel.jones (AT) talbotuw (DOT) com> wrote

Quote:
Further to my previous post; what I really want to do is have two data
sources, one for the test database server and one for the live, and be
able to process some cubes on live and some on test - seems reasonable
I think, but from what I read it seems it can't be done once the cubes
are created, because they will include dimensions with a specific data
source and so the only way of pointing them at a different server is to
amend the Sybase data source - which will then affect any cubes using
that data source, so it is all or nothing!
Surely this can't be the way Analysis Services is designed to work? I
would really appreciate comments from any Microsoft people...




Reply With Quote
  #6  
Old   
Rachel Jones
 
Posts: n/a

Default Re: Changing data sources with Analysis Services - 05-26-2005 , 04:04 AM



Thanks for this Dave.
I do understand that I cannot mix data sources within a cube but I do
not understand why if I amend the "live" Sybase data source via Sybase's
configuration tool to point at the test database server, all the cubes
and dimensions that use that data source do not then process on the test
server.
Would you agree that that should work?
Rachel



*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #7  
Old   
rachel.jones@talbotuw.com
 
Posts: n/a

Default Re: Changing data sources with Analysis Services - 05-26-2005 , 11:37 AM



I have now tested a cube which was created using the test database
server data source for both the cube and the dimensions; I changed the
datasource to point at the live database server and successfully
processed it on the live server.
Therefore, I think the problem may be to do with the fact that some of
the other cubes have been copied & pasted from the live AS server and
somewhere the connection has been cached.
Could this be so?
Rachel


Reply With Quote
  #8  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Changing data sources with Analysis Services - 05-26-2005 , 07:24 PM



Yes. The AS services does cache connections. What happens if you restart the
service?
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.


<rachel.jones (AT) talbotuw (DOT) com> wrote

Quote:
I have now tested a cube which was created using the test database
server data source for both the cube and the dimensions; I changed the
datasource to point at the live database server and successfully
processed it on the live server.
Therefore, I think the problem may be to do with the fact that some of
the other cubes have been copied & pasted from the live AS server and
somewhere the connection has been cached.
Could this be so?
Rachel




Reply With Quote
  #9  
Old   
Rachel
 
Posts: n/a

Default Re: Changing data sources with Analysis Services - 05-27-2005 , 03:48 AM



If I change the data source to point at the test server and restart the
service, I find that the only cubes which still look OK are the two
which I have been unable to process (as they keep giving me a "socket
closed" error which I have been unable to resolve) - all the others now
say they cannot find the fact tables and have consequently lost all
their joins in the cube schema - but all these tables DO exist on the
test server.
When I test the connection in the Sybase OLEDB Configuration manager it
succeeds.

Rachel Jones
IT Developer
Talbot Underwriting Ltd

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #10  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Changing data sources with Analysis Services - 05-27-2005 , 07:20 PM



I don't know anything about Sybase. Might it be keeping the sessions open?
When you restart msmdsrv it should reset all connections.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Rachel" <anonymous (AT) devdex (DOT) com> wrote

Quote:
If I change the data source to point at the test server and restart the
service, I find that the only cubes which still look OK are the two
which I have been unable to process (as they keep giving me a "socket
closed" error which I have been unable to resolve) - all the others now
say they cannot find the fact tables and have consequently lost all
their joins in the cube schema - but all these tables DO exist on the
test server.
When I test the connection in the Sybase OLEDB Configuration manager it
succeeds.

Rachel Jones
IT Developer
Talbot Underwriting Ltd

*** Sent via Developersdex http://www.developersdex.com ***



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.