open query in analysis service

  • when i want to execute the insert command with openquery i get this error :

    command:

    INSERT INTO MemberCard_Prediction_Structure (CustomerId, Gender, Age, Profession, Income, HouseOwner, MemberCard)

    OPENQUERY([testmining],'Select Customer_id, Gender, Age, Profession, Income, houseOwner,

    member_cart From testmining.dbo.Customer')

    error:

    Error (Data mining): Either the user, ehsan-PC\ehsan, does not have permission to access the referenced mining model or structure, MemberCard_Prediction_Structure, or the object does not exist.

    i think i should enable something for openquery option shouldn't i?

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • Larry Page(EA) (4/11/2012)


    when i want to execute the insert command with openquery i get this error :

    command:

    INSERT INTO MemberCard_Prediction_Structure (CustomerId, Gender, Age, Profession, Income, HouseOwner, MemberCard)

    OPENQUERY([testmining],'Select Customer_id, Gender, Age, Profession, Income, houseOwner,

    member_cart From testmining.dbo.Customer')

    error:

    Error (Data mining): Either the user, ehsan-PC\ehsan, does not have permission to access the referenced mining model or structure, MemberCard_Prediction_Structure, or the object does not exist.

    I think i should enable something for openquery option shouldn't i?

    Well... You did not mention analysis services anywhere in your post, except the subject line. So, I will assume by the error received and combining the subject line with the rest of your post that you are trying to use SQL syntax and operations in what should be MDX.

    I cannot think of a reason to ever try to use the INSERT statement in MDX, and it is also not referenced in my Microsoft SQL Server Analysis Services 2008 with MDX book, so I assume you cannot even use this command. Why are you using analysis services to insert data? Do you know what analysis services is used for?

    Jared
    CE - Microsoft

  • in fact i am creating a mining model and i want to import the data from my data source in data base engine to my mining model ,this is the reason that i want to use this command.

    sql server2005 has openrowquery that in this functon we should set the full address .but in sql 2008 the openquery is so simple to work.

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • Well... I'm certainly no expert, but I think you should be doing this in SQL, not in MDX. You use SQL to populate your DW and use SSAS to create a cube. Finally, use MDX to query it.

    Jared
    CE - Microsoft

  • please.really you are.

    you mean i should execute this qyery in sql server engine?

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • Before I say "Yes," You need to explain to me more what you are doing and what this query is trying to accomplish.

    Jared
    CE - Microsoft

  • Ok.

    I created a mining structure with this command in analysis service:

    CREATE MINING STRUCTURE [People1]

    (

    [CustID] LONG KEY,

    [Name] TEXT DISCRETE,

    [Gender] TEXT DISCRETE,

    [Age] LONG CONTINUOUS,

    [CarMake] TEXT DISCRETE,

    [CarModel] TEXT DISCRETE

    )

    and i altered this structure and add a mining model :

    ALTER MINING STRUCTURE [People1]

    ADD MINING MODEL [PeopleClusters]

    USING Microsoft_Clustering

    and when i want to import data :

    INSERT INTO MINING STRUCTURE [People1]

    ([CustID], [Name], [Gender], [Age], [CarMake],[CarModel])

    OPENQUERY(Chapter3Data,

    ’SELECT [Key], Name, Gender, Age, CarMake, CarModel

    FROM People’)

    and i got the error

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • You need to get a book or find some online tutorials my friend. Try posting your question in the Data Mining forum.

    Jared
    CE - Microsoft

  • thank you very much my dear friend Jared.

    today you really helped me in "mirroring and replication " and openquery subjects.

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • This might sound stupid.

    But why don't you use import data using a package in SSAS if you dont want to use SSMS??....That can be done from BIDS. right??....

    Please do correct me if I am wrong....I am new to this and always willing to learn.

    Vinu Vijayan

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • when you use dmx to analysis data,you should create a mining structure to cache the data,so after creating mining structure you can alter that and add a lot of mining model that these models can get the data from structure and analyse them using different algorithms to find patterns .using import data is not possible here .

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • Oops!!! my bad then....Sorry.

    Didn't know much about mining structures.

    It was just a wild guess.

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • no please.

    I think the data mining is the result of computer science that can change every thing.

    ---------------------------------------------------
    baaaaaaaaaaaaaleh!!! (Ehs_Akb)

  • I had the same issue and just resolved it with a tip from a guru.

    Run SELECT * FROM $system.MDSCHEMA_INPUT_DATASOURCES. Then ensure that your OPENQUERY is using an available data source name. I also enabled Ad Hoc queries and Data Access on SQL Server relational side. On Analysis Services side, I also enabled AllowAdHocOpenRowsetQueries.

    HTH

    Jen

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply