Presentation is loading. Please wait.

Presentation is loading. Please wait.

DB-1: OpenEdge ® SQL in a 10.1B multi- database environment for ODBC and JDBC Brian Werne Sr. Engineering Manager, OpenEdge SQL and OpenEdge Management.

Similar presentations


Presentation on theme: "DB-1: OpenEdge ® SQL in a 10.1B multi- database environment for ODBC and JDBC Brian Werne Sr. Engineering Manager, OpenEdge SQL and OpenEdge Management."— Presentation transcript:

1 DB-1: OpenEdge ® SQL in a 10.1B multi- database environment for ODBC and JDBC Brian Werne Sr. Engineering Manager, OpenEdge SQL and OpenEdge Management

2 © 2007 Progress Software Corporation 2 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Objectives Answers for the following:  What is multi-database query?  What’s going on under the covers?  How do I manage the configuration?

3 © 2007 Progress Software Corporation 3 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Agenda  Overview of multi-database configurations  Connections and how they show up  Data access – single and multi-database  Management and planning

4 © 2007 Progress Software Corporation 4 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Multi-Database Query - client DB SQL Client Second DB Third DB DBNavigator - JDBC URL Crystal Reports – ODBC DSN Allow the ability to join tables in multiple databases ( cross database join) Customers Orders Inventory Join: customers from DB, Orders from SecondDB, Inventory from ThirdDB

5 © 2007 Progress Software Corporation 5 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC 10.1B Multi-Database Query - server OpenEdge SQL Server DB SQL Client Host Shmem Second DB Third DB Shmem DBNavigator - JDBC URL Shmem Crystal Reports – ODBC DSN Cross database join

6 © 2007 Progress Software Corporation 6 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC  Fields/Columns ( CustNum, CustName)  Table( Customer) - collection of columns  Schema ( PUB, bwerne) - collection of tables  Catalog (AuxCat1, mysports) - Alias for database Terminology

7 © 2007 Progress Software Corporation 7 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Multi-Database Query – Scope PUB schema PUB Customer Inventory bwerne Mysports AuxCat1

8 © 2007 Progress Software Corporation 8 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC  Three level naming convention  Example  Applies to schema, tables, columns, stored procedures 3 part naming – single database connection Three level naming (already have this) schema.table.column-name SELECT Pub.Customer.CustNum, Pub.Customer.Name, Pub.Order.OrderNum …

9 © 2007 Progress Software Corporation 9 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC  Four level naming convention  Example  Applies to schema, tables, columns, stored procedures 4 part naming – multi-database query Four level naming catalog.schema.table.column-name SELECT Pub.Customer.CustNum, SportsPrimary.Pub.Customer.Name, SportsAux1.Pub.Order.OrderNum …

10 © 2007 Progress Software Corporation 10 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC SELECT "Customer1"."CustNum", "Customer1"."Name", "Order1"."OrderDate", "Order1"."Ordernum", "OrderLine1"."Itemnum", "OrderLine1"."Qty", "OrderLine1"."OrderLineStatus" FROM ("AuxCat2"."PUB"."OrderLine" "OrderLine1" INNER JOIN "AuxCat1"."PUB"."Order" "Order1" ON "OrderLine1"."Ordernum"="Order1"."Ordernum") INNER JOIN "SPORTS2000"."PUB"."Customer" "Customer1" ON "Order1"."CustNum"="Customer1"."CustNum" ORDER BY "Customer1"."CustNum" Crystal Reports – cross database join Catalog

11 © 2007 Progress Software Corporation 11 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Single Database simple query OpenEdge SQL Server DB SQL Client Host Shmem DBNavigator - JDBC URL Crystal Reports – ODBC DSN

12 © 2007 Progress Software Corporation 12 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Multi-Database Support OpenEdge SQL Server DB Primary SQL Client Host Shmem Auxiliaries Second DB Third DB Read Only Shmem DBNavigator - JDBC URL Shmem Crystal Reports – ODBC DSN Define primary and auxiliary database

13 © 2007 Progress Software Corporation 13 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Agenda  Overview of multi-database configurations  Connections and how they show up  Data access – single and multi-database  Management and planning

14 © 2007 Progress Software Corporation 14 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Multi-database connections Two methods:  Explicit connections to auxiliary databases with CONNECT sql statement  “Automatic” connection model

15 © 2007 Progress Software Corporation 15 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Connecting to an Auxiliary Database  Catalog - an alias for a database  Connecting to an auxiliary database Must be on same host as Primary database  Disconnecting a catalog CONNECT ‘/usr/wrk/sports2000’ AS CATALOG mysports; DISCONNECT CATALOG mysports;

16 © 2007 Progress Software Corporation 16 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Auxiliary Database Details  Default catalog is the Primary database  Listing available, currently connected catalogs Syntax SET CATALOG mysports; SHOW CATALOGS ALL | { PRO_NAME | PRO_TYPE | PRO_STATUS }

17 © 2007 Progress Software Corporation 17 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Say What ?!?!  Some applications, like Crystal Reports, only allow you to issue SELECT statements  Can’t use the CONNECT statement: Now what?  Use automatic connections

18 © 2007 Progress Software Corporation 18 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Multi-Database : automatic connections Properties [config] OpenEdge SQL Server dbname[-mdbq:config] DB Primary SQL Client Host Shmem Auxiliaries Second DB Third DB Read Only Shmem DBNavigator - JDBC URL Crystal Reports – ODBC DSN

19 © 2007 Progress Software Corporation 19 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Automatic connections  How does solution this work?  What is a property file?  What does the property file contain?

20 © 2007 Progress Software Corporation 20 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Property file example [sql-configuration] configuration-names-list=config1 [configuration.config1] database-id-list=Aux1, Aux2 [database.Aux1] Name=SportsAux1 Catalog=AuxCat1 Location=c:\openedge\WRK\db\SportsAux1 [database.Aux2] Name=SportsAux2 Catalog=AuxCat2 Location=c:\openedge\WRK\db\SportsAux2 sports2000.oesql.properties Full path to databaseconfiguration name

21 © 2007 Progress Software Corporation 21 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Multi-Database : automatic connections Properties [config1] OpenEdge SQL Server dbname[-mdbq:config1] DB Primary SQL Client Host Shmem Auxiliaries Second DB Third DB Read Only Shmem DBNavigator - JDBC URL Crystal Reports – ODBC DSN

22 © 2007 Progress Software Corporation 22 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC jdbc:datadirect:openedge://localhost:6748;databaseNa me=sports2000 Single connection : JDBC -DBNavigator

23 © 2007 Progress Software Corporation 23 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC jdbc:datadirect:openedge://localhost:6748;databaseNa me=sports2000 Multi-DB configuration:JDBC -DBNavigator [-mdbq:config1]

24 © 2007 Progress Software Corporation 24 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC DBNavigator – MDBQ configuration Primary database Auxiliary databases

25 © 2007 Progress Software Corporation 25 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC ODBC – single connection

26 © 2007 Progress Software Corporation 26 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC ODBC – Multi-DB configuration

27 © 2007 Progress Software Corporation 27 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Crystal – looks like this with MDBQ Auxiliary databases Primary database

28 © 2007 Progress Software Corporation 28 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Every good engineering project has acronyms (EGEPHA) Primary or single database connections  SQSV (OpenEdge SQL Server ) Main OpenEdge SQL server process connection to storage engine  REMC (Remote Client) OpenEdge SQL client thread for each connection to the primary database

29 © 2007 Progress Software Corporation 29 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Under the covers - acronyms Auxiliary connections  SQFA (SQL Federated Agent) Main OpenEdge SQL connection to the Auxiliary database  SQFC (SQL Federated Client) OpenEdge SQL client thread for each connection to the auxiliary database

30 © 2007 Progress Software Corporation 30 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Connection types OpenEdge SQL Server connection OpenEdge SQL Client connection Primary SQSV REMC Auxiliary SQFA SQFC

31 © 2007 Progress Software Corporation 31 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Connections – using MDBQ OpenEdge SQL Server Primary DB Auxiliary DB Main Thread Client 1 Thread Client 2 Thread SQSV SQFA REMC SQFC

32 © 2007 Progress Software Corporation 32 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Promon – Primary Database Primary database connections

33 © 2007 Progress Software Corporation 33 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Promon – Auxiliary Database Auxiliary database connections

34 © 2007 Progress Software Corporation 34 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC OpenEdge Management User Activity View – Primary Database Primary database connections

35 © 2007 Progress Software Corporation 35 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC OpenEdge Management User Activity View – Auxiliary Database Auxiliary database connections

36 © 2007 Progress Software Corporation 36 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC MDBQ Tips/Restrictions/Gotchas!!  Restriction Primary and auxiliary databases must reside on same host  Connection authentication User credentials must be same on Primary and each Auxiliary  Database codepage Codepage of databases must be the same

37 © 2007 Progress Software Corporation 37 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC MDBQ Tips/Restrictions/Gotchas!!  Auxiliary connections are READ ONLY No update operations, schema or record based, can be performed in the auxiliary databases. Only the primary database will accept update statements.  Granting / revoking permissions - authorization Must be done on auxiliary database independently  Performance considerations Update Statistics must be done on each auxiliary database independently

38 © 2007 Progress Software Corporation 38 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Multi-Database Query Support Properties [config1] OpenEdge SQL Server dbname[-mdbq:config1] DB Primary SQL Client Host Shmem Auxiliaries Second DB Third DB Shmem Read Only

39 © 2007 Progress Software Corporation 39 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC  Overview of multi-database configurations  Connections and how they show up  Data access – single and multi-database  Management and planning Agenda

40 © 2007 Progress Software Corporation 40 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Planning – startup  Effect of MDBQ: Primary DB startup parameters Effectively no change from single connection, make use of –Mi to control number of connections/threads per server. Still have SQSV (server slot (-Mi,Ma)) and REMC ( user slot (-n)) Reminder: OpenEdge SQL does better with threads ( more connections per server)  Effect of MDBQ: Auxiliary DB startup parameters SQFA is self-service (add one to –n) Each SQFC takes up a user slot (each add to –n) SQFA, for each SQSV, will host multiple SQFC contexts

41 © 2007 Progress Software Corporation 41 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Shutdown of Auxiliary database OpenEdge SQL Server Primary DB Auxiliary DB Main Thread SQSV SQFA Client 1 Thread REMC SQFC Client 2 Thread REMC SQFC Primary DB broker unaffected

42 © 2007 Progress Software Corporation 42 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Shutdown of Auxiliary database OpenEdge SQL Server Primary DB Auxiliary DB Main Thread SQSV Primary DB broker unaffected

43 © 2007 Progress Software Corporation 43 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Shutdown of Primary database OpenEdge SQL Server Primary DB Auxiliary DB Main Thread SQSV SQFA Client 1 Thread REMC SQFC Client 2 Thread REMC SQFC Auxiliary DB broker unaffected

44 © 2007 Progress Software Corporation 44 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Shutdown of Primary database Primary DB Auxiliary DB Auxiliary DB broker unaffected

45 © 2007 Progress Software Corporation 45 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Promon – Disconnect of SQFA OpenEdge SQL Server Primary DB Auxiliary DB Main Thread SQSV SQFA Client 1 Thread REMC SQFC Client 2 Thread REMC SQFC Primary and Auxiliary DB broker unaffected

46 © 2007 Progress Software Corporation 46 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Promon – Disconnect of SQFA OpenEdge SQL Server Primary DB Auxiliary DB Main Thread SQSV Primary and Auxiliary DB broker unaffected

47 © 2007 Progress Software Corporation 47 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Promon – Disconnect of REMC or SQFC OpenEdge SQL Server Primary DB Auxiliary DB Main Thread SQSV SQFA Client 1 Thread REMC SQFC Client 2 Thread REMC SQFC Primary and Auxiliary DB broker unaffected

48 © 2007 Progress Software Corporation 48 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Promon – Disconnect of REMC or SQFC OpenEdge SQL Server Primary DB Auxiliary DB Main Thread SQSV SQFA Client 1 Thread REMC SQFC Primary and Auxiliary DB broker unaffected

49 © 2007 Progress Software Corporation 49 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC In Summary  Multi-database query  Manage the configuration  Under the covers

50 © 2007 Progress Software Corporation 50 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC For More Information, go to…  PSDN  Progress eLearning Community Using OpenEdge SQL  Documentation – 10.1B OpenEdge Data Management: SQL Development OpenEdge Data Management: SQL Reference

51 © 2007 Progress Software Corporation 51 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Other Exchange Sessions  DB-10: What’s New in OpenEdge 10.1B RDBMS  DB-11: Moving to OpenEdge  COMP-10: OpenEdge Management and Replication  DB-21: Data Management Roadmap and Info Exchange

52 © 2007 Progress Software Corporation 52 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Questions?

53 © 2007 Progress Software Corporation 53 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC Thank you for your time

54 © 2007 Progress Software Corporation 54 DB-1: OpenEdge SQL multi-database environment for ODBC and JDBC


Download ppt "DB-1: OpenEdge ® SQL in a 10.1B multi- database environment for ODBC and JDBC Brian Werne Sr. Engineering Manager, OpenEdge SQL and OpenEdge Management."

Similar presentations


Ads by Google