[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::dbintegrator_public_public

Title:DB Integrator Public Conference
Notice:Database Integration - today! Kit/Doc info see note 36
Moderator:BROKE::ABUGOV
Created:Mon Sep 21 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1171
Total number of notes:5187

1153.0. "Remote links get out of hand." by 10245::COBROWN (Colin from Danmark) Tue Apr 15 1997 11:50

    I'll start with this question here, but could be it is one for SQS.
    
    Rdb 7.0-01, DBI 7.0, SQS 7.0 all on AXP under VMS 6.2.
    
    Service defined in SQS with reuse TRANSACTION.
    Service attaches to a DBI database with links to remote databases.
    
    User attaches to DB via SQS and accesses a table on the remote database
    and all is fine.
    User logs off. All is fine.
    
    Except the service is still attached to the remote database.
    
    More users and more access to remote databases and we now have lots of
    links open.
    
    Is there anyway that the service can disconnect the remote attaches
    when the user who was using them drops their connection to the service?
    
    Without loosing the benifits of transaction reusable services?
    
    Colin - Danmark
T.RTitleUserPersonal
Name
DateLines
1153.1Expected behaviorBROKE::BITHERWed Apr 16 1997 10:5130
Hi Colin,

I believe this is expected behavior.  In interactive SQL, when a process
attaches to DBI and selects from tables that activate links to underlying
databases those links remain active for the life of the attach.  There
is no way that I know of to deactivate the links without logging out of 
dbi and back into dbi.  You've probably seen this if you've ever tried to 
drop a link that has been activated.  You can't until you logout and log 
back in.

Because you are using a transaction resusable service, processes are using the
same service and consequently are accessing the database in the last state it
was left in by a previous process (after a commit or rollback.) If the previous
process selected from a table from a remote udb, that link will have been
activated.  After a commit/rollback, the session is ready for another user
process but the link will still be active because the service has not logged
out of and back into dbi.  Commit/rollback will not deactivate links, only
logging out and back in will do this.

I don't see how you can do this except by using a database class
service that is non transaction reusable.  That way each user process
that uses the service will be preattached to the database but no links
will have been activated because each process will be first-time
user of the session.

However, the upside of this is that performance should be better in that the
overhead of activating the links does not need to be incurred by any other
processes for the life of the service.

Diane
1153.2Take it as a C/E request.10245::COBROWNColin from DanmarkThu Apr 24 1997 15:5710
    Thanks for the reply.
    
    The problem is they end up with dozens of links and if one of them has
    had a network failure the next user gets the error, even if they were
    not accessing the failed link:-(
    
    I think the CT is just trying to bring our attention to an issue that
    we could address at some time in the future.
    
    Colin
1153.3Wish listed...BROKE::ABUGOVThu Apr 24 1997 17:187
    
    Hi Colin,
    
    We've added it to our ever expanding wish list (this one has
    dependencies on both sql and sql services...).
    
    Dan
1153.4problem w/both types of database servicesBROKE::BITHERFri Apr 25 1997 13:0319
Hi Colin,

I wanted to add one more thing.  What I said in .1:

>I don't see how you can do this except by using a database class
>service that is non transaction reusable.  That way each user process
>that uses the service will be preattached to the database but no links
>will have been activated because each process will be first-time
>user of the session.

This is wrong.   The same problem exists with non transaction database 
services too.  Since the service does not disconnect from the database, the
links remain active.  The only way the links get dropped is to logout/log back
into dbi and this would only be done when using generic services.  

Diane



1153.5Crossposted in SQL/SERVICES 219610245::COBROWNColin from DanmarkTue Apr 29 1997 09:518
    I have opened a new SQL/services note 2196 as a reasonable partial
    solution is to allow the option that a server commits suicide when
    there is a network error from a remote link.
    
    This would aviod the problem of all clients hitting a server where an
    old link has died getting errors.
    
    Colin