Domino, DB2 and ... The other (IBM AS/400) That is: how to mix data from Domino and AS/400 in real-time using NSFDB2 Speakers: Cristian D’Aloisio Vincenzo Capponcelli Domino Administrator & Developers Ciemme Service s.r.l.
AGENDA
Intro to NSFDB2
How to enable NSFDB2 feature on Lotus Domino for Windows
Enabling Homogeneous Federation on DB2 server to seamlessly access data on AS/400 and mix them with Notes data
Examples: some Notes/Domino applications showing how using NSFDB2 and FEDERATION with AS/400
What is NSFDB2?
On a Domino 8 server, ability to use a DB2 server as an alternative data store
It’s a server-side technology
On a nsfdb2-enabled Domino server, not all Notes application must (or can) be saved on the DB2 data store
End-user connected to a Domino server are not aware that a Domino application is nsfdb2-enabled
Access: both Notes clients and web browsers can access a nsfdb2-enabled application
SCHEMA
What advantages? Integrations: Notes applications can access DB2 data without any batch transfer (LEI, etc.). Joining data: joining Domino data (even on several databases) and relational DB2 data Security: Domino ACL security is preserved both when data are accessed by a traditional Notes client or any other program (written in C/C++/Java etc) that access the same data saved on the DB2 server Performance: view index updating is done by the DB2 server, not by Domino Reports: accessing data from third-party reporting applications, mixing Notes and DB2 data (see IBM technote 7010956)
DOMINO DATABASES NOT CONVERTED
IMAP4 mailboxes
Shared Mail (SCOS)
Some Domino system db: e.g. names.nsf, log.nsf
NEW DESIGN ELEMENTS! 1/2
Domino Access View (DAV):
Allows developers to expose Domino data in a relational format, via a DB2 view. That’s because using DB2 as a data store does not mean developers can directly access data via SQL: it’s like a blackbox!
Notes developers chooses which Notes data , actually saved on the DB2 data storage, will be available to both Notes clients and DB2 programs (C++, Java, etc)
It’s important to map DB2 users and Notes users that will access DAV data (ACL is preserved) !
NEW DESIGN ELEMENTS! 2/2
QUERY VIEW (QV)
it’s like a Notes view that shows data retrieved by a query SQL statement!
QV has no index, data is refreshed at each view access/refresh
QV can show data retrieved doing JOINs between Domino data (exposed as Domino Access View) and other DB2 data
SQL statements can be dynamic, that is you can ask Notes user for parameters and build a statement that will run and populate the QV
QV can be accessed by Notes clients and web browsers
NSFDB2 CONFIGURATIONS Local Configuration: Domino server and DB2 server are installed on the same physical server Remote Configuration: Domino server and DB2 server are installed on two different physical servers
SUPPORTED DB2 RELEASES (8.0.2 release notes)
DB2 Enterprise Server Ed 9.1 FP2 - Microsoft Windows 32-bit
DB2 Enterprise Server Ed 9.1 interim special build 2a - IBM AIX and Linux (SLES10 & RHEL5) 64-bit
DB2 Workgroup Server Ed 9.1 FP2 - Microsoft Windows 32 bit
DB2 Workgroup Server Ed 9.1 interim special build 2a - IBM AIX and Linux (SLES10 & RHEL5) 64-bit
Linux, AIX, Windows... What about AS/400 !?
NSFDB2 IS NOT available for Domino 8 on AS/400 (i Series,...) !
Workaround ! Enable Homogeneous Federation on the DB2 server! You can configure DB2 server to seamlessly “link” some remote tables (aka “files” on AS/400) and use them as local tables, mixing them with Notes data
Licensing: using a DB2 server for NSFDB2 ONLY is free, using the FEDERATION feature on the same DB2 server IS NOT FREE (to date).
WE’D LIKE BRINGING AS/400 TO THIS EVENT... .... BUT SOME COLLEAGUES DID NOT AGREE WITH US! WE’LL USE A VPN CONNECTION ;-)
WHAT WE USED IN OUR LOCAL NSFDB2 CONFIGURATION (WINDOWS)
Lotus Domino 8.0.2 Enterprise
DB2 Access for Lotus Domino 8.0.2
IBM DB2 9.1 fix pack 2
STEP 1: DOMINO INSTALLATION
Lotus Domino 8.0.2 Enterprise installation
Enabling Domino Transaction Log
STEP2: DB2 SERVER INSTALLATION
Local configuration : installing DB2 server on the same server where we installed Domino server (Windows OS)
creating a Windows account ( DB2ADMIN) and a group ( DB2DOM)
DB2 server 9.1 installation using Window user DB2ADMIN
setting a DB2 environment variable, SYSCTRL_GROUP , to include the Windows group DB2DOM
TIP (Windows OS) Be sure to setup Domino server as DEPENDENT from DB2 server: Domino server service can be run ONLY after DB2 server service is already running (need some Windows registry tweaking)
DB2 SERVER: slideshow
STEP3: “DB2 ACCESS for Domino” installation
First, create a “special” Domino server ID file that will be used by the “DB2 Access for Domino” (use Domino Administrator client)
Start the “DB2 Access for Domino” installation on the server that host your DB2 server (actually the same server where we also installed Domino)
Enable Domino server to DB2
Restart Domino server
Test DB2 Access for Domino , using Domino Administrator client
DB2 Access for Domino: slideshow
Some settings from Domino Administrator client
Map each Domino user to a DB2 user: eg. Domino Administrator with DB2ADMIN
Inside the Domino server document (names.nsf) you’ll find a new tab named “DB2“:
Set a default user that it will be used for Query View
Setup a max number of records that will be returned by a Query View (default is “500”, “0” means all)
ENABLING “HOMOGENEOUS FEDERATION” ON DB2
On the DB2 server, allows you to define one or more tables that are actually defined on a remote AS/400 system
Since you’re using a DB2 server for Domino NSFDB2 feature, you can federate remote AS/400 tables and seamlessly use them in any Query View
FEDERATION: slideshow
FAQ 1
How to enable a Notes application to NSFDB2 data storage? Run the following Domino console command: load compact -p mydbname.nsf
FAQ 2
Is it possible possible to programmatically change the Query View selection query? Use the undocumented NotesView property selectionQuery : e.g. view.SelectionQuery= | ” SELECT * FROM schema.tabella ” |
Call view.Refresh
FAQ 3
How to read QV data using LS agents (or Java agents)? Use the NotesViewEntrycollection class to browse all data showed by the QV:
DEMO 1
that’s an example about querying AS/400 in real-time using SQL
company data are retrieved on AS/400
orders are collected on a nsfdb2-enabled Notes application and exposed via a Domino Access View
items cost are also retrieved querying a AS/400 system
DEMO 2
Notes application to manage returned imperfect items
items data are retrieved from AS/400
data are “mixed” using Query View : real-time data JOINing between AS/400 data and Notes data
RESOURCES
Administrator e Designer guides ;-)
IBM technotes: http://www-01.ibm.com/support/docview.wss?rs=1041&uid=swg27010956
Notepad++ http://notepad-plus.sourceforge.net/it/site.htm Useful text editor (with several plug-ins) to unwrap multi-line SQL statements and reformat them to a maximum row length, compatible with @formula inside QV selection query.
SQLinForm http://www.sqlinform.com/ Useful tool to reformat SQL statements for Query Views: transforming one-line SQL statements to more friendly multi-line SQL statements
HOW TO KEEP IN TOUCH WITH US? Cristian D'Aloisio [email_address] Vincenzo Capponcelli [email_address]
0 comments
Post a comment