.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

CREATE GLOBAL CUBE statement - losing hierarchies due to slicing

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :Sql Server
Hi,   I have a SSAS cube from which I generate local cubes with the MDX statement below:   CREATE GLOBAL CUBE MyLocalCube   storage 'MyLocalCube.cub'   FROM [MyCube]  (          MEASURE [MyCube].[Measure1],          MEASURE [MyCube].[Measure2],           DIMENSION [MyCube].[Dimension1],          DIMENSION [MyCube].[Dimension2]          (             LEVEL [HLevel1],                     LEVEL [HLevel2],                     LEVEL [HLevel3],             MEMBER [Dimension2].[Hierarchy1].[HLevel2].&[MemberX]       ),         DIMENSION [MyCube].[Dimension3]  )   The problem is that this statement generates a local cube file which works fine but all other hierarchies defined in Dimension2 are not included. I cannot find the syntax for adding them manually. So, in other w

View Complete Post

More Related Resource Links

Errors attempting to process SSAS Cube. I get Either user does not have permission to create a new o

Hi All, One of my production server deployed cubes i am not able to process the cube.When i tried to process the cubes i will get an Error: TITLE: Microsoft SQL Server Management Studio ------------------------------ Either the 'NA\gsad478' user does not have permission to create a new object in 'JNJAUSYSVR01', or the object does not exist.  (Microsoft.AnalysisServices)   Over the source server i do have sysadmin access and also  i have added read only role of particular cube. I right click on the database and tried to create new database of SSAS that also thrown with same error. Please help me in this regard.   Thanks, Gangadhar

Create Statement and Collation

I have DTS which includes a step to create table: CREATE TABLE [contracts] (             [ContractId] [varchar] (10) NOT NULL ,             [ClientId] [varchar] (10)   NOT NULL ,             [contract_nm] [varchar] (50)  NULL ,             [CreditLimit] [money] NOT NULL ,             [prod_cd] [varchar] (2)  NOT NULL ,             [DateOpened] [datetime]  NOT NULL ,             [interestfree_period] [int] NOT NULL ,             [DateFirstPayment] [datetime] NULL , … However, if I examine the table using sp_help after it is created the ContractId field has collation specified against it. [ContractId] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , Why is collation specified against the ContractId field when I have not specified it in the create statement in the DTS? Thanks in advanceA SQL Server DBA Wannabe

create a calculated member in a cube in SSAS

Hello   I’m trying to create a calculated member in a cube in SSAS and was hoping someone could help.   What I’m looking to do is count the number of occurrences of a value in a field.  I have Status field that contains New, Renewals and Enquiries and another field that contains a count, the problem I have and the reason for this query is the count is set to 0 for Enquiries.   The tSQL equivalent would be something like...   Select Date, Status , count(Status) From aTable Where Status = ‘ENQ’   And to summarise, what I’m looking to do would look something like the below   Date Status Count Commission Apr-10 NEW 1 100 May-10 NEW 1 100 May-10 REN 1 50 Apr-10 ENQ 0 0 May-10 ENQ 0 0 Jun-10 REN 1 50 May-10 NEW 1 100 Just looking at the ENQ by month. Date Count of ENQ     Apr-10 1     May-10 1     Jun-10 0       Any help gratefully received.

can create table statement be used in and ssis expresssion?

I need to modify the preparation sql task built by the import wizard. I wanted to create an expression  using the create table sql but insert the variable to append the date and another descriptor  to make it dynamic. The source is Excel The expression would look something like this "Create Table" + @user::descriptor +  @user::todaysdate+" ( name varchar(50) ..........." SSIS cannot evaluate the sql although it runs fine in ssms The column mappings will always be the same but the table name needs to be dynamic

Improving performance of UPDATE CUBE by executing preceding CREATE CACHE for the same cell / subcube

Hi All, Recently I came across one of suggestions by Microsoft Advisory consultant regarding optimization data write-back pattern for the SSAS cubes. It was recommended issuing CREATE CACHE command following by UPDATE CUBE for the same cell/subcube definition: CREATE CACHE FOR [MYCUBE] AS ("Cross join of all the dimension members defining subcube to be updated") UPDATE CUBE [MYCUBE] SET ("Cell") = 100, ("Another Cell") = 200,... etc. for every cell. This seems quite weird, but based on our benchmark the entire process (CREATE CACHE and UPDATE CUBE) takes less time than just UPDATE CACHE. Folks, can someone advice on the insights of the process? Shell this approach to be suggested for an enterprise-level planning application? Regards, -h

How to avoid "'CREATE VIEW' must be the first statement in a query batch" when I need to use SET Q

I have a problem that I have been unable to solve.  I have a stored procedure in a database on server A that needs to create an indexed view in a database on server B.  (The environment is SQL Server 2005.)  The procedure on server A does the following:  (The EXEC statement inside the quotes is really a variable in my procedure, I've just substituted the value to make the example understandable.) EXEC sp_executesql 'EXEC [ServerB].[Database].dbo.sp_executesql @sqlStatement;' The "outer" sp_executesql causes the "inner" sp_executesql to be execute within the database on server B.  (@sqlStatement contains the CREATE VIEW syntax.)  I am able to create the view that I want to index with no problem.  However, when I attempt to create an index on the view in a subsequent step, it fails with the message "Cannot create index. Object '_dta_mv_51' was created with the following SET options off: 'QUOTED_IDENTIFIER'".  Fair enough, but if I attempt to precede my CREATE VIEW statement with the required QUOTED_IDENTIFIER, I receive an error to the effect that "'CREATE VIEW' must be the first statement in a query batch".  I'm not sure how to get around this problem.  Does anyone have the answer? SQL Server 2008 doesn't object to indexing a view that was created with QUOTED_IDENTIFIER

Cannot create offline cube in Excel via http



we have an Analysis Server and it is accessible via http and that is all working fine, but if you try to create an offline cube on a PC which is not located in our company network it ends up every time in a failure like "OLE DB Error:...The specified host is unknown. .; either can not connect to the server..."

Any ideas? It seems so to me that for creating the offline cube, the connection string is broken or something like that...



How can i create this SQL Statement



I have a database and i need to get some reports from it

table name is newatt

table content


Sname              Time             Date   

    x                  08:30            24/4/2010

    x                  10:30            24/4/2010

    x                  11:30            24/4/2010

    y                  12:00            24/4/2010

    x                 05:00              24/4/2010

    y   &nbs

How to create global list in SharePoint 2010


Hello All,

I want to create global list which can be acessible to all the sub-sites in the SharePoint



----- Site 1

------------Site 1.1

------ Site 2

-------------Site 2.1

And so on,

I want to create list in which I can insert an item from any of the site from my site collection.

How to create sub-menu in Global-Navigation ?

i want to create sub-menu for my sharepoint site like :

MainMenu > SubMenu > LinkSample1 .... LinkSamplen

assumming we have two Heading (MainMenu and SubMenu) and multiple link (like LinkSample1). i want place SubMenu underneath of MainMenu to accomplish this, but Headings can not place underneath of another Heading.
can anybody help me to workaround this problem ?
this is my Signature

How to create global object and let everybody use it and several questions


i want to create a global object and my all users should be using it


here comes several questions


my web server is working like a web farm

there is hosted only 1 website but it has 12 w3wp.exe 

my session state is aspnet_state


so if i use global object how many times will it be created

i mean how does this thing works


also all users will be excessively accessing this object

would this cause problem ?


and how can i create this object and use it


also can this object be hash table


thank you

SSIS 2005 - Dynamically generate create table statement from source



I have a requirement where i had to migrate the table structure and data from ODBC database to SQL Server. I have dynamic source reader that uses sql query from variable to get the data and the next step is to get the create statement and create table and then to insert data. how can i get Create Statement the destination produces and use sql task to create the table and then insert the data using data flow task.

Please suggest



Select statement with two group level to create addtional field.


Here is an example of my question

I have  a column called Department, a column called Employee Name and a column called EmployeeAbsent.

Obviously i can easily use a select satement to get each employee's absent status. However, I would like to generate an additional field called DepartmentAbsent to see if anyone in a particular depart is absent based on the EmployeeAbset field.

how should I write the query?

create and open global database connection object


Hi to everyone:

I`m trying to install the allinta cms software www.allinta.com, I have already create a MySQL Data Base, but when I try to launch my cmsadmin I t appears an error

Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'dbConnectionStr'

/cmsadmin/inc/db_connection.asp, line 75

IT  seems to be the Object Connection, could somebody help me to give the right code instruction please, I don´t have an idea on how to make it.

At this moment I opened in dreamweaver and it´s

Set objConn = Server.CreateObject("ADODB.Connection")

create calculation sas cube


how do write calcuation in ssas for caculated columns, here's syntax i have sql..

select (BIRTH_DT from dbo.HM_MEMBERSHIP

where (datediff(year,BIRTH_DT,GETDATE())) between  30  and 39

How to create and use both local and global resource file in a page in VB.NET?


Hi all,


    I need to create both local and global resource file in VB.NET. And also i need to use both resource file in a single page. Please help me how to create and use in VB.NET (VS2008).


Create a 12 place decimal value in a select statement

I am needing to create a 12 place decimal field in sql2005 using a select statement.  I can do select 999999999.99 as 'Amount' but I really don't want the 9's.  Any idea how this can be done without creating the 9's? 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend