• Question

  • Hello my friends.

    I trying use EXEC('') AT LinkedServer statement.

    The command executes sucessfully on my remote server, and return my data normarly...

    The problem was when add the "SET FMTONLY ON" command.  When i do this, the exec seems don't works. If i put a linked server that not exists, the EXEC() AT run sucessfully. If a put a query inside EXEC with incorrect syntax, the command also runs sucessfully.

    I need this because i have a solution that works (SQL 2005 + Win Server 2003).I need that command works under FMTONLY ON.

    Someone knows what may happens?


    []'s | Rodrigo Ribeiro Gomes | MCTS/MCITP Dev/DBA

    Tuesday, November 19, 2013 12:45 PM

All replies

  • Hello,

    Can you post the query statement for further analysis?
    If you execute an OpenQuery command on the linkedserver, you can refer to the interpretation in the following KB article:
    T-SQL function OpenQuery fails to execute on linked servers

    Fanny Liu

    Fanny Liu
    TechNet Community Support

    Wednesday, November 20, 2013 12:29 PM
  • set fmtonly returns just the metadata back to the client. Is the symptom no error, and no data?  Overall, fmtonly is best thought of as a testing tool to determine what the format of the response without actually executing the query. Its nice to have when testing an expensive query against a very large database
    • Proposed as answer by John Eisbrener Wednesday, January 22, 2014 3:49 AM
    Wednesday, November 20, 2013 5:16 PM