Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Asynchronous vs Synchronous

RE: Asynchronous vs Synchronous

From: Regina Harter <rharter_at_emc-inc.com>
Date: Wed, 19 Jul 2000 14:14:39 -0700
Message-Id: <10563.112461@fatcity.com>


We went through a similar experience with PowerBuilder. We needed the asynchronous processing to allow SQLNet to pass the cancel command while it was still working on the select. Both Oracle and PowerBuilder claimed they supported asynchronous, and I do believe them since SQLPlus allows you to cancel a select, and I have seen evidence of asynchronous processing in PowerBuilder not related to the database, but even Sybase Support was unable to get a select to cancel before returning the first row in spite of their claims. One of these days, now that we have PowerBuilder 7 and Oracle 8, we will try it again.

At 11:00 AM 7/19/00 -0800, you wrote:
>Hello All,
>
>This is the response I received from my developer that he received from
>Crystal. Anyone have any comments?????
>
>Thanks In Advance,
>Cheers!
>Christine Turner
>Database Administrator
>IPS-Sendero
>Scottsdale, Arizona
>Phone: (800) 321-6899 ext. 3286
>Fax: (480) 946-8224
>E-mail: christine.turner_at_ips-sendero.com
>
>
>
>-----Original Message-----
>From: David Denison [SMTP:david.denison_at_ips-sendero.com]
>Sent: Tuesday, July 18, 2000 3:47 PM
>To: Christine Turner
>Subject: Fw: CTL:20000717-10296 Automated Response:
>
>Here is that Crystal response concerning synchronous vs. asynchronous
>database connections.
>
>----- Original Message -----
>To: <david.denison_at_ips-sendero.com>
>Sent: Tuesday, July 18, 2000 1:32 PM
>
>
> > This EMail was sent: 7/18/00 1:32:20 PM (Pacific Standard Time)
> >
> > *** This incident has been closed. To reopen, simply reply to this email
> > with the additional information. Do not use this Control Number for a
> > different question as it will go to the wrong support group ***
> >
> > --------------------------------------------------------------------------
> > ------------------------------------
> >
> > Response To: David Denison
> >
> > Hi David,
> >
> > Thank you for using Answer by email.
> >
> > Unfortunately what you're trying to do will cause a gpf, and let me
> > explain why.
> >
> > If we submit a query to your database (in this case Oracle), we send off a
> > SQL statement (i.e select * from table). Oracle processes that statement
> > and generates a dataset and passes that back to Crystal Reports to format
> > and display.
> >
> > If we cancel the job or close that preview window before that data comes
> > back there's no way to tell Oracle that we've cancelled that job and it's
> > going to continue sending data to memory that Crystal Reports has already
> > released back to Windows and it will crash. This bi-directional
> > communication would require an asynchronous database driver on BOTH the
> > Crystal Reports side of the connection and the Oracle side of the
> > connection. Unfortunately, to my knowledge, Oracle doesn't support an
> > asynchronous connection, and Crystal Reports only supports asynchronous
> > connections with a limited number of our database drivers.
> >
> > I've included a Crystal Reports knowledge base article that describes
> > which of our database drivers are asynchronous:
> > c2006041
> >
> > I've also pasted this knowledge base article below:
> >
> > Asynchronous Database Connection Support for Seagate Software
> >
> > Product: Crystal Reports Professional Edition Version: 8.0.0.371
> > Applies to: Reported version and higher
> > Database: Microsoft SQL Server Platform: Windows 95 Date Verified:
> > February 16, 2000
> >
> > Problem:
> > Q: What happens when a user sends off a query in Crystal Reports (CR) or
> > in the Info Report Designer in Seagate Info (SI) and then needs to cancel
> > that query? How does the processing stop or does it even stop?
> >
> > Q: What is the difference between Synchronous and Asynchronous database
> > connections?
> >
> > Q: Does Seagate Software support Asynchronous database connection?
> >
> >
> > Solution:
> > There are two possible database connection methods with any type of
> > database. They are:
> > . Synchronous Database Connection
> > . Asynchronous Database Connection
> >
> > An asynchronous database connection refers to the ability for a client
> > application to be able to issue any number of commands to a database
> > server at any given point during the database connection, without waiting
> > for the database server to complete the processing of current tasks.
> >
> > A primary application of asynchronous database connections, within the
> > Crystal Reports (CR) Designer, is the ability to terminate a running query
> > at any point in time.
> >
> >
> > Definitions:
> > =================
> > Synchronous Database Connection:
> >
> > Synchronous connection to a database means that once a SQL query is passed
> > to the database server, the calling application (Crystal Reports in this
> > case) waits until it receives a "Finished" message from the database
> > server. The "Finished" message is connected to the first packet of the
> > result set being sent back.
> >
> > In Crystal Reports, if the cancel button is clicked while a synchronous
> > connection is underway, the Report Designer will look as though it has
> > canceled the query request. However, the request on the database server
> > will continue to process until completion. Once the first packet comes
> > back saying "Finished", no more of the query result set will be passed
> > back.
> >
> > NOTE: Actually, when executing the query synchronously, Crystal Reports
> > doesn't get the chance to cancel since the database client won't return
> > control until the database is finished.
> >
> >
> > Asynchronous Database Connection:
> >
> > Asynchronous connection to a database means that multiple sets of commands
> > can be passed to the database server and processed at once. (For example,
> > there is no need to wait for the query to return before sending another
> > command to the database server).
> >
> > Instead of waiting for a "Finished" message to be sent back from the
> > database server, the calling application (Crystal Reports in this case)
> > sends a query status message to the database server at set times asking
> > "Are you done yet?" When the database server says "Yes", the result
> > packets start coming back. However, if a cancel button is clicked on the
> > client computer side, instead of sending a question message to the
> > database server, the client application has the ability to send a "Cancel
> > query" message to the database server. In the Crystal Reports scenario,
> > if the cancel button is clicked, instead of asking the database server if
> > it has completed its query, Crystal Reports sends a "cancel" message to
> > the database server. The query never has to complete.
> >
> >
> >
> > Database Drivers that support Asynchronous Connections:
> > =====================================================
> > The following CR database drivers include support for asynchronous
> > database connections:
> >
> > . Microsoft SQL Server Direct (P2ssql.dll) - 8.0.0.1 and higher
> > . Sybase Direct (P2ssyb10.dll) - 8.0.0.0 and
> > higher
> > . IBM DB2 Direct (P2sdb2.dll) - 8.0.0.2 and
> > higher
> > . ODBC (P2sodbc.dll) - 6.0.0.88 and higher
> > . OLEDB (P2soledb.dll)) - 7.0.100.37 and higher
> >
> > NOTE #1: The first 3 database drivers listed above our native drivers for
> > Microsoft SQL Server, Sybase, and IBM DB2 respectively.
> >
> > NOTE #2: The only Seagate Software supplied ODBC drivers that support
> > asynchronous database connection are Microsoft SQL Server and Sybase. CR
> > detects if an ODBC driver supports Asynchronous Query (by testing if the
> > SQL_ATTR_ASYNC_ENABLE flag on the database connection can be seen. If it
> > can, then it will be used (assuming the user has set the asynchronous
> > option).
> >
> > NOTE #3: P2soledb.dll checks the DBPROPSET_ROWSET property from the
> > DBPROP_ROWSET_ASYNCH property set. If this property is set, then the
> > provider accepts asynchronous queries and the option is installed.
> >
> > NOTE #4: The version numbers listed above relate to the versions of the
> > Seagate Software drivers.
> >
> >
> >
> > Support in Seagate Software Applications:
> > ============================================
> > Based on the database driver version numbers above (unless otherwise
> > noted), the following applications and DLLs support asynchronous database
> > connections:
> >
> > . Crw32.exe - Report Designer (at least version CR 7.0.100.15 and SI
> > 7.0.2.100)
> > . Crpe32.dll - Crystal Reports Print Engine (at least version CR
> > 7.0.100.15)
> > . RDC - Report Designer Component for Visual Basic (higher than, and not
> > including, version 7.0.100.15)
> > . Cipe32.dll - Seagate Info Print Engine (at least version 7.0.2.100 of
> > Seagate Info)
> >
> > CAUTION: The "Are you Finished?" message that CR sends to the database
> > server is hard coded to fire off the question for every 1-second interval.
> > This is not configurable.
> >
> >
> > How to Procedures:
> > ========================
> > To enable asynchronous database connections as a general option for new
> > reports:
> >
> > 1. Open the SCR Designer.
> > 2. On the 'File' menu, click 'Options'.
> > 3. Click the 'Database' tab.
> > 4. Select the checkbox 'Perform Query Asynchronously'.
> >
> >
> > To enable asynchronous database connections for existing reports:
> >
> > 1. Open the report in the SCR Designer.
> > 2. On the 'File' menu, click 'Report Options'.
> > 3. Select the checkbox 'Perform Query Asynchronously'.
> >
> > . To terminate a running query in the CR Designer, simply click the stop
> > button located beside the paging buttons.
> >
> > . Once a report has established a database connection, selecting or
> > clearing the 'Perform Query Asynchronously' checkbox will not take effect
> > until the database connection is severed and reestablished.
> >
> > . The SCR Direct Drivers for Microsoft SQL Server, Sybase and IBM DB2
> > automatically set the database connection to asynchronous mode if the
> > 'Perform Query Asynchronously' checkbox is selected.
> >
> > . The SCR Database Driver for ODBC (P2sodbc.dll) will first poll the ODBC
> > driver to determine if the driver in question supports asynchronous
> > database connections. If the ODBC driver supports asynchronous database
> > connections and the 'Perform Query Asynchronously' checkbox is selected,
> > the connection will be set to asynchronous mode.
> >
> > . The SCR Database Driver for OLEDB (P2soledb.dll) will first poll the
> > OLEDB provider to determine if the provider in question supports
> > asynchronous database connections. If the OLEDB provider supports
> > asynchronous database connections and the 'Perform Query Asynchronously'
> > checkbox is selected, the connection will be set to asynchronous mode.
> >
> > Availability: Public
> > Editor:CAL
> > c2006041
> >
> >
> > I hope this helps,
> > Erik L
> > id 848
> >
> > * Please note: If we may be of further assistance with this issue simply
> > reply to this email.
> >
> > You can also check the Seagate Software Knowledge Base for solutions to
> > issues similar to your own. You can find our knowledge base is at the
> > following URL:
> >
> > http://community.seagatesoftware.com/support/kbase.asp
> >
> >
> >
> >
>
>--
>Author: Christine Turner
> INET: Christine.Turner_at_IPS-Sendero.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
Received on Wed Jul 19 2000 - 16:14:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US