Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

SQL 2012 ERROR - The metadata could not be determined because statement contains dynamic SQL Expand / Collapse
Author
Message
Posted Thursday, September 26, 2013 9:17 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, February 19, 2016 8:21 AM
Points: 12, Visits: 261
Phil Parkin (9/26/2013)
At this point there do not seem to be any negative implications with switching providers.


How about this?


Thanks Phil.
Post #1498915
Posted Thursday, November 28, 2013 9:45 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 11, 2016 5:00 AM
Points: 1, Visits: 146
Hi.

I had the same problem and I used the Native OLE DB\Microsoft OLE DB Provider for SQL Server as you spoke and now is working. I put also the statement SET FMTONLY OFF on the first line, before procedure call.

Thank you.
Post #1518383
Posted Friday, January 8, 2016 5:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, January 8, 2016 5:54 AM
Points: 1, Visits: 1
I have an MDX query, which I want to access from RUBY ON RAILS... so that By creating LINKED-SERVER objected I can access MDX query and can get all results (rows/columns).

SP1: Actually I have created StoredProcedure based on OPENQUERY and accessing SSAS-Cube results via LinkedServer.
Then I created another StoredProcedure based on OPENROWSET calling SP1 and can access SSAS-Cube results without passing any parameter.
But when I pass some parameter its creating error and giving me error
'Msg 11514, Level 16, State 1, Procedure sp_describe_first_result_set, Line 1
The metadata could not be determined because statement 'EXEC (@Query)' in procedure 'SP1' contains dynamic SQL. Consider using the WITH RESULT SETS clause to explicitly describe the result set.'

If I try to access SP1 direct then it is giving error.
"TinyTds::Error at /SP1 Cannot initialize the data source object of OLE DB provider "MSOLAP" for linked server "LinkedServerName"

Kindly reply. Regards
Post #1750775
Posted Friday, January 8, 2016 6:04 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:19 AM
Points: 7,542, Visits: 18,267
asghar786 (1/8/2016)
I have an MDX query, which I want to access from RUBY ON RAILS... so that By creating LINKED-SERVER objected I can access MDX query and can get all results (rows/columns).

SP1: Actually I have created StoredProcedure based on OPENQUERY and accessing SSAS-Cube results via LinkedServer.
Then I created another StoredProcedure based on OPENROWSET calling SP1 and can access SSAS-Cube results without passing any parameter.
But when I pass some parameter its creating error and giving me error
'Msg 11514, Level 16, State 1, Procedure sp_describe_first_result_set, Line 1
The metadata could not be determined because statement 'EXEC (@Query)' in procedure 'SP1' contains dynamic SQL. Consider using the WITH RESULT SETS clause to explicitly describe the result set.'

If I try to access SP1 direct then it is giving error.
"TinyTds::Error at /SP1 Cannot initialize the data source object of OLE DB provider "MSOLAP" for linked server "LinkedServerName"

Kindly reply. Regards


Reply to what? We have to guess your question.

As this thread has already mentioned WITH RESULT SETS, I am assuming that you've tried that already. Please describe what problem you had when you did.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

The Dunning-Kruger Effect: the metacognitive inability of those of low ability to recognize their ineptitude and evaluate their ability accurately.
Post #1750777
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse