Client Connectivity for Oracle Rdb

Client Connectivity for Oracle Rdb

Client Connectivity for Oracle Rdb Colleen Mitchneck Linda Kipnes Bryan Alvey ©2004-2005, Oracle Corporation Client Connectivity • When we talk Client Connectivity to Rdb, we are talking about… …Oracle SQL/Services for Rdb 2 History of SQL/Services • 1992: Initial Release – Implemented a SQL/Services client API – Implemented an ODBC for Oracle Rdb driver allowing any industry standard ODBC application to use Rdb in the backend • 1994: SQL/Services acquired by Oracle • 1995: Added RMU client/server capabilities 3 History of SQL/Services • 1996: Implemented Oracle Call Interface (OCI) support – OCI applications could now run almost transparently against an Rdb database – As new industry standards emerge, Oracle implements compliant OCI drivers (JDBC, .NET, etc.), which function with Oracle and Rdb databases in the backend • 2003: Added Oracle Rdb JDBC server management 4 SQL/Services Architecture Client Server Configuration File Monitor Desktop systems Dispatcher SQLSRV Service Client applications RMU Service OCI Service SQLSRV_MANAGE Executors SQL/Services Manager GUI Rdb databases 5 SQL/Services Protocols • SQLSRV – used by applications based on ODBC or on the SQL/Services client API • OCI – used by Oracle applications that communicate via the Oracle Call Interface (OCI) protocol • RMU – used by the Oracle Rdb RMU utility for parallel backup and remote command execution • JDBC – used to start and stop JDBC for Oracle Rdb thin servers 6 SQLSRV Client Architecture Client using SQL/Services client API directly Client SQL/Services Application Client API Client using ODBC for Oracle Rdb Client ODBC for SQL/Services server Application Oracle Rdb Client API 7 SQLSRV Client • SQL/Services client API – Available on Windows, Tru64 UNIX, OpenVMS, Red Hat Linux Red Hat Linux (V2.1 or later) is a new platform for Oracle SQL/Services release 7.1.6 – Includes a library of routines that client applications can call to access SQL/Services functions – Enables client applications to execute Oracle Rdb dynamic SQL statements against an Rdb database 8 SQLSRV Client • ODBC for Oracle Rdb – Layered on the client API to provide industry standard ODBC access to Rdb – Current version 3.1.0.2 – Much improved over earlier versions Better performance Improved conformance with ODBC specification New API calls and prefetch functionality 9 SQLSRV Client • ODBC for Oracle Rdb (con’t) – Works with any ODBC compliant application ADO, .NET via bridge many different vendors have released ODBC-compliant applications in the software development, office productivity, and data analysis space – Portable across databases 10 SQLSRV Server Architecture SQLSRV_MON SQLSRV_DISP monitor dispatcher Client SQLSRV_EXEC executor Rdb databases 11 SQLSRV Server • Monitor (SQLSRV_MON) – provides overall management and control for the server • Dispatcher (SQLSRV_DISP) – responsible for handling network communications for the clients and for the routing and scheduling of client requests to executors of a service – a single dispatcher typically supports more than one network protocol, but can support a single protocol • Executor (SQLSRV_EXEC) – accepts client requests from dispatchers, processes them, and returns the results – there is a pool of executor processes for each service 12 OCI Client Architecture Client OCI Client Application Oracle Net Server 13 OCI Server Architecture OCI_DISP SQLSRV_MON dispatcher SQLSRV_NATCONN Client SQLSRV_SQLNETSHR (Oracle RDBMS libraries) RDB$NATCONN (OCI Services) Rdb databases 14 OCI Protocol • Presents an Oracle RDBMS view of an Rdb database by emulating Oracle Data Dictionary • Manages Oracle cursors • Manages Oracle to Rdb data type conversions • Provides functions to emulate Oracle RDBMS built-in functions (to_date, etc.) 15 OCI Protocol • Some of the products using OCI… – Oracle JDBC – Oracle ODBC – Oracle database links – Oracle Data Provider for .NET – Oracle Reports 16 OCI Protocol • And more products using OCI… – Oracle JDeveloper – Oracle Forms – Oracle Designer – Oracle Developer – Oracle SQLPLUS utility – And many, many others… 17 OCI Protocol Connecting from Java 18 RMU Protocol Architecture client server RMU_DISP SQLSRV_MON dispatcher RMU RMUEXEC Client Command Line Utility RMUSHR Rdb databases 19 RMU Protocol • RMU/BACKUP/PARALLEL – BACKUP command is sent from RMU client through SQL/Services to the server node, where the backup is done by RMU executors – Each RMU executor process can run multiple backup threads. • Remote RMU Command Execution – Executes RMU commands remotely based on user specified logical definitions 20 SQL/Services Management SQLSRV Command Line 21 SQL/Services Management GUI–based Manager 22 SQL/Services Management Enterprise Manager 9i 23 SQL/Services 7.1.6 • Currently in beta test • Production release planned for Q1 2005 • Major Features – Upgraded to use the Oracle 9.2.0.4 libraries – 2pc Support – New and updated utilities – Performance enhancements 24 SQL/Services 7.1.6 Upgrade to Oracle 9.2.0.4 • Upgraded OCI Services • Added support for new Oracle 9i data types – Time, Year-to-month interval, Day-to-second interval, etc. • Removed several restrictions when connecting from Oracle 9i 25 SQL/Services 7.1.6 2pc Support • Oracle Rdb databases can now fully participate in Oracle RDBMS managed distributed transactions • Allows multiple Oracle server DBLINKs to Rdb databases to participate in a transaction • Exploits DECdtm XA Gateway to provide interface between Oracle distributed transaction protocol and DECdtm distributed transaction protocol 26 What is a DBLINK? • A DBLINK is a Oracle RDBMS database server- to-server connection – Set up in the Oracle RDBMS database with SQLPLUS: SQL> CREATE DATABASE LINK dblink_name 2 CONNECT TO "username" IDENTIFIED BY 3 "password" USING "service_name"; – Uses a server-to-server subset of the OCI protocol OCI Native Connection (NATCON) NATCON is a remote call interface • Implementation in Rdb uses SQL Services – SQL Services Dispatcher resolves connection – SQL Services Executor implements OCI Interface – SQS Executor translates Oracle SQL into Rdb SQL 27 Transactions on a DBLINK • OCI NATCON Transaction interface – Not SQL sentences like SET TRANSACTION – RCI calls to transaction functions in OCI Services I/F: gtabegn(), gtaprtn(), gtacomm(), gtaroll(), gtafrgt(), gtareco() – Implemented inside the SQL Executor • Uses Oracle RDBMS internal transaction protocol – Distributed transaction capable 2 Phase Commit (i.e. prepare and commit/rollback) Allows partner to decline 2PC – “XA-like” protocol … but not XA 28 What’s the Problem with DBLINK 2PC and Rdb? • Rdb supports distributed transactions but … – It uses DECdtm as the transaction manager – It requires DECdtm AST calls to manage transaction SQS Executor would need a DECdtm TID Would pass TID to Dispatch layer in context structure Dispatch layer would join the DECdtm transaction – Rdb recovery asks DECdtm for transaction status • Oracle RDBMS Server doesn’t do DECdtm – SQS Executor has to decline 2PC – Oracle RDBMS server copes by calling DBLINK to commit after other participants successfully prepare – Limits transaction to one Rdb DBLINK participant 29 HP to the Rescue • DECdtm XA Gateway provided by HP – Interfaces an XA Transaction Manager (TM) to DECdtm – Allows DECdtm Resource Manager (RM) – like Rdb – to participate in an XA transaction – Released as part of OpenVMS 7.3-1 • Can be exploited for DBLINK 2PC – Oracle RDBMS protocol is similar and compatible – Interface written for OCI to XA Gateway SQS Executor translates between protocols Can now participate in distributed transactions – One DBLINK limit removed 30 Gory Details of Implementation • SQS Executor is a SQL$PRE/CC application – Now compiled specifying implicit 2PC – Executor’s Rdb Dispatch layer joins the default DECdtm transaction • SQS Executor now sends OCI transaction calls to XA Gateway – OCI transaction ID is used as an XA transaction ID – XA Gateway calls DECdtm Sets SQS Executor process default transaction Passes transaction calls for that transaction – DECdtm calls Dispatch layer of SQS Executor via ASTs • SQL statements submitted dynamically as before 31 Gory Details Illustrated Oracle SQS/OCI XA Gateway RDBMS Executor Server Server OCI XA NATCON Calls Dynamic DECdtm SQL Calls Rdb DECdtm Dispatch DECdtm Services Calls SQS Executor Process 32 How Do I Use It? • Set up the DECdtm XA Gateway – Make sure Gateway server is installed: DDTM$XG_SS.EXE – Use Gateway Control Program (XGCP.EXE) to: Create a log for your XA domain Start up the Gateway server • Define Rdb logical for XA Gateway domain – Logical name: RDB$DDTM_XG_INFO – For example: $DEFINE/SYSTEM RDB$DDTM_XG_INFO SYSTEM$node_name where node_name is the OpenVMS node name – Now SQL Services will automatically do 2PC 33 SQL/Services 7.1.6 Utilities • RDB$NATCONN_DIC Utility – New utility for 7.1.6 Replaces the use of .SQL scripts required by prior versions – Performs database prepare, upgrade and drop of Oracle data dictionary definitions in Rdb database to enable OCI access – Can upgrade from any prior version of OCI Services (no interim upgrades required) – Invoked via SYS$LIBRARY:RDB_NATCONN.COM 34 SQL/Services 7.1.6 Utilities • RDB$NATCONN_CUPP Utility – Updated utility for 7.1.6 Replaces RDB_NATCONN procedure to add users – Used to add, modify, remove, and show users enabled for OCI access Most OCI applications now require users to be defined in the database in order to execute the application – Invoked via SYS$LIBRARY:RDB_NATCONN.COM 35 SQL/Services 7.1.6 Performance Enhancements • SQLSRV_SQLNETSHR71.EXE

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    41 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us