Re: ODBC Pass-Through Queries

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello "BlockNinja".

"BlockNinja" wrote:
Is there a way to pass parameters to a server via ODBC Pass-Through
queries in Access?

Example:
Doing a "select * from ThisTable" on a certain table in Oracle 10g
at work (or linking to it via Access) produces errors when viewing
the table. Namely the error in question is "Insufficient parallel
query slaves available".
This can be easily fixed in a native Oracle session by issuing the
following commands:

ALTER SESSION SET PARALLEL_MIN_PERCENT=0;
SELECT * FROM ThisTable;

This changes the session so that if there aren't enough parallel
query slaves available to Oracle, the query will still run, which
is the recommended default by Oracle.

By default though, the PARALLEL_MIN_PERCENT session parameter is
not set to zero on ODBC connections to Oracle (at least on my
installation), so Access will fail miserably when trying to view
the table through the Oracle ODBC Connection. I would like to pass
this session parameter to the server, but cannot run two queries
inside of the same Pass-Through query. Any ideas?

I haven't an Orcle server to play with, but:
Does the ALTER SESSION command produce a result? If not, there should
be no problem executing both commands in one pass through query. That
is because the odbc driver does not check the query text but passes
it directly to the server.
Also worth a try: check the settings in the dsn in the odbc32 applet
in the administrative tools folder on your pc. Maybe you can define
this session setting there. If it's there but you don't want to set
the value for all connections, create an additional dsn using this
setting.

--
Regards,
Wolfgang


.



Relevant Pages

  • Re: SQL Injection
    ... > I am currently pen-testing a web app and I am stuck in trying to execute ... two queries sequentially in Oracle. ... You won't have luck with this in Oracle. ... the end query build by a cgi-script being ...
    (Pen-Test)
  • Re: SELECT DISTINCT slow, how can I speed up
    ... We have staff using Access 2003 as a front end to the Oracle tables ... for the purposes of ad hoc queries. ... come back within a second of the SQL starting to run. ... only 20-50 rows come back and the query takes 28 seconds and there is ...
    (comp.databases.oracle.server)
  • Re: SELECT DISTINCT slow, how can I speed up
    ... We have staff using Access 2003 as a front end to the Oracle tables ... for the purposes of ad hoc queries. ... come back within a second of the SQL starting to run. ... only 20-50 rows come back and the query takes 28 seconds and there is ...
    (comp.databases.oracle.server)
  • Re: Long Sessions
    ... We have an issue with the amount of time that a firewall will hold a ... launch an ssh or sqlplus session onto an oracle box ... a 72 hour query is outrageous. ... Puget Sound Oracle Users Groupwww.psoug.org ...
    (comp.databases.oracle.misc)
  • External data connection needs separate login for each query
    ... I have an Excel 2007 workbook with multiple external queries to Oracle. ... cached credentials to authenticate. ... credentials for each new query that runs. ...
    (microsoft.public.excel.misc)