The OLE DB provider find way for join table in distributed query.
In some case it use cursor for join table dependent from capability of target servers.
My question is - May I tell to the OLE DB provider to prohibit use te cursor for join tables by set
some parameter (for example provider...
Hi SQLSister
The openquery is only one way for return a rowset from a SP, where i have my t-sql code under SQL 7.
It is what I need.
But I need use an openquery in a select statement more times and it doesn't work well under SQL 2000 because is used a cursor (internaly by OLE DB provider for...
In my first subscription I wrote SQL Profiler trace from SQL 7.0 and SQL 2000 too. From it is comprehensible, that internally is use cursor under SQL 2000 and therefore an error occurred.
Therefore I want to find way for forbit to use cursor.
OK, I know manage temporary table. I wanted to tell only, that i must find way for it.
And what about cursor use ?
The cursor is use internaly for process select statement :
SELECT * FROM
OPENQUERY(JH, 'EXEC pw.dbo.z_j_test_x ''test1'', 10')
,OPENQUERY(JH, 'EXEC pw.dbo.z_j_test_x ''test2''...
Thank's, I think that it's true.
But in my case I built a SP to improve performance.
Sometimes the data was fetched from SQL server utilize select statement, on the client was processed and written to some temp table (from 1 to 3 tabels) to SQL server and than was used in main selecet...
Thank's for answer.
Yes, it si one way use temporary table.
But for me is easier write 1 select statement where i can use for example 3 times openquery function for some subselect then do only refresh, when it is needed, on select and all work easy
otherwise
I must befor refresh build...
I need to use result from SP in select, therefore I use openquery from same SQL server.
I use complex SP, wich I need use more times in select statement.
Therefore I want to find way for doing it.
I think, that i must forbit use cursor. That is in SQL 7.0. Under SQL 2k is cursor use internali to...
Thak's for reply.
I need run this statement from SQL2k to same SQL2k linked server, because I need return rowset from stored procedure in select statement.
When I run this (like you):
select * from openquery
(sgao2, 'exec tektips.dbo.z_j_test_x ''test1'', 10')
it run well.
But when I run this...
It work fine with
EXEC JH.pw.dbo.z_j_test_x 'test1', 10
and with
EXEC JH.pw.dbo.z_j_test_x 'test1', '10'
too.
But i need use result (rowset) from stored procedure in select and more times. There it isn't work.
Try it on your SQL server please.
Thank's
It work fine and deterministic on MS SQL 7.0, under MS SQL 2000 it is ok, when aj use openquery only one time in select.
Try it on your server please and send me info.
You must only enable data access, create stored procedure and run select statement.
Thank's
I need return a table from a stored procedures in MS SQL.
It must run in MS SQL 7.0 and MS SQL 2000 too.
Therefore I use for it an openquery function, where is executing a stored procedure, which return a table.
Openquery function calls stored procedures in the same SQL server,
in which the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.