SQL Server Performance

OPENQUERY with >8000

Discussion in 'General Developer Questions' started by ranjitjain, Jun 28, 2005.

  1. ranjitjain New Member

    I had asked the similar question what if the dynamic sql is greater than 8000 chars and i got the good help from you guys.
    Now i'm facing different problem.
    I'm firing a openquery('linkserver','query') and the openquery has to fire query more than 8000 chars, what can be done in this context.[B)]
  2. satya Moderator

  3. dineshasanka Moderator

    http://support.microsoft.com/kb/q286370/ is not telling your the solution you want. it asks you to limit the query to less than 8000 which you can't do

  4. ranjitjain New Member

    Hi satya and dinesh,
    thanx for ur post.
    Both the links provided says same thing that this is limitation of openquery.
    Can we think of some other alternative to resolve this.

    Actually i want to fire an MDX query which is ofcourse going to be
    more than 8000 chars.
    Well im thinking of firing that mdx through VB.
    planning to make dll which will accept MDXquery and fire using ADOMD.
    So plz suggest me few links from where i can get information on using ADOMD.
  5. satya Moderator

    As the referred link insists you must divide the query as the openquery cannot deal more than 8K.
    I'm not sure on the side of ADO, you may need to wait for fellow peers solutions.

    Satya SKJ
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  6. ranjitjain New Member

    Ok Satya,
    I can only wait.
  7. Adriaan New Member

    If you have any control over the remote server, could you not create a VIEW or a PROCEDURE on the remote server, and just execute that? You should be able to call such an object in 8,000 characters ...

Share This Page