Download Database

Document related concepts
no text concepts found
Transcript
DB-16: In Any Case, the Devil’s in the
DataServer Details
That which we persist in doing becomes easier,
not that the task itself has become easier,
but that our ability to perform it has improved.
Ralph Waldo Emerson (1803 - 1882)
David Moloney
Principal,
Progress OpenEdge
Agenda
 A Story
 Terminology & Technology Sync-up
 The Devils in the Details
• Case Studies
– ABL & DataServer
– ABL & the RDBMS
– DataServer & RDBMS
– DataServer & API Access Drivers
 DataServer Performance
 Summary & Questions
2
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
A Story
Once Upon A Time …
Mary and the three
DataServers
3
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Mary meets Compiler
For Each
Display Cust
ABL
4
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Client meets Server
OpenEdge™
Database
5
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Where’s the love ? Where’s my pie ?
Oracle
6
Microsoft
IBM
SQL Server
DB2
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
For Each What ?
Habla
“For Each” ?
For Each
Display Cust
ABL
7
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Hmmm….
For Each
Display Cust
ABL
8
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
I’ve got Bingo !
For Each
Display Cust
ABL
9
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Trusted friends
ODBC
Driver
Manager
Driver
Data
Source
Driver
Data
Source
DB2 Informix
Driver
OE DB
Data
Source
Sybase
OCI
API
SQL*Net
Data
Source
Oracle
10
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Mary makes a house call
Hey Man …
It’s all about the
“For Each”
OE DB
For Each
Display Cust
ABL
11
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Bravo !
12
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The End
13
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
That was then …
OE DB
For Each
Display Cust
ABL
14
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Terminology & Technology Sync-up
15
MS SQL
Oracle
Server
SQL Server
DB-16: In Any Case, the Devil’s in the DataServer Details
OpenEdge
Database
© 2007 Progress Software Corporation
Terminology & Technology Sync-up
MS SQL
Oracle
Server
SQL Server
OpenEdge
Database
DataServer Broker
-
SQL
16
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Terminology & Technology Sync-up
MS SQL
Oracle
Server
SQL Server
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
OpenEdge
Database
INT
CHAR
INT
CHAR
1
J
2
Alsop
DataServer Broker
-
SQL
17
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Terminology & Technology Sync-up
MS SQL
Oracle
Server
SQL Server
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
OpenEdge
Database
INT
CHAR
INT
CHAR
1
J
2
Alsop
DataServer Broker
-
SQL
18
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Terminology & Technology Sync-up
MS SQL
Oracle
Server
SQL Server
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
OpenEdge
Database
INT
CHAR
INT
CHAR
1
J
2
Alsop
DataServer Broker
-
SQL
19
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Sync-up: 4-Tier Perspective
MS SQL
Oracle
OpenEdge
Server
SQL Server
Database
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
INT
CHAR
INT
CHAR
1
J
2
Alsop
DataServer Broker
-
SQL
20
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Sync-up: Self-Service Client 3-Tier Perspective
MS SQL
Oracle
OpenEdge
Server
SQL Server
Database
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
21
DB-16: In Any Case, the Devil’s in the DataServer Details
INT
CHAR
INT
CHAR
1
J
2
Alsop
© 2007 Progress Software Corporation
Sync-up: Application-centric
Application Centric - Just another Oracle OCI or ODBC Client
Oracle
A B C
DB2
SELECT
UPPERCASE (name)
FROM Customer
SELECT TO
UPPER(name)
FROM Customer
SELECT
UPPER(name)
FROM Customer
X Y Z
OpenEdge
1
2
3
FOR EACH
Customer
SQL
Server
Schema
22
Schema
PUSH
OpenEdge
PULL
DB-16: In Any Case, the Devil’s in the DataServer Details
DataServer
- - - - - - -
OpenEdge Client
© 2007 Progress Software Corporation
Sync-up: Client-Server Perspective
MS SQL
Oracle
OpenEdge
Server
SQL Server
Database
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
INT
CHAR
INT
CHAR
1
J
2
Alsop
DataServer Broker
-
SQL
23
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Sync-up: Component Perspective
MS SQL
Oracle
Server
SQL Server
OpenEdge
Database
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
24
DB-16: In Any Case, the Devil’s in the DataServer Details
INT
CHAR
INT
CHAR
1
J
2
Alsop
© 2007 Progress Software Corporation
Sync-up: DataServer Component Layers
Progress ABL
Dataserver Layer
Dataserver Client
Dataserver Server
25
ODBC
OCI
MS SQL Srvr
Oracle
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
OpenEdge Reference Architecture
For Service Oriented Business Applications
Design for longevity, flexibility, and competitive
advantage
Enterprise Services
Business Components
Data Access
Data Sources
26
DB-16: In Any Case, the Devil’s in the DataServer Details
Common Infrastructure
Presentation
© 2007 Progress Software Corporation
Case Study: Components
27
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Case Study: Goals
 Appreciate intricacies amongst components
 Demonstrate the somewhat “arbitrary”


28
diversity DataServer issues
Create opportunities to discuss important
aspects of the DataServer architecture.
Promote the interest of a problem-solver
audience
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Case Study: Prerequisite & Disclaimer
 DataServer deference given to the database
•
•
•
•
29
On Security
On Transaction Control
On Lock Management
On Cursor Consistency
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #1
+
+
I ran a pro-to-<dataserver> migration and compiled
some code against the schema holder it built.
Everything compiled just fine.
Then I built a separate schema holder, pulled
definitions from the very same SQL database, and
connected to it. But, against this schema holder, the
compiled code fails.
Why would it matter how we create the schema holder
as long as the structure of the SQL database remains
exactly the same !
30
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
DataServer Migration
OpenEdge
Database
Item-no
MS SQL
Oracle
Server
SQL Server
Item_no
Item_no
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
INT
CHAR
1
J
2
Alsop
OpenEdge
Database
Item-no
INT
CHAR
DataServer Broker
-
SQL
31
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #1 (cont.)
Why don’t my schema holder “pull” definitions
match the OpenEdge Database they were
derived from ?
The script that built the SQL Database came
directly from OpenEdge Database !
32
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
DataServer Pushed & Pulled Independently
OpenEdge
Database
Item-no
MS SQL
Oracle
Server
SQL Server
Item_no
Item_no
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
INT
CHAR
1
J
2
Alsop
OpenEdge
Database
Item_no
INT
CHAR
DataServer Broker
-
SQL
33
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Pull & Adjust Schema
OpenEdge
Database
Item-no
MS SQL
Oracle
Server
SQL Server
Item_no
Item_no
INT
VARCHAR
INT
VARCHAR2
3
B
5
L
4
Gates
6
Ellison
INT
CHAR
1
J
2
Alsop
OpenEdge
Database
Item-no
INT
CHAR
DataServer Broker
-
SQL
34
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #2
+

+
+
We deployed a new schema holder to
our customers and their production
applications started crashing with no
warning. We didn’t make any code
changes but if we do, the application
still crashes, only with a different error.
What would cause the DataServer’s
inconsistent behavior and how can we
get an indication of the problem ?
35
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #3
+

36
+
I compiled my application against an
OpenEdge Database. Then, I did the
same against my Schema Holder. Why did
the DataServer r-code grow larger than my
OpenEdge database r-code ?
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #4
+

37
+
During a migration, I’m getting truncation
errors loading data into my SQL Server
database .
I elected the “load data” option. The
schema copied fine but migrating data from
my OpenEdge database to a DataServer
schema holder fails. Why would the
migration create definitions too small for
my data ?
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #5
+

38
+
I’m migrating an OpenEdge database to
a DataServer schema. When I elect to
load data, I get NULL-constraint and
unique-constraint violations.
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #6 (Intro.)
+
+
 Record Write & Availability
DEFINE BUFFER xcust FOR cust.
CREATE cust.
cust-num = 111.
FIND xcust
WHERE xcust.cust-num = 111.
39
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #6 (Intro.)
+

+
Record Write & Availability
DEFINE BUFFER xcust FOR cust.
CREATE cust.
cust-num = 111.
VALIDATE cust.
/* or RELEASE cust. */
FIND xcust WHERE xcust.cust-num = 111.
40
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #6
+

+
I’m getting a STOP condition trying to assign a column
value after a FIND statement. The application exits after
the ASSIGN.
How can I be sure this isn’t corrupting my database ?
DO TRANSACTION:
FIND FIRST cust.
ASSIGN name = FILL(“a”,35) NO-ERROR.
END.
41
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #6 (cont.)
+

+
But, I’m still getting the error condition
DO TRANSACTION:
FIND FIRST cust.
ASSIGN name = FILL(“a”,35)
NO-ERROR.
VALIDATE cust.
END.
42
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #6 (cont.)
+
+
DO TRANSACTION:
FIND FIRST cust.
ASSIGN name = FILL(“a”,35) /* NO-ERROR */.
VALIDATE cust NO-ERROR.
IF error-status:error THEN DO:
<some error processing>
UNDO, LEAVE.
END.
END.
43
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #6 (cont.)
+

+
But, I’m still getting the error condition
DO TRANSACTION ON ERROR UNDO,LEAVE:
FIND FIRST cust.
ASSIGN name = FILL(“a”,35) NO-ERROR.
VALIDATE cust.
CATCH Progress.Lang.AppError ae:
MESSAGE "Inside AppError Catch".
IF ae:GetMessage(1) <> ? THEN
MESSAGE ae:GetMessage(1) ae:GetMessageNum(1).
ELSE
MESSAGE "ReturnError" ae:returnvalue view-as alert-box.
DELETE OBJECT ae.
END CATCH.
CATCH Progress.Lang.ProError pe:
MESSAGE "Inside ProError Catch".
REPEAT i = 1 TO pe:NumMessages:
PUT UNFORMATTED " Error Number: " pe:GetMessageNum(i)
FORMAT ">>>>>9" SKIP "Message: " pe:GetMessage(i)
FORMAT "x(73)" SKIP.
END.
DELETE OBJECT pe.
END CATCH.
END.
44
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #6 (cont.)
+

+
Warning:
DO TRANSACTION:
FIND FIRST cust EXCLUSIVE-LOCK.
ASSIGN name = FILL(“a”,35) NO-ERROR.
VALIDATE cust.
CONTENTION EXPOSURE !
END.
45
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #7
+

+
I have two clients running simultaneously.
Both create records and lock records exclusively on the same
table. Why are they getting “table is use by another user” errors ?
DO TRANSACTION:
FIND FIRST cust EXCLUSIVE-LOCK.
IF AVAILABLE cust THEN ASSIGN name = “Bob”.
REPEAT:
FIND NEXT cust EXCLUSIVE-LOCK.
IF NOT AVAILABLE cust THEN LEAVE.
Cnt = Cnt + 1.
ASSIGN name = “Bob” + STRING(cnt).
END.
END.
46
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #7 (cont.)
+
+
DO TRANSACTION:
FIND FIRST cust EXCLUSIVE-LOCK.
IF AVAILABLE cust THEN ASSIGN name = “Bob”.
REPEAT:
DO TRANSACTION:
FIND NEXT cust EXCLUSIVE-LOCK.
IF NOT AVAILABLE cust THEN LEAVE.
Cnt = Cnt + 1.
ASSIGN name = “Bob” +
STRING(cnt).
END.
END.
END.
END.
47
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #7 (cont.)
+
+
DO TRANSACTION:
FIND FIRST cust EXCLUSIVE-LOCK.
IF AVAILABLE cust THEN ASSIGN name = “Bob”.
END.
REPEAT:
DO TRANSACTION:
FIND NEXT cust EXCLUSIVE-LOCK.
IF NOT AVAILABLE cust THEN LEAVE.
Cnt = Cnt + 1.
ASSIGN name = “Bob” +
STRING(cnt).
END.
END.
END.
48
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #7 (cont.)
+

+
Another example regarding cursor consistency
DEFINE VARIABLE num AS INT INITIAL 103.
DO TRANSACTION:
FIND cust WHERE cust = num
EXCLUSIVE-LOCK.
ASSIGN name = “Bob”.
END.
FIND cust WHERE cust-num = num.
DISPLAY name.
49
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #8
+

Parenthesis around names in the WHERE clause of our join is [slow/fast],
generates multiple queries and sends index hints with the queries.
• For each customer,
each order
WHERE (order.custnum) = (cust.custnum):
Oracle documentation says joins won’t pass index hints on a server join. If we
just remove the parenthesis:
• For each customer,
each order
WHERE order.custnum = cust.custnum:
We only get one query, [better/worse] performance and no hints.
50
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #9 - Part I
+

+
In our Oracle DataServer application, one of
our users got a locked record error:
“<table> in use by <user> on <tty>.
Wait or press CTRL-C to exit. (121)“
Pressing CTRL-C does not actually do anything.
Our client script isn’t trapping CTRL-C, so
what is ?
NOTE: stty on Unix shows Ctrl-C is mapped
51
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #9 - Part II
+

+
Why did I get a “System Error 126” on
Windows connecting through the ODBC
DataServer ?
"Specified driver could not be loaded due to system error
126"
52
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #10
+
 Our Oracle DataServer application is running
fine. Why does our application all of a
sudden have a problem with an invalid cursor
and then exit ?
53
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #11
+
 We migrated our legacy Oracle DataServer
application from an earlier Progress
implementation, that used “shadow columns”,
to OpenEdge where it uses Function-based
indexes. Why are we now seeing
performance problems that appear to be
related to Function Based Indexes ?
54
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #11 (cont.)
+
 DataServer Rule:
USE-INDEX and BY clauses affect the SQL
ORDER BY clause. This guarantees the
order of the results but does NOT guarantee
the index selections of an execution plan.
55
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #12
+

+
+
We’ve converted our legacy DB2/400 database to run
against the ODBC DataServer. Some of our existing
tables don’t have indexes so we describe indexes in
the schema holder that satisfy the DataServer’s
ROWID requirements. But when we display results
for these tables, from a query like the following, why
do some records show up twice in our result set ?
FOR EACH <table>:
DISPLAY <table>.
END.
56
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #12 (cont.)
+
+
+
FOR EACH <table> SHARE-LOCK:
DISPLAY <table>.
END.
57
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #12 (cont.)
+
+
+
FOR EACH <table> EXCLUSIVE-LOCK:
DISPLAY <table>.
END.
___________________________________
SELECT <columns> FROM <table> WHERE
<key-components> = <key-value>
-- or -<RECID> = <recid-value>
58
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Case Study #12 (cont.)
+
+
+
 DataServer Rule:
Uniqueness is critical to proper functioning of
DataServer cursors. Random access reads
and all transactional activity is dependent on
being able to locate an individual row.
59
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Performance Study
 Why can’t data access through a DataServer
be a fast as OpenEdge native access ?
60
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Performance Study
FIND FIRST Customer NO-LOCK NO-ERROR.
IF AVAILABLE Customer THEN Cnt = 1.
REPEAT:
FIND NEXT Customer NO-ERROR.
IF NOT AVAILABLE (Customer) THEN LEAVE.
Cnt = Cnt + 1.
END.
OPEN QUERY q FOR EACH Customer NO-LOCK.
REPEAT:
GET NEXT q.
IF NOT AVAILABLE Customer THEN LEAVE.
Cnt = Cnt + 1.
END.
CLOSE QUERY q.
61
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Performance Study



Replace FIND statements with FORs & QUERYs
• FIND FIRST customer -> FOR FIRST customer: END.
• FIND LAST order -> bBuffer:FIND-LAST().
Be explicit about lock type
Field Lists
• FOR EACH customer FIELDS(cust-num name) NO-LOCK:
• Make sure to include all fields you reference. This compiles:


FIND FIRST customer FIELDS(cust-num) WHERE
CAN-FIND(FIRST order WHERE order.st = cust.st)
Write JOIN-BY-SQLDB queries
• FOR EACH customer, EACH order:
Index Reposition
• OPEN QUERY q1 FOR EACH order INDEXED-REPOSITION
• REPOSITION q1 to recid myid
62
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Performance Study
 Query structure
• Don’t get fancy
– WHERE (city + STRING(“,”) + state) = …
– Complex joins may require a client join or client
selection
• WHERE col1 = INTEGER(‘123’) is better than
WHERE STRING(col1) = “123”
• Try to make your BY clause and the expected
INDEX selection compatible to avoid
reordering: WHERE col1 = <> AND col2 = <>
By col1, BY col2
63
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Performance Study

Query Tuning
•
•
•
•
•

CACHE-SIZE(<size>)
REVERSE-FROM
(no-index-hint hint “run fast”)
NO-BIND-WHERE
NO-UNIQUE-ORDER-ADDED
Database Optimizations
• Indexes, covering idx’s (clustered idx (MSS) &
“included” columns– MSS2005)
• Updated Statistics
• Index rebuild/reorg & Fill Factors, etc.
64
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Performance Study
 Remember you can always conditionalize:
• Compile Time
&GLOBAL-DEFINE DB-TYPE ORACLE
&IF DEFINED ({&ORACLE}) &THEN …
• Run Time
IF DBTYPE(dbname) = “PROGRESS” THEN
RUN OpenEdge-optimized-code
• ELSE
RUN DataServer-optimized-code
65
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
The Devils in the Details: Performance Study

Use stored procedures:
• RUN STORED-PROC send-sql-statement hdl1 = PROC-HANDLE
(“select name, cust_num FROM customer”).
FOR EACH proc-text-buffer WHERE PROC-HANDLE = hdl1:
DISPLAY proc-text.
END.
CLOSE STORED-PROC send-sql-statement
rtn-stat = PROC-STATUS WHERE PROC-HANDLE = hdl1.
• DEF VAR ttHndl AS HANDLE
DEF TEMP-TABLE tt1 ….
ttHndl = TEMP-TABLE tt1:HANDLE.
RUN STORED-PROC send-sql-statement
(“select name, cust_num FROM customer”) LOAD-RESULT-INTO
ttHndl.
• DEF
DEF
DEF
RUN
VAR ttHndl AS HANDLE EXTENT 2.
TEMP-TABLE tt1 …
ttHndl[1] = TEMP-TABLE tt1:HANDLE.
TEMP-TABLE tt2 …
ttHndl[2] = TEMP-TABLE tt2:HANDLE.
STORED-PROC send-sql-statement
(“select name FROM customer; select order-num FROM
order”) LOAD-RESULT-INTO ttHndl.
66
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
In Summary
 Know thy Client


67
Component (ABL &
DataServer)
Know thy access
component (drivers &
configuration)
Know thy database
component (data
manager & engine)
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
For More Information, go to…
 PSDN
• “DataServer Best Practices”
• http://www.psdn.com/library/servlet/KbServlet/d
ownload/1320-102-620/ds_best_practices.pdf
 Exchange 07:
• DB-21 Data Management and Platforms
Roadmap and Info Exchange
(Wednesday 1:30-3:00 Room #200)
68
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Questions?
69
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Thank you for
your time!
70
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
71
DB-16: In Any Case, the Devil’s in the DataServer Details
© 2007 Progress Software Corporation
Related documents