Quantcast
Channel: SQL Server Analysis Services forum
Viewing all 14337 articles
Browse latest View live

Help understanding simple query trace with 35,000 "query subcube" events

$
0
0

No matter WHAT query I issue against my cube, I'm finding thousands of query subcube events against an unexpected , I assume it's a partition.

Even for the simplest possible query SELECT FROM <CUBE>, which for this cube would return the measure [MRN Distinct Count], a trace reveals 35,000 query subcube events against a partition (?) called "<server>.Medical Home.MedHome.Lab Orders With Results" which is NOT the partition that holds that [MRN Distinct Count] measure.

I can't figure out why this object is being queried so many times for queries completely unrelated to it.  I believe this performance degradation is somewhat new...so I have been trying to think of what may have been added to the cube recently.

I recently added KPIs and calculated sets & members that DO draw from that Lab Orders With Results object...would calculated members or KPI's cause this kind of problem? I thought that they were all pre-calculated @ processing?

Thanks for any insight you can provide

Here's a summary of the profiler trace on the query SELECT FROM <CUBE>

Event Desc# of EventsObjectPathDuration
Query Begin1NULL0
Query Cube Begin1<server>.Medical Home.MedHome0
Query Subcube Verbose11<server>.Medical Home.MedHome.Fact Dx 2189
Query Dimension7<server>.Medical Home.Dim Person0
Query Subcube Verbose35650<server>.Medical Home.MedHome.Lab Orders With Results13856
Serialize Results Begin1<server>.Medical Home.MedHome0
Serialize Results Current4<server>.Medical Home.MedHome0
Query Subcube Verbose5<server>.Medical Home.MedHome.Dim Person0
Serialize Results Current1<server>.Medical Home.MedHome0
Serialize Results End1<server>.Medical Home.MedHome0
Query Cube End1<server>.Medical Home.MedHome40919
Query End1NULL41059


Paul


SQL 2012, SSAS Properties Estimate Size off by 80%

$
0
0

Wondering if someone else has had the same problem.

In SSMS 2012 on a SQL 2012 installation, the properties and reports for my SSAS database is showing 4gigs in estimated size. The total .db folder has 20gigs of data. I'm pretty certain that the cube itself is 20gigs and not 4gigs given how much data has been loaded into it.

I know that the sizing is estimated, but 80% off?

Date Format is different in Prod and test environments.

$
0
0

Hi All,

 

I have three servers(PROD,TEST and Dev) for SSAS.I have same code base in all of the three environments.

I have an Attribute called "Expiry Date" in a dimension called "Dim1" and this dimension is not a time dimension.

In TEST and Dev environments, "Expiry Date " is shown in dd/MM/yyyy (English UK)  Format and in PROD "Expiry Date" is shown in M/d/yyyy (English US) . But I need dd/MM/yyyy format in all the environments. How can I achieve it ?

Is the date format setting done on server level properties?

Please help.

Thanks in Advance.

VB


MSBI Developer

Processed cube sees no changes, but new data have been inserted..

$
0
0

Simple AdwWorks cube has time dimension with years range from 2000-th to 2007-th. Fact data exists for 2001-2006. 2000-th and 2007-th are empty.  Ok. 

I'm insert new data to source fact table for 2001-th  and process the cube. All changes immediately reflect in measure value (it grows). But new data for 2000-th don't reflect in measure value growing .  Nevertheless, during cube processing SSAS sees new rows for both cases (the value grows), and sql profiler catches equal batches of commands for  2001-th and 2000-th. But measure value grows only for 2001-th.

I've clear mdx-script - it contains now only calculate command. Now there is:

a) select sum(measure value) on fact tables in source database reflect new rows  for both cases

b) cube processing sees changes for both cases

c) mdx-script is clear (there are no scopes, witch can set measure value to null )

d) select [sales amount] for cube reflect this changes only for 2001-th, not for 2000-th

Any suggestions?

===========

One day later.. :)

The problem seems as resolved, but... I don't know: is it tech and/or logic feature or bug..

So, what is happened.. Simple mdx query:

select [sales amount] on 0,
[some date from 2000] on 1
from [cube]

gives null value for [sales amount], but for [some date from 2001] value is not empty. In database fact table both values (results of sum(salesamount) for both dates) are not empty. After research i found that there was one measure ([Temp]) in the [sales amount] measure group for which MeasureExpression was set to [sales amount]*[average rate] ([average rate] - measure from [Fact Currency Rate] measure group). Fact table for [Fact Currency Rate] measure group didn't contain data for 2000-th. I've insert it and - vualya - all work and for 2000-th now. Main question is: why ssas calculate MeasureExpression formulas for measures, which I'm not request in a query, and why ssas set requested by me value to null, if it does not depend from formula of MeasureExpression property of unrequested measure? Is it bug or "defense from fool"?. There is another sample of such strange ssas behaviour. I mean usage of UnaryOperatorColumn property. If it is set for any attribute of any dimension, then it influences on every query, even if this attribute not is a part of this query. For example

select [sales amount] on 0
from [cube]

returns different results, which depends by setting of UnaryOperatorColumn for some dimension attribute.. What all it mean?







SSAS Date Dimension attribute not displaying all members when browsed singly

$
0
0

I have an SSAS Cube database that holds data from 2009 to 2013 (5 years)

There is a Date Dimension in the database which holds a "Calender Period" Hierarchy with the attributes CalenderYear >> Quarter >> MonthYear >> Day .

I am connecting to the cube via Microsot EXCEL

Whenever i try to browse this hierarchy alone in the spread sheet, the first attribute as per the hierarchy shown above i.e. Calender Year does not display all the members, that is confusing the users to assume that the cube is not processed with the latest data, which is not the case. However as soon as i try to browse any measure with this dimension, the data automatically shows for the latest dates of 2013 as per the expectations.

The perspective that is selected while connecting to the Cube in this case is the one that is by default the one including all the Cube Objects.

Whenever i try to browse the same cube for the same Dimension Hierarchy but in a separate user perspective i get the latest three Calender Years i.e. 2011,2012 and 2013 but not the complete years 2009 to 2013.

When i was browsing this earlier by the original base perspective (which has all the cube objects visible) the Calender Years displayed were 2009,2010,2011&2012 but not 2013 which should be there.

I checked the base view in the DB that is used to create this Dimension, that is fetching the complete data for 2009 to 2013.

I have also verified that this issue is still there if i try to browse the cube from the SSMS.

Can anyone help me to get all the years from 2009 to 2013 (the years for which my cube has data) become visible as soon as i drop it alone into the Spreadsheet?

Thanks 

Suvrat

[MDX] How to cumpute a percentil (Calculated Member)

$
0
0

Let's say for a given dataset i want to calculate the percentile 0.75 this is:

Android 15
Android 9
Android 8
Android 6
Android 6
Android 5
Android 3
Android 2
iPhone 12
iPhone 10
iPhone 9
iPhone 6

Sorted by value

Android 15
iPhone 12
iPhone 10
Android 9
iPhone 9
Android 8
iPhone 6
Android 6
Android 6
Android 5
Android 3
Android 2

The percentile 0.75 for the given set is:

Andoid : 8 (index 6 of Android)
iPhone : 10 (index 3 of iPhone)
Grand Total : 9 (index 9 of all)

Now the thing is, how to compute this with a MDX query to insert on a Calculated Member (and to deploy on the cube)?

On SQL I would do the following:

1) create a set by selecting the elements the values with valid values (in my case exclude nulls)

2) Sort the set by value

3) count the set size

4) get the index of the tuple i want by multiplying the count by the percentile

5) retrieve the tuple and present the value.

How do I do this on MDX?

SSAS Error - Measure xxxxx The source is not specified.

$
0
0

Hi there,

I've imported a SSAS via BIDS, but when I tried to build it, I'm getting "Measure [MSP_Portfolio_Analyzer].[Assignment Timephased].[Cost] : The source is not specified.". Any clue what I did wrong when I import the SSAS?






Thanks in advance!

 

Joe

MDX coding

$
0
0

I want to compare the value between the syntax code "userName()" and STRToMember("[xxxx].[Username].&[" + UserName() + "]") in SSAS:s calculation, inside of a calculated member.

Unfortunately, I get error message. How should I write the code to make comparision.


IIF
(    
userName() = STRToMember("[xxxx].[Username].&[" + UserName() + "]"),    
"yes",    
"No"
)




Custom ADO.NET implementation for Analysis Services

$
0
0

Hello, I need help on guidelines implementing custom ADO.NET data provider and connecting it with BIDS. While the first part is rather straightforward and documented, I'm struggling a lot with second.

I am able to successfully:

  • provide all needed classes needed for implementation of DbProviderFactory
  • register provider in machine.config
  • access provider from BIDS and create my custom data source
  • attach to BIDS and debug my classes while they are invoked during initialization, etc

I'm partially successful in creating data source view by:

  • Implementing IDbSchema (Microsoft.DataWarehouse.Design - which seems fishy a bit, cause i'm referencing private assemblies)
  • Modifying sql2000.xsl cartridge and adding my own schema there (which is bad, cause I should create my own cartridge - but I'm struggling there)

I'm totally failing to move any further to:

  • change a data source for Cube with custom query, which would validate and execute against my own data provider with non sql-like syntax (e.g. "schema.info.file;/data.folder/data.subfolder")
  • i'm not sure im on the right path to use proper base classes
  • find any additional information on the subject

We're using:

  • SQL Server 2008 R2 Analysis Services
  • SQL Server BIDS 2008

Difficult to filtrate the user Dimension table

$
0
0

I have dimension table, named user, and fact table. I want to filtrate that right user can review right value from the fact table based on user's windows authenication. You use the WA to filtrate the dimension table.

I have used the syntax code "{STRTOMEMBER("[xxxxx].[xxxxxx].&[" + Username() + "]")}" at the textbox "Allowed member set". (Picture 1).

Unfortunately, the value in fact table is not working.

Do you guys have a better solution?

SSAS tabular: how to get a value from a dimension for a distinct(ly) counted value from a fact?

$
0
0

Am new to DAX. I have the following query. I have 2 tables viz:

Invoice

InvoiceNumber   varchar(8)

InvoiceDate     date

ContainerNumber varchar(11)

Amount          decimal

InvoiceNumber    InvoiceDate     ContainerNumber     Amount

I1               2013-04-01      C1                  100

I2               2013-04-05      C2                  200

I3               2013-04-15      C1                  50

I4               2020-04-21      C2                  25

I5               2013-04-29      C1                  150

Container

ContainerNumber   varchar(11)

Weight            smallint

Table-Container

ContainerNumber   Weight(MT)

C1                2

C2                3

C3                4

  1. There could be multiple invoices for a ContainerNumber. Hence the container number would repeat and the Container table gives the weight for each container.
  2. One could assume that the container number will not have an invoice in another month.

I want a report that gives the following:

Month         No.of Cont.       Total Amount      Weight

Apr 2013         2 (*)                525                  5 MT (^) 

BUT it gives me the following which has wrong weight.

Apr 2013         2 (*)                525                  9 MT (^) 

(*) - list of distinct containers (^) - this should get counted only for the distinct list of containers, but it gives the total of the weight for all containers from the dimension.

(if you wish, I have an excel file using powerpivot where I have this example that I can send)

How can this be implemented? Any help would be appreciated.  Thanks in advance,

Rajeev Shah

cant connect to SSAS using SQLPS: WARNING: A connection cannot be made. Ensure that the server is running.

$
0
0

Hi,

I cant connect to a remote my SSAS instances using the SQLPS (powershell) tool.

I open the sqlps tool

I type

cd sqlas

cd OLAPServer

I receive this:

WARNING: A connection cannot be made. Ensure that the server is running.

but...

[System.Reflection.Assembly]::LoadWithPartialName( "Microsoft.AnalysisServices")

 $server = new-object Microsoft.AnalysisServices.Server

$server.Connect("Data source=OLAPServer")

I can access other OLAP servers on the network. using the SQLPS tool but not this one.

This server is in cluster and the SQL Browser running, but not associated to the cluster for now.

I try different connection strings (IP address, dns name netbios name, cluster name etc...) nothing works. The target instance is the defautl instance.

so if the native connection work but not the PSProvider, what can I do?

is it possible to connect the PSProvider differently? (so an explicit connection rather than cd CD Server\instance)

Thanks for your help!

No Data when doing multiple selection of sub-brand in the cube

$
0
0

 

Hey everyone.
I am having a very strange situation.
No Data when doing multiple selection cube.
The thing is that the situation is created only in the transition between the servers, who have a different Build but both of them are SQL 2008R2 servers.
The Build of one of them is 10.50.2789.0 and the other one is 10.50.4000.0 (SP2).
The other properties of the cube are the same, it's Not possible to retrieve data from the cube on the server with the "SP2 when we  the slicing is at the level of sub-brand and removed even one item  mean we passed a multiple selection ,
This is possible only if we connect the cube as Admin .
While the server with the older "Build" the problem to perform the above operation when connected as a user not exist.
What can cause this problem,and how can we fix it?

thank's a lot.

Analysis Service started then stopped

$
0
0

I installed SQL Server 2005 Developer Edition.  I've also installed SP 1 and 2.    I never needed Analysis services before but now b/c of an install of TFS, I need Analysis services.   I cannot start Analysis Services.  The message box states: The SQL Server Analysis Services (MSSQLSERVER) service on Local Computer started and then stopped.     I looked in the log files located at: C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Log and found these entries:

 

msmdsrv.log:

 
( 9 / 2 / 2 0 0 9   1 0 : 5 2 : 1 3   A M )   M e s s a g e :   T h e   s e r v i c e   c a n n o t   b e   s t a r t e d :   X M L   p a r s i n g   f a i l e d   a t   l i n e   1 ,   c o l u m n   1 :   I n c o r r e c t   d o c u m e n t   s y n t a x . 
( S o u r c e :   \ \ ? \ C : \ P r o g r a m   F i l e s \ M i c r o s o f t   S Q L   S e r v e r \ M S S Q L . 2 \ O L A P \ L o g \ m s m d s r v . l o g ,   T y p e :   3 ,   C a t e g o r y :   2 8 9 ,   E v e n t   I D :   0 x C 1 2 1 0 0 0 0 ) 
 
( 9 / 2 / 2 0 0 9   1 0 : 5 2 : 1 3   A M )   M e s s a g e :   S e r v i c e   s t o p p e d .   ( S o u r c e :   \ \ ? \ C : \ P r o g r a m   F i l e s \ M i c r o s o f t   S Q L   S e r v e r \ M S S Q L . 2 \ O L A P \ L o g \ m s m d s r v . l o g ,   T y p e :   1 ,   C a t e g o r y :   2 8 9 ,   E v e n t   I D :   0 x 4 1 2 1 0 0 0 1 )
 
I've searched for the error on the Internet but have gotten really nothing explaining the problem.  I've changed the service start credentials from local system to local administrator.  I've read a similar problem on this forum but with somewhat of a different error message.  I've tried to start Analysis from command line.   I've reinstalled SP2.  Does anyone have any ideas?
Thanks much,
Kristi

 

SSAS Calculated Members

$
0
0

Hi,

I have the below case where I need to have sum of sales with respect to product as shown below.

I have 3 dimension, selection any of which the Sum sales columns should give the total sales for each product. This formula should be applicable even if two dimensions are selected.

Greatly Appreciate if anyone helps me with deriving this mdx formula.

Thanks in advance,

Paddy


Cube procssing: XML for Analysis parser: The commit or rollback request cannot be completed because there is no active transaction in this session.Code: 0xC0047018

$
0
0

while processing (full, update,increment) cube from the bids am getting following errors

Am using 2008 R2, it processing fine if i do it from SSMS

Processing" (142) failed with error code 0x80004005 while processing input "AnalysisServicesServerInput" (143). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.  End Error  Error: 2013-12-24 05:57:38.07     Code: 0xC113000A     Source: Process xyz Dim (Incremental) Dimension Processing [16]     Description: Parser: An error occurred during pipeline processing.  End Error  Error: 2013-12-24 05:57:38.08     Code: 0xC113000A     Source: Process xyz Dim (Incremental) Dimension Processing [16]     Description: Errors in the metadata manager. The process type specified for the xyz Dim dimension is not valid since it is not processed.  End Error  Error: 2013-12-24 05:57:38.08     Code: 0xC0047022     Source: Process xyz Dim (Incremental) SSIS.Pipeline     Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Dimension Processing" (16) failed with error code 0x80004005 while processing input "AnalysisServicesServerInput" (17). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.  End Error  Error: 2013-12-24 05:57:38.08     Code: 0xC113000A     Source:xyz Dim (Incremental) Dimension Processing [142]     Description: XML for Analysis parser: The commit or rollback request cannot be completed because there is no active transaction in this session.  Code: 0xC02090F5     Source: Process Url Dim (Incremental) ADO NET Source [49]     Description: The component "ADO NET Source" (49) was unable to process the data. Exception from HRESULT: 0xC0047020  End Error  Error: 2013-12-24 05:57:38.10     Code: 0xC0047038     Source: Process xyz Dim (Incremental) SSIS.Pipeline     Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "ADO NET Source" (49) returned error code 0xC02090F5.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.  End Error  Error: 2013-12-24 05:57:38.10     Code: 0xC113000A     Source: Process xyz Dim (Incremental) Dimension Processing [16]     Description: XML for Analysis parser: The commit or rollback request cannot be completed because there is no active transaction in this session.  End Error  Error: 2013-12-24 05:57:38.10     Code: 0xC0047018     Source: Process Url Dim (Incremental) SSIS.Pipeline     Description: component "Dimension Processing" (16) failed the post-execute phase and returned error code 0x80004005.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  5:57:37 AM  Finished: 5:57:38 AM  Elapsed:  1.28 seconds.  The package execution failed

Thanks in advance


Pavan K

Query Analysis Services DMV (DISCOVER_LOCKS) with OPENQUERY SQL Server 2012

$
0
0

Hi, I'm having trouble with a specific DMV, $SYSTEM.DISCOVER_LOCKS, while querying it using T-SQL OPENQUERY.

For example, this query will run just fine:

select * from openquery(OLAP_SERVER, 'SELECT * FROM $SYSTEM.DISCOVER_CONNECTIONS')

But when I try:

select * from openquery(OLAP_SERVER, 'SELECT * FROM $SYSTEM.DISCOVER_LOCKS')

I get the following error:

OLE DB provider "MSOLAP" for linked server "OLAP_SERVER" returned message "Internal error: An unexpected error occurred in conversion.".
OLE DB provider "MSOLAP" for linked server "OLAP_SERVER" returned message "An error occurred while parsing the 'C5' element at line , column  ('urn:schemas-microsoft-com:xml-analysis:rowset' namespace) under Envelope/Body/ExecuteResponse/return/root/row/(any).".
Msg 7320, Level 16, State 2, Line 3
Cannot execute the query "SELECT * FROM $SYSTEM.DISCOVER_LOCKS" against OLE DB provider "MSOLAP" for linked server "OLAP_SERVER". 

Similar problems [*] were present on SQL Server 2008, but the author obviously managed to execute queries to all DMV-s. Could the linked server properties play a role in this?

[*] I am not able to post links or images at the moment until my account is verified, but I was referring to an article by Vidas Matelis, "SSAS 2008 DMVs – querying from the SQL Server and database diagrams"

regard many to many dimension .

$
0
0

 I have already set many to many relationship.

the fact table is sale table  (orderid , price)

orderid  price

--------------------------

01      4

02      5

the dimenion table is (orderid ,name)    the  data as below

orderid  name

-----------------------

01      jack

01      tom

but i would add other district  table

name   country   city    ...

----------------------------

jack   usa      New york   ...

tom  canada  Ottawa    ...

=====================================

i know we can use many to many relation to aggretive the orderid in people dimension . but now the district dimension has snow-type relationship on people dimension .

How to set the relation between the facttable and district dimension.  i try to use the reference relationship among them,but i seem it can't do that. i want to use city or country level to aggretive the value.


Hope is a good thing.Maybe the best of things

% of Total, no hierarchy

$
0
0

I'm trying to create a calculated measure showing % of Total Net Sales, something like Rank or TopCount but showing % Value. I tried "parent"  but since I do not have hierarchy in the dimension , it gave 100% for every dim value.

a - how to do it for a certain dimension (say Vendor) that does not Hierarchy, just has "[Vendor Name]"?

b - can this calculated Measure be done/ created on Net Sales but run for all/any dimension?


Related column of a fact table - SSAS Tabular

$
0
0

Hi,

I'm developing a SSAS Tabular model using a SQL Server 2012 SP 1 installation.

For a fact table I've created some calculated columns using the DAX RELATED function. These columns not are hidden to client tools. When I deploy the project and I open an Excel workbook in order to connect the SSAS Tabular cube, in the field list I cannot see the calculated columns by RELATED function.

For me, this in an issue and not a normal behaviour.

Any suggests to me, please? Many thanks

Viewing all 14337 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>