EM 411 ASA Deployment Tips and Techniques Bill

EM 411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering i. Anywhere Solutions hillis@sybase. com

Agenda • • Overview Directory structure and required files Deploying connection information Deploying databases Ways to distribute files Mobile Manager Obtaining maintenance and software updates

Overview • Delivering a subset of files to a customer’s machine • Check your license agreement • Redistribution of files is subject to your license agreement with Sybase

Deployment Models • Client deployment • Deploy client portions of ASA, connect to a central network server • Network-server deployment • Deploy network servers to offices, and deploy clients to users • Embedded database deployment • Deploy an application that runs with the personal server. Both client and personal server deployed

Deployment Models (cont) • SQL Remote deployment • Deploying a SQL Remote solution is an extension of embedded database • Mobi. Link deployment • Deploy a central Mobi. Link server, and Mobi. Link clients to users

Client-Server Architecture Client Application Interface ODBC OLEDB DBLib JDBC Open Client Database Server Database

ASA Database Servers • Personal database server – dbeng 7. exe – single user, same machine • Network database server – dbsrv 7. exe – multi-user, network access • Runtime database server – rteng 7. exe – single user, same machine, free deployment, restricted features • Authenticated servers – special versions of dbeng 7. exe and dbsrv 7. exe – only work with authenticated applications

What Files Do You Need • On the client machine • Your application • Interface files • Connection information • On the server machine • Database server • Database file

Directory Structure • You need to maintain the ASA directory structure • Registry: HKLMSoftwareSybaseAdaptive Server Anywhere7. 0 • Location = root of ASA directory • Shared Location = root of shared directory

Directory Structure (cont) • ASA Directory (referred to as <ASA>) • C: Program FilesSybaseSQL Anywhere 7 • Win 32 • Charsets • Java • Scripts

Directory Structure (cont) • Shared Directory (referred to as <Shared>) • C: Program FilesSybaseShared • Sybase Central 4. 0 • j. Connect-4_2 • j. Connect-5_2 • jutils-2_0 • docs-42_52 • Sunjdk 122jre • Java • Win 32

Interface Files • Common files • dblgen 7. dll, dbcon 7. dll, dbipx 7. dll • ODBC • dbodbc 7. dll, dbodtr 7. dll + common + MDAC • OLEDB • dboledb 7. dll + common + MDAC • DBLib • dblib 7. dll + common + MDAC

Interface Files (cont) • JDBC • Sun JRE, and j. Connect directories • Open Client • Lots of files

Language DLL • Contains error messages and strings • dblg. XX 7. dll - where XX is the 2 -letter ISO code • other languages available • FR, DE, JA, ES, PT, IT, PL, KO, RU, TW, UK, ZH • French, German and Japanese versions are fully localized • See http: //www. sybase. com/developer/mobile

MDAC • • • Microsoft Data Access Components ASA 7. 0. 3 includes 2. 5, but 2. 6 available Available from http: //www. microsoft. com/data mdac_typ. exe Release manifest available Includes ODBC, OLEDB, ADO, RDS, (SQL Server, Oracle, Jet, Fox. Pro)

MDAC Details • ODBC (C: WinntSystem 32) • ds 16 gt. dll, ds 32 gt. dll, mtxdm. dll, odbc 16 gt. dll, odbc 32 gt. dll, odbcad 32. exe, odbccp 32. cpl, odbccp 32. dll, odbccr 32. dll, odbccu 32. dll, odbcint. dll, odbctrac. dll • OLEDB (C: Program FilesCommon FilesSystemole db) • msdadc. dll, msdaenum. dll, msdaer. dll, msdaosp. dll, msdaps. dll, msdasc. dll, msdasqlr. dll, msdatl 2. dll, msdatt. dll, msdaurl. dll, msxactps. dll, oledb 32 a. dll, oledb 32 r. dll, oledb 32 x. dll • ADO (C: Program FilesCommon FilesSystemado) • msader 15. dll, msado 20. tlb, msado 21. tlb, msadomd. dll, msador 15. dll, msadox. dll, msadrh 15. dll

MDAC Details (cont) • RDS (C: Program FilesCommon FilesSystemmsadc) • msadce. dll, msadcer. dll, msadcfr. dll, msadcor. dll, msadcs. dll, msaddsr. dll, msdaprst. dll, msdarem. dll, msadremr. dll, msdatsrc. tlb, msdfmap. dll • Common (C: WinntSystem 32) • asycfilt. dll, oleaut 32. dll, olepro 32. dll, stdole 2. tlb • ctl 3 d 32. dll, msvcirt. dll, msvcrt 40. dll • msdart 32. dll, msdamg 9 x. dll

Configuring the ODBC Driver • Driver needs to be registered with driver manager • HKLMSoftwareODBCINST. INIAdaptive Server Anywhere 7. 0 • Driver = full path to dbodbc 7. dll • Setup = full path to dbodbc 7. dll • HKLMSoftwareODBCINST. INIODBC Drivers • Adaptive Server Anywhere 7. 0 = Installed • Or: let the driver register itself

Self-Registering DLLs • Two ways to do this • From the command-line • regsvr 32 dbodbc 7. dll • From a program • module = Load. Library( “dbodbc 7. dll” ); • proc = Get. Proc. Address( module, “DLLRegister. Server” ); • rc = *proc(); • Free. Library( module );

Configuring the OLEDB driver • Driver needs to be registered with COM • HKCRASAProv • (Default) = Sybase ASA OLE DB Provider • HKCRASAProvCLSID • (Default) = {41 dfe 9 e 0 -db 91 -11 d 2 -8 c 43006008 d 26 a 6 f} • HKCRASAEnum and HKCRASAError. Lookup etc. • Or: let the driver register itself

Deploying Interactive SQL • Technical support aid • On client and server machines • Classic version may be better for machines with limited resources • <ASA>win 32dbisqlc. exe • Requires common, dblib 7. dll, MDAC, libunic. dll

Deploying Java ISQL • Rich user-interface, and cross-platform support • <ASA>java directory • isql. jar, jlogon. jar • <ASA>win 32 directory • dbisql. exe, dbisqlg. exe, dbput 7. dll, dblib 7. dll + common + MDAC • Shared Java components

Shared Java Components • Shared directory • java (sceditor 40. jar, queryeditor 40. jar, jsyblib. jar) • win 32 (jsyblib. dll) • Sunjdk 122jre… • j. Connect-4_2… • j. Connect-5_2… • jutils-2_0… • docs-42_52…

Deploying Sybase Central 4. 0 Sybase Central Viewer • Registry: HKLMSoftwareSybase Central4. 0 • Location = root of Sybase Central directory • Shared Location = root of shared directory • Additional Classpath = <ASA>javajlogon. jar; <Shared>j. Connect 5_2classesjconn 2. jar

Deploying Sybase Central 4. 0 (cont) • Sybase Central directory • In the Shared directory • <Shared>Sybase Central 4. 0 • Java (sybasecentral. jar, scjview. exe, scjlgen. dll, bridge 32. jar, jcchart 400 k. jar, scwven 40. *) • Shared Java components

Deploying Sybase Central 4. 0 (cont) ASA Plugin • <ASA>Java • asaplugin. jar, jlogon. jar • <ASA>Win 32 • dbput 7. dll, dblib 7. dll + common + MDAC • Register the plugin • <Shared>Sybase Central 4. 0java. sc. Repository

Deploying Sybase Central 4. 0 (cont) • # Adaptive Server Anywhere 7. 0. 3 Provider installed 6 -14 -2001 11: 44: 32 • Providers/asa 70/Provider. Id=asa 70 • Providers/asa 70/Provider=com. sybase. asiq. plugin. ASAPlugin • Providers/asa 70/Classpath=C: \PROGRA~1\Sybase\SQLANY~1\jav a\ASAPLU~1. JAR • Providers/asa 70/Additional. Classpath=C: \PROGRA~1\Sybase\SQL ANY~1\java\isql. jar; C: \PROGRA~1\Sybase\SQLANY~1\java\P ROCDE~1. JAR; C: \PROGRA~1\Sybase\Shared\java\QUERYE~1. JAR • Providers/asa 70/Version=7. 0. 3 • Providers/asa 70/Name=Adaptive Server Anywhere 7 • Providers/asa 70/Use. Classloader=true

Deploying Database Servers • dbeng 7. exe or dbsrv 7. exe or rteng 7. exe • required files • dbserv 7. dll, dblgen 7. dll, dbwtsp 7. dll • dbctrs 7. dll, dbctrs 7. ini, sqlactnm. h • Self-register dbctrs 7. dll

Deploying Database Servers (cont) • optional files • libunic. dll and charsets directory • scripts directory • dbjava 7. dll, asajdbc. zip, asajio. zip, jdbcdrv. zip, asaul. zip, classes. zip • dbextf. dll • dbstop. exe, dbspawn. exe

SQL Remote Architecture Database Server Consolidated Database Message Agent Message System Database Server Remote Database

Deploying SQL Remote • Message agent - dbremote. exe • Requires dblgen 7. dll, dbtool 7. dll and dbwtsp 7. dll • One of dbvim 7. dll, dbfile 7. dll, dbsmtp 7. dll, dbmapi 7. dll • Database server and database • Client interface for your application

Mobi. Link Architecture Consolidated Database Server Consolidated Data Store ODBC Mobi. Link Stream Server Stream Mobi. Link Client Remote Database

Deploying Mobi. Link On the server • Consolidated database server, ODBC driver and database (can be ASA) • Mobi. Link server – in <ASA>win 32 • dbmlsrv 7. exe, dbmlsv 7. dll, dbmlstop. exe, dbmlput 7. dll, dbmlctr 7. ini, dbmlctr 7. h, dblgen 7. dll, libunicl. dll, mlxtract. exe • Self-register dbmlctr 7. dll

Deploying Mobi. Link (cont) • Stream – in <ASA>win 32 • dbsock 7. dll, dbser 7. dll, dbhttp 7. dll • Security addon – in <ASA>win 32 • dbtls 7. dll • Script files – in <ASA>Mobi. Linksetup • mlcpy*. sql, sync* • Script files – in <ASA>scripts • syncasa. sql

Deploying Mobi. Link (cont) Mobi. Link Plugin • In <ASA>java • mlplugin. jar, jlogon. jar • Register the plugin • <Shared>Sybase Central 4. 0java. sc. Repository

Deploying Mobi. Link (cont) • # Mobi. Link Synchronization 7. 0. 3 Provider installed 6 -14 -2001 11: 44: 32 • Providers/mobilink 70/Provider. Id=mobilink 70 • Providers/mobilink 70/Provider=com. sybase. mec. mobilink. plugin. MLP lugin • Providers/mobilink 70/Classpath=C: \PROGRA~1\Sybase\SQLANY ~1\java\mlplugin. jar • Providers/mobilink 70/Version=7. 0. 3 • Providers/mobilink 70/Name=Mobi. Link Synchronization • Providers/mobilink 70/Use. Classloader=true

Deploying Mobi. Link (cont) Mobi. Link Clients • ASA Client • In <ASA>win 32 – dbmlsync. exe • Requires stream, security addon • Ultra. Lite Applications • In <ASA>win 32 – ulrt 7. dll

Deploying Connection Information • • Generally done with an ODBC datasource User datasources in HKEY_CURRENT_USER System datasources in HKEY_LOCAL_MACHINE KEYSoftwareODBC. INIODBC Data Sources • mydsn = Adaptive Server Anywhere 7. 0

Deploying Connection Information (cont) • KEYSoftwareODBC. INImydsn • Driver = <ASA>win 32dbodbc 7. dll • UID = dba • PWD = sql • Database. Name = mydb • Server. Name = myserver • Database. File = pathmydb. db • Start = <ASA>win 32dbeng 7. exe

Deploying Connection Information (cont) • File datasources • Location stored in HKLMSoftwareODBC. INIODBC File DSN • Default. DSNDir = path • Usually C: Program FilesCommon FilesODBCData Sources

Deploying Databases • Deploy a database by copying the. DB file onto the user’s system • . LOG file not required • Deploy on read-only media in two ways • Use server’s –r switch • Use a write file on read-write drive

Ways to Redistribute Files • • • Develop your own installation program Use the ASA installer – can be run in ‘silent mode’ Use Install. Shield templates Use Install. Shield objects Use Mobile Manager Which ever option you choose, you must not violate the license agreement

Silent Installs • • Run without user-interaction Install the software in record mode • setup –r • Creates setup. iss in your C: Windows directory

Silent Installs (cont) • • To use a silent install • setup –s –f 1”c: winntsetup. iss” • setup TARGET_DIR=dirname SHARED_DIR=shared_dirname –s –f 1”…” From Install. Shield • Do. Install( "ASA_install_imagesetup. ins, " –s", WAIT );

Silent Installs (cont) • • • Response in setup. log • Result. Code=X (0 if successful) Reboot result • Reboot=X (1 if reboot is necessary) SMS Installs • asa 7. pdf in extras folder • Include install image, setup. iss, asa 7. pdf • setup –s –SMS –m

Install. Shield Templates • • New in 7. 0. 1 Use with Install. Shield 5. x In the <ASA>deployment folder Templates for Client, Personal Server, Network Server, Java Tools

Mobile Manager

Obtaining Maintenance and Software Updates • • Available from SDN http: //www. sybase. com/developer/mobile Patches and EBF installs Maintain the ASA directory structure
- Slides: 48