Re: HELP! MDX query from Query Analyzer to a Linked Analysis Serve
- From: "crank" <abc@xxxxxxx>
- Date: Tue, 14 Jun 2005 12:22:51 +0530
Thank you very much indeed.
Turned out I genuinely had a syntax error (not an access violation). I was
using curly braces {} instead of ( ) after OpenQuery. That's how the help
showed it. Your syntax had ( ).
Oh for useful documentation.
Thanks again
"Robert" <Robert@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3A95ABFE-00EB-49B6-B97C-1A3F646B8F73@xxxxxxxxxxxxxxxx
> Hi,
>
> I got my MDX query to work in QA.
>
> After creating the linked server, you want to execute the following...
>
> EXEC sp_helpserver /* this tells you what linked servers you have.
>
> Then, go into SQL Server Enterprise Manager after creating the linked
> server
> (via the stored procedure), and select the Properties. Change the catalog
> name to the database you created in Analysis Manager. In my case I had to
> rename it to 'Tutorial', because that what I named the database following
> the
> demo.
> I ran the query and everything worked. Try using a simple example first.
>
> SELECT * FROM OPENQUERY(LINKED_OLAP,
> 'SELECT [unit sales] FROM sales')
>
> I hope you get it working.
>
> "crank" wrote:
>
>> Robert,
>> Looks like no one has responded. I've been raking my brain to do
>> something
>> simple: execute an mdx query interactively using query analyzer. Your
>> post
>> has at least given some hint. The documentation is not much use. The
>> error I
>> get (I passed an mdx query using openquery) is 'Syntax error or access
>> violation'. My analysis server is on the same local machine, running in
>> my
>> context so access can't be the issue. If you figure out how to make such
>> a
>> simple thing happen, please reply.
>> Thanks
>> Crank
>>
>> "Robert" <Robert@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:A8C14FF0-DCD5-4C10-9158-9E4AEAFCEE4C@xxxxxxxxxxxxxxxx
>> > HI. I am a newbie to OLAP and Analysis Manager so perhaps I have
>> > overlooked
>> > something really basic. Please forgive me if this is the case.
>> >
>> > I have followed tutorial 1 to build a basic cube in Analysis Manager.
>> > The
>> > database is called Tutorial and the cube is called Sales. I have only
>> > four
>> > dimensions, which are Customer, Product, Store and Time. These are all
>> > shared, as the tutorial specifies.
>> >
>> > When I try and do an MDX query from Query Analyzer to a Linked Analysis
>> > Server using OpenQuery I get the following error.
>> >
>> > Server: Msg 7399, Level 16, State 1, Line 1
>> > OLE DB provider 'MSOLAP.2' reported an error. The provider did not give
>> > any
>> > information about the error.
>> > OLE DB error trace [OLE/DB Provider 'MSOLAP.2'
>> > IDBInitialize::Initialize
>> > returned 0x80004005: The provider did not give any information about
>> > the
>> > error.].
>> >
>> > Here's a run-down of what I have done. In query Analyzer I linked the
>> > server
>> > using the stored procedure.
>> >
>> > EXEC sp_dropserver 'LINKED_OLAP'
>> > EXEC sp_addlinkedserver
>> > @server='LINKED_OLAP', -- local SQL name given to the linked
>> > server
>> > @srvproduct='', -- not used
>> > @provider='MSOLAP.2', -- OLE DB provider (the .2 means the SQL2K
>> > version)
>> > @datasrc='localhost', -- analysis server name (machine name)
>> > @catalog='Foodmart 2000' -- default catalog/database
>> >
>> >
>> > then I executed the following.
>> >
>> > select * from openquery
>> > ( LINKED_OLAP, 'Select {[Measures].[Unit Sales]}
>> > on columns from [Sales] ')
>> >
>> > Or
>> >
>> > SELECT * FROM OPENQUERY(olap,
>> > 'SELECT [unit sales] FROM sales')
>> >
>> > Can someone please help me.
>> >
>> > I am looking to write queries to reveal the data in the cube.
>> > Eventually I
>> > want to be able to write the same queries as pass-throughs from within
>> > MS
>> > Access.
>> > Any help will be greatly appreciated.
>> >
>> > Robert
>> >
>>
>>
>>
.
- References:
- Prev by Date: Re: Question about setting up a dimension
- Next by Date: Re: Can I have DateDiff in MDX?
- Previous by thread: Re: HELP! MDX query from Query Analyzer to a Linked Analysis Serve
- Next by thread: Impact on cube availibility while Processsing one of the partition
- Index(es):
Relevant Pages
|
Loading