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

Conference orarep::nomahs::sql_services

Title:SQL/Services Forum
Notice:kits(3) ft info(7) QAR access (8) SPR access (10)
Moderator:SQLSRV::MAVRIS
Created:Thu Oct 13 1988
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2214
Total number of notes:8586

2176.0. "odbc attach overwrites db class server attach" by BROKE::BITHER () Tue Mar 25 1997 11:14

SQL/Services 6.1
Rdb 6.1

Hi,

I have found that if a database class server is used (i.e. attach string
defined in sqlsrv$configxx.dat) and an attach string is also defined
in the data source definition, that the attach string in the data source
def overwrites what is defined in the config file for the database
class server.  This is true even when min=value so that the database
class execution processes are presumably already preattached to the
database indicated in the config file.  I'm assuming this is expected
behavior but am wondering about the situation where min=value.  What
actually happens?  Does the server receive the client information
and disconnect the existing pre-attached process and reattach using the
info passed down from the client?  This appears to be what happens but
just wanted to clarify that this is expected behavior and how it works.

Thanks, Diane

EXAMPLE:

SQLSRV$CONFIG61.DAT
-------------------
   CLASS "DBI61PHY"
   STARTUP "SQLSRV$SRV"
   USER "SQLUSER61"
   EXECUTE "ATTACH 'FILENAME DBI_CATALOG'"   <-- attach to physical dbi db
   IDENT "DBI"                                   which are very diff tables
   MIN 10                                        than logical dbi db.
   MAX 15
   IDLE 1800

ODBC DATA SOURCE DEFINITION
---------------------------
   Data Source Name:  DBI61PHY
   Server:  DBS400
-->   Class:  DBI61PHY
   UserID:  SQLUSER61
   Attach Statement:  attach 'filename /type=dbi/dbname=dbi_catalog'   
    (attach to logical dbi db which are ver diff tables than 
     physical dbi db.)
                                 
When the connection is made to the database using data source dbi61phy,
the user connects to the logical dbi database (/type=dbi) rather than
the physical dbi database as indicated by the database class server.
Yet no new ss_dbiphy processes are started up so the user process is
using one of the processes already started and preattached to the
physical database.

If the attach statement is removed from the odbc data source definition,
then the user connects to the physical dbi database as expected.

Thanks, Diane




T.RTitleUserPersonal
Name
DateLines
2176.1?BROKE::BITHERWed Mar 26 1997 12:194
Can anyone confirm that this is expected behavior?  I'm supposed to get
back to a customer re: this behavior.

Thanks a lot, Diane
2176.2M5::JBALOGHWed Mar 26 1997 13:369
    Since the attach string in the driver login screen causes an execute
    immediate "attach 'filename blah'", I would suspect this would override
    the previously declared alias. I would hope SQLServices does not parse
    every statement looking for attach statements to strip out. 
    
    I don't know if it works this way in SQLSRV7. I know it is different if
    they use transaction reusable servers. 
    
    John
2176.3Fixed in SQL/SErvices 7.0 with Rdb 6.1 or higherSQLSRV::MAVRISSue Mavris - [email protected]Fri Mar 28 1997 09:2814
John is correct.  SQL/Services does not parse SQL looking for attach 
strings, so we do not notice the client doing an attach in a database service.  
SQL/Services 7.0 with Rdb 6.1 or higher does restrict this.  Rdb 6.1 and 
higher will not allow the following SQL to be prepared within a database 
service:
    -  ATTACH
    -  DECLARE DATABASE
    -  CREATE DATABASE
    -  ALTER DATABASE
    -  DROP DATABASE
    -  CONNECT
    -  SET CONNECT

Sue