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

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

How to create call statement as object in SSAS

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :Sql Server

Hi Experts,

                 Any one please tell me how to create as object or attribute for the below Call statement.

Otherwise please guide me how to use the below statement in SSAS.

call SQLQuery.ExecuteSql(
    "Provider=SQLNCLI10.1;Data Source=DWHSRV01;Integrated Security=SSPI;Initial Catalog=Banking"
    ,"Exec Key 1")




View Complete Post

More Related Resource Links

Call Statement in SSAS calculation


Hi Experts,

 Any one pls tel me how to use the following statement in SSAS calculations

call SQLQuery.ExecuteSql(
    "Provider=SQLNCLI10.1;Data Source=TMDEVDWHSRV01;Integrated Security=SSPI;Initial Catalog=BankingDWHStg"
    ,"Exec DecryptPANKey 1")


While i use the above statement in SSAS calculated member it is showing error as

"MdxScript(Dax Data Mart) (8, 5) Parser: The syntax for 'call' is incorrect."

Or tell me how to use the above statement in SSAS Calculations or in Named query

Pls help me to solve the issue.




Create COM object from ProgID in a separate domain

Hi, How should I create COM object from ProgID in a separate app. domain? After I created corresponding Type object by means of Type.GetTypeFromProgID, I cannot use neither Activator.CreateInstance nor <MySeparateAppDomain>.CreateInstance because both require assembly name as one of the arguments... but as I said before I have no RCW assembly - just a ProgID. Those Activator.CreateInstance overloads which have argument of AppDomain type do not accept argument of Type type, only argument "assembly name" (of String type). And neither of <MySeparateAppDomain>.CreateInstance overloads accept argument of Type type (all require assembly name and type name). Any ideas?!

Proxy failed to create remote object on the server

Hi, I am using .net remoting for inter-process communication between two processes on the same machine 1.   The first process is one of the Office application: Ecxel /   Word /   PP 2.   The other process is another application that interacts with one of the above. For that it needs office application object. For example: Excel The solution is comprised with 3 projects: Project #1: The remote object is a simple Called RemoteOfficeApplication – that simply wraps the required application object (Word / Excel / PP).   Project #2: The Server is a simple Office add-in, written with a Visual Studio Extensibility -> Shared project. This add-in is instantiated whenever Excel is lunched. This project reference project #1. Code: var channel = new TcpChannel (5003); ChannelServices.RegisterChannel(channel,true ); RemotingConfiguration.RegisterWellKnownServiceType( typeof (RemoteOfficeApplication.RemoteOfficeApplication ), “AppObj”, WellKnownObjectMode .Singleton);   Project #3: The Client is the process that requires the application object. This project also reference project #1. Code:   //Get Remote object proxy object remoteAppObject = Activator.GetObject(typeof(RemoteOfficeApplication.RemoteOfficeApplication), “tcp://localhost:5003/AppObj" ); //Cast the proxy var r

How to create an extremely large array/object (> 2 GB) without using jagged arrays ?

Hello,I had implemented a matrix scaling algorithm in Java (64-bit) for a university project and have now implemented the code in C# with .NET 3.5 64-bit. One of the operations I did in Java was creating a rectangular array with double[][] = ... (in C# this is a jagged array!) to store a symmetric matrix which is used as input for the algorithm. Since I was using matrices with n up to 30720, memory usage for the single matrix object was around 8 GB in it's maximum and with matrix multiplication around 20 GB.So... now I implemented this in C# and I am shocked to see that double[,] (rectangular arrays) can only be 2 GB in size even on 64-bit! That means that for matrices with n larger than ~15000 I will get OutOfMemory Exceptions although there is a huge amount of free memory (I have two quad core systems with 12 GB and 24 GB Ram). When I use jagged arrays in C# (i.e. double[][]) I can create larger matrices. That is because I have one small array with the size of the row number (i.e. n) and then for each row an array of size n, but they are all single objects so I don't reach the 2 GB per object limit. The problem with jagged arrays is that they are horribly slow for matrice calculations compared to rectangular arrays and even slower compared to single dimension arrays.Actually I intended to rewrite my code and simulate the matrices in single arrays (see sample code below) bec

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

How to create Object in Object Test Bench

Hi,I used Object Test Bench to test my classes in VS 2008 professional edition . Right click on Class name and then selected create instance ,then its Constructor, there comes a dialog box, that just gives a message and a TextBox field is present there, i filled that field with any name and clicked OK.Then error message comes that "Create Instance Failed" and its error code is "0x80004005" . What's this ? How to instantiate object of my classes ?

How to Create SiteCollection through SharePoint Object Model?

hi all, i want to create site collection through programmatically. i used below code but iam getting error as "object reference not set to instance of an object"   SPSite site = new SPSite("http://servername:7833/");   SPWebApplication oweb = site.WebApplication;   SPSiteCollection sitecol = oweb.Sites; sitecol.Add( "sites/sitename", "sitename", "welcome to site collection", 1033, "STS#0", "Domian\\user", "User Display name", "user mailID"); oweb.Update();   iam getting an error at sitecol.add line the error is "Object reference not set to an instance of an object". please suggest me in order to remove the error. please suggest me if is there any other way to create site collection through programmatically. thanks in advance..

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.

Get xhr object in vb.net when error occured in ajax call using JQuery.

Hi Dude,   I have a big problem in Jquery ajax call. I am calling the web service whenever click the update button. I have a separate web service class, in which consist of few methods. When I calling the web service method, I have made the error handling and log the error information in db after that I have to override the "ex" that means error object to XMLHttpRequest. Is it possible to assign the sqlexception to ajax object (xhr) in vb.net? Please help me its much more useful for me.   Thank in advance.

CREATE GLOBAL CUBE statement - losing hierarchies due to slicing

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

Create a datetime object as dd/mm/yyyy

Hi i want to create a datetime object in the way dd/mm/yyyy but the defualt behaviour of datetime object is mm/dd/yyyy. I want this because my user enters date in dd/mm/yyyy format and i want to apply different additions and subtrations on this format. I know how to display dates in different formats. 

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

Cannot call Table Valued Function from Dynamic stored procedure statement

Hello,  I have a table-valued function that splits string into a table column. I can easily call this function from a stored procedure within a regular SELECT statement: SELECT * FROM Table1 WHERE Code1 = '1' AND Code2 IN(SELECT * FROM [dbo].[fnSplitValues](@Code2String))   However when I try to use the same logic for a dynamic SELECT statement: ‘SELECT * FROM Table1 WHERE Code1 = '1' AND Code2 IN(SELECT * FROM ' + [dbo].[fnSplitValues](@Code2String) + ')’ I get an error ‘Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fnSplitValues", or the name is ambiguous.’ Any idea what is wrong with my dynamic SQL?   Please help, Lana

How to call assembly in SSAS

Hi,   Any pls tell me how to call assembly in SSAS.   i want steps to call the assembly I want to write decryption logic in assembly. Then i want to call the assembly in SSAS. Please any one help to solve the issue. Thanks, Abdul2010    

Automation server can't create object

Automation server can't create object  I have this code working another server but not it stopped working  [CODE] <%@Language=JScript%> <% var mail = Server.CreateObject("CDONTS.NewMail"); mail.BodyFormat  = 0; mail.MailFormat  = 0; mail.ContentBase = ""; mail.To = "mZaragoza@xxx.com"; mail.From = "moisesz@xxx.com"; mail.Subject = "subject"; mail.Body = "tmpBody"; %> [/CODE] Error  Microsoft JScript runtime error '800a01ad'  Automation server can't create object  /app/test/mail3.asp, line 3  I have this code working another server but not it stopped working <%@Language=JScript%> <% var mail = Server.CreateObject("CDONTS.NewMail"); mail.BodyFormat = 0; mail.MailFormat = 0; mail.ContentBase = ""; mail.To = "mZaragoza@xxx.com"; mail.From = "moisesz@xxx.com"; mail.Subject = "subject"; mail.Body = "tmpBody"; %>Error Microsoft JScript runtime error '800a01ad' Automation server can't create object /app/test/mail3.asp, line 3 
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