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

Dynamic security in Cube having many to many relationship

$
0
0

I have multiple dimensions (around 20) and 4 fact tables in my cube.  I am implementing dynamic security in my cube, so only logged in user will see his information.


 I have a person dimension, which stores user information.

I have a shipper dimension , which stores shipper information.

Person dimension is connected to Fact table  A and Shipper is also connected to Fact table A.

Shipper Dimension is also connected to Fact Table B.

Now in dimension usage tab i connected Person dimension to FACT table B measure group using many to many relation via Fact Table A measure group.

I wrote below code block in Shipper dimension to implement security , under Dimension data tab -

exists ({[Shipper].[SHR Number].members},  strtoset("[Person].[Person number].[" + username() +"]"), "Fact Table A")

Its is working fine when  run it as mdx query, using select command. I can see all measures (both from fact A and fact B) based on my ID permisisons.

But the issue is when I browse cube, I can see only Fact Table A measures and NOT FACT B measure.

FACT B measures comes as NULL.

I referred below link -

http://bifuture.blogspot.com.au/2011/09/ssas-setup-dynamic-security-in-analysis.html

PLEASE HELP


file 'pcprocbinding.cpp', line 1028, function 'PCDBTableCollection::FindOptimizedColumn'

$
0
0

The cube was compiling ok.  I was using sql Server 2012  Standard.

I upgraded to Sql Server 2014 Standard.

 Now when compiling the cube, without any changes, I get this error :

Internal error: An unexpected error occurred (file 'pcprocbinding.cpp', line 1028, function 'PCDBTableCollection::FindOptimizedColumn').

Errors in the OLAP storage engine: An error occurred while processing the 'Fact Inventaire Sem Past Year' partition of the 'Fait Inventaire Semaine' measure group for the 'Canac DM Ventes Produits Semaine' cube from the CanacDMVentesCondense database.

How to create Future partitions in Cube based on hour basis

$
0
0

I have a fact table which directly fetches data from a View in Date mart.

I want to create partition on the fact table based on hourly basis , which means , 24 partitions every day.

So, the logic i want is -

1. Run the cube every sunday night.

2. Create future partitions for entire next week , means 24* 7 partitions.

3. This is done to avoid cube downtime everyday.

4. Next sunday when cube will run , last week partitions will flush and new next week partition will be created.

How to do it, based on systemdate ???

help in MDX query

$
0
0

Hi, I have a member called Accountnumber like:

45678
43214
23789
13489
56832
64230
50098

Now I want to select the memeber which starts with 4,5,6 can anyone let me know which function do i need to use it and how could be the syntax

Analysis Services failing to Start . File system error: Error occurred during the creation of directory

$
0
0

Hello All,

Posting this problem here and hoping for a solution from the experts in this forum.

When i have restarted the Analysis Services , i see that it has been stopped but never started back. It fails with an error

"The SQL Server Analysis Services (MSSQLSERVER) service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs."

When Checked the Event Viewer i see the following error -

The service cannot be started: The following system error occurred:  The filename, directory name, or volume label syntax is incorrect.  File system error: Error occurred during the creation of directory: '\\?\E:\OLAP\MSSOLAPFactory\OlapData;M:\Test Backup'.

I remember changing the BackupDir value of Analysis Services few days back, and i think it could have impacted. Can you please help me how can i change back the BackupDir value and have the server back?

Let me know if you need any more details


SG

how to read ssas cube and role from Excel vba through AMO

$
0
0

Hello,

Is it possible to read SSAS cube and role list from Excel vba through AMO. If Yes please share the details how to do that.

Thanks

Ganesh

error message about client's metadata is out of sync

$
0
0

after i programmatically add new cube partition using C# api and try to process the cube using db.Process function i get the following msg

"the client metadata is out of sync with the engine metadata. The Reference  returned by the enine is unknown in the client.

<object xmlns=...

<DatabaseID

<CubeID

<MeasureGroupID

<PartitionID

>

 

why would i get this message? i disconnect and reconnect to the cube programmitcally and it only disappers once i restart the app

Using Extract in MDX

$
0
0

Hi Team,

I have a requirement to

Get all the Prescriptions of the Doctors (Including other Products) who prescribed My Product.

Scenario

1. Below is prescription details, One Doctor Prescribed 3 products

PRESCRIPTION_KEY   DOCTOR_CODE   PRODUCT_CODE   PRODUCT_DESCRIPTION
80548777                  111010503607   111140                LEVOPAN
80548740                  111010503607   112395                PROTERA-L
80548430                  111010503607   142495                PAN-L
34352343                  111010726343   142495                PAN-L
63442543                  345787748749   894845                TEMPO

My Query (Get the potential Market for my Product LEVOPAN)

Steps  to get the Data

1. Get the All the doctors who prescribed my product (e.g. LEVOPAN)
a. In this example it should be Doctor Code - 111010503607

2. Get all the Prescriptions by that doctor,
a. It should bring No. of Prescriptions = 3 (80548777, 80548740, 80548430)

Dimensions

Product (Product Description)
Doctors (Doctor Code)

Measures Group

No. of Prescriptions

Input to MDX(CurrentMember of Product)

My Product LEVOPAN

My Queries are:

----This is to extract the doctors and their total prescriptions who prescribed my product.

WITH
SET [GHI] AS
EXTRACT((NONEMPTY(([DOCTORS].[Doctor CODE].[Doctor CODE].MEMBERS,[PRODUCT].[Product Description].&[PAN-L]),
[Measures].[Prescriptions])),[DOCTORS].[Doctor CODE])

MEMBER [MEASURES].[A] AS SUM([GHI],[Measures].[Prescriptions])
SELECT
{[Measures].[Prescriptions]} ON COLUMNS,
{[GHI]} ON ROWS
FROM
[MyCube]

----This is to extract Doctors who prescribed my product

SELECT
{[Measures].[Prescriptions] } ON COLUMNS,
{NONEMPTY([PRODUCT].[Product Description].&[PAN-L]*{[DOCTORS].[Doctor CODE].[Doctor CODE].MEMBERS})} ON ROWS
FROM
[MyCube]

Please help me on this scenario.


Error with exemple of create SUBCUBE Adventure Work

$
0
0

Hello,

I am trying to use subcube so i am using the code below from microsoft example but it give me error.

CREATE SUBCUBE [Adventure Works] AS

   SELECT [Geography].[Country].&[Canada] ON 0
   FROM [Adventure Works]

SELECT [Geography].[Country].[Country].MEMBERS ON 0
   FROM [Adventure Works]

Executing the query ...
Query (5, 1) Parser: The syntax for 'SELECT' is incorrect.
Execution complete

I am using Sql server 2012 standard edition.

All the best

Vincent

Dynamic security using Security table in SSAS Tabular model

$
0
0

Hi, 

Platform : SSAS Tabular model (VS 2010)

I need to apply Dynamic security using Security table(manually created) in Tabular model, Need to apply filter for 2 tables. I am able to create roles in Tabular model using USERNAME() and LOOKUP() function it worked fine. But the problem is when i am trying to give full access for a particular column and limit the access in other column, it is not working properly.

Please find below table and guide me where i am falling short. In the Security table wherever you find ALL it means full access.

Security table
Login NameDim_CountryDim_Customer
DOMAIN\User1ALL2User1 should see all countries but Only 2,4 Customers
DOMAIN\User1ALL4
DOMAIN\User22ALLUser2 should see all customers but Only 2,3 countries
DOMAIN\User23ALL
DOMAIN\User3ALLALLUser3 should see all Customers and Countries
DOMAIN\User413User4 should see 1 Country and 3 Customer
ALL - means NO restriction
Numeric values indicate the Dimension IDs

Do let me know if further explanations required.

Thanks,
Sundar

How to get CubeAttribute ID according to the CubeAttribute Name using AMO method?

$
0
0

Hi

I want to get the CubeAttribute  ID according to the CubeAttribute  Name using AMO method.

and I tried to use below scripts to get the CubeAttribute  ID

string DimensionID = cb.Dimensions.FindByName(DimensionName).ToString();
 CubeDimension dim = cb.Dimensions[DimensionID];

string Attribute_ID = dim.Attributes.FindByName(DimensionAttributeName).ToString();

But seems the CubeAttribute   don't contain the function FindByName,  So how can i get the ID value?

Any idea about this, thanks advance.

Distinct count of role-played dimension attribute

$
0
0

Needed distinct count of AccountGroup attribute of AccountB dimension which is a role played dimension of Account.

Added measure distinct count of the dimension attribute (AccountGroup). In dimension usage added the main fact table as intermediate for other dimensions with many2many relationships.

The two role played Account dimensions must be related to the new AccountFact table with fact relationship.

But then how will I be able to count distinct attribute of certain Account dimension (out of the two role played dimensions)???


Namnami

Dim General Ledger too big

$
0
0

Hi,

I am looking for a best practice with respect to create a Dimension for General Ledger. In my opinion this Dimension is a 1 to 1 copy of fact General Ledger since the user would like to see all attribute values of that Fact.

And there lies my problem because if I create this Dimension, the dimension holds the same amount of records of the fact General Ledger what makes it so slow to load.

Any input of best practices is very much appreciated.

Paul.


-Miracles are easy, the impossible takes a bit longer-

How to add sibling (new row) to writeback-enabled dimension in Excel 2013 Pivot table?

$
0
0

In Visual Studio cube browser we can add new value to dimension, if the dimension is writeback-enabled: right-click a dimension member and click "Writeback", then right-click a dimension member and click "Create Sibling".

Is there a way to perform similat task in Excel Pivot table? I found a way to edit cell value using What-if Analysis button. But I didn't find a way to add new value to a dimension from Excel.

Does anyone have any suggestions?

I use SQL Server 2012 Standart edition, and Excel 2013.

Regards,

Pavel

ERROR: KeyColumns #0 has NullProcessing set to 'UnknownMember', but dimension doesn't have UnknownMember set to Visible or Hidden

$
0
0

I think i've a technical problem in SSAS. I've this error message

Error 1 MeasureGroupAttribute [cube].[Measuregroup].[Dimension].[DimensionID] : The 'KeyColumns' #0 has NullProcessing set to 'UnknownMember', but the dimension doesn't have UnknownMember set to 'Visible' or 'Hidden'.  0 0 

 

When i look at the nullprocessing of the key dimensionId it's set to Automatic

 

I've set the unknownmember to None.

 

First i had a red squirrel (or how do you call this) because of the i've set the nullprocessing to unknown member. When i changd this to automatic the red squirrel disappeared but the error keeps returning when i press process cube.

 

If i ignore this error the cube is succesfully processed.....

 

Hennie

 

 


Define DimensionAttribute type in the SSAS CUBE when using MDX function YTD()

$
0
0

hi there:

  I am trying to use YTD() in mdx and am aware that I need to first define dimDate to Time type and define each dimensionAttribute to appropriate type. HOwever, I am very confused by the large amount of selections in the Type dropdown list.

For example, I have a dimenionAttribute called [S Week Of Year] and in the type, there are two sections Calendar and Fiscal under Date and each contains week type, which one should I choose? Also is there any reference where I could learn to pick the right type? 

 thanks


--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

Calculated member does not need cube to be reprocessed while script command does

$
0
0

HI there:

  In the cube Calculations Tab, when I create calculated member such as delta between this year sales and last year sales, I could see this measure right after saving. HOwever, when I add script (such as scope),something like below:

SCOPE  ([Datatool_Staples].[Calculation].[YTD]); 
     THIS = 
        AGGREGATE (
            YTD ([Checkoutdate].[Staples Fiscal Year Calendar].CurrentMember),
           [Datatool_Staples].[Calculation].[Real Value]
        ); 
END SCOPE; 

I have to reprocess the whole cube in order to see the results.

 My question: Is there anyway to avoid as it takes around 30 mins to have a full process on cube level

thanks

 Hui


--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

Mdx - Flag -Actual

$
0
0

I have two dimensions DimFlag and DimPNL and a fact table FactAmount . I am looking to : When pnl is stat(Is Stat=1) : sum (Actual x FlagId ) For pnl I multiply the amounts by field FlagId basically if it will be so 0 0 X = 0 ..

DimFlag

FlagId  FlagLabel
-----------------
1       NotClosed
0       IsClosed

DimPNL

PNLId  PNLName  Is Stat
1       a        1
2       test     1
3       test2    0

FactAmount

  id    PNLId     FlagId  Actual
  1      1        1        100
  2      2        1        10
  3      3        0        120

I tried the following MDX but it didn't work, any idea please ?

Scope (
        [Dim PNL].[PNL].members,[Measures].members     

);   


this = iif([Dim PNL].[PNL].CurrentMember.Properties("Is Stat") =1 
,
aggregate([Dim PNL].[PNL].currentmember,[Measures].currentmember)* iif([Dim Flag].[Flag Label].[Flag Label].currentmember = 0, 0, 1),
aggregate([Dim PNL].[PNL].currentmember,[Measures].currentmember)
);

Processing error when doing a drillthrough agianst a Rolap dimension, working with MOLAP

$
0
0

Hi,

I'm having a drillthrough dimension (fact) that i'm using for drillthrough scripts. One thing that I have come a cross is that I get processing errors when I run queries agianst a ROLAP dimension where as it works agianst the same dimension set as MOLAP. This is kind of confusing me.

The error message i get is like this one:

Errors in the OLAP storage engine: The process operation ended because the number of errors encountered during processing reached the defined limit of allowable errors for the operation.

Errors in the OLAP storage engine: An error occurred while the 'Journal NO' attribute of the 'GLFact' dimension from the 'XXX' database was being processed.

I found a article about this http://sqlblog.com/blogs/marco_russo/archive/2009/01/17/issues-executing-a-drillthrough-with-a-rolap-dimension.aspx

But I have set KeyDuplicate, Keynotfound, Nullkeyconvertedtounknown and NullKeynotallowed to ignoreerror and still it doesn't work.

So my questions are 2:
1. Do anyone have a solution for me? Or having any thoughts about this?
2. When switching over to MOLAP the processingtime takes about 30 min. How can i decrease this to a minimum?

This is all implemented in SSAS 2005.

Permission issue - unable to do anything

$
0
0

Hello,

When I connect through SSMS to Analysis Services I see one database. I try to script the database and I get an error

TITLE: Microsoft SQL Server Management Studio
------------------------------

The following system error occurred:  The referenced account is currently locked out and may not be logged on to.
Errors in the metadata manager. An error occurred when loading the State dimension, from the file, '\\?\D:\MSSQL\MSAS11.MSSQLSERVER\OLAP\Data\Customer.0.db\State.1.dim.xml'.
Errors in the metadata manager. An error occurred when loading the Customer cube, from the file, '\\?\D:\MSSQL\MSAS11.MSSQLSERVER\OLAP\Data\Customer.0.db\Customer.91.cub.xml'.
 (Microsoft.AnalysisServices)

------------------------------
BUTTONS:

OK
------------------------------

This database was created by a former employee. If I go to the domain controller Active Directory Users and Computers, open the user account for the former employee, I go to Account tab and I see "Unlock Account. This account is currently locked out on this Active Directory Domain Controller."

I check the box "Unlock Account", I press Apply, Ok.

If I try to right-click in SSMS Analysis Services on the database again to script it out I get the following error:

TITLE: Microsoft SQL Server Management Studio
------------------------------

The following system error occurred:  Logon failure: unknown user name or bad password.
Errors in the metadata manager. An error occurred when loading the State dimension, from the file, '\\?\D:\MSSQL\MSAS11.MSSQLSERVER\OLAP\Data\Customer.0.db\State.1.dim.xml'.
Errors in the metadata manager. An error occurred when loading the Customer cube, from the file, '\\?\D:\MSSQL\MSAS11.MSSQLSERVER\OLAP\Data\Customer.0.db\Customer.91.cub.xml'.
 (Microsoft.AnalysisServices)

------------------------------
BUTTONS:

OK
------------------------------

If I try to log in to Windows using a domain admin account, or the former employee's account, I run into the same errors.

If I try to create a new database I get errors too.

I am at a loss and I do not know what the issue is?

Does someone know what the problem is here?

Thank you.

Viewing all 14337 articles
Browse latest View live


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