480 likes | 610 Views
EM411 ASA Deployment – Tips and Techniques. Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com. Overview Directory structure and required files Deploying connection information Deploying databases Ways to distribute files Mobile Manager
E N D
EM411ASA Deployment – Tips and Techniques • Bill Hillis • Senior Manager, Engineering • iAnywhere Solutions • hillis@sybase.com
Overview Directory structure and required files Deploying connection information Deploying databases Ways to distribute files Mobile Manager Obtaining maintenance and software updates Agenda
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 Overview
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
SQL Remote deployment Deploying a SQL Remote solution is an extension of embedded database MobiLink deployment Deploy a central MobiLink server, and MobiLink clients to users Deployment Models (cont)
Client-Server Architecture Client Application Interface ODBC OLEDB DBLib JDBC Open Client Database Server Database
Personal database server – dbeng7.exe – single user, same machine Network database server – dbsrv7.exe – multi-user, network access Runtime database server – rteng7.exe – single user, same machine, free deployment, restricted features Authenticated servers – special versions of dbeng7.exe and dbsrv7.exe – only work with authenticated applications ASA Database Servers
On the client machine Your application Interface files Connection information On the server machine Database server Database file What Files Do You Need
You need to maintain the ASA directory structure Registry: HKLM\Software\Sybase\Adaptive Server Anywhere\7.0 Location = root of ASA directory Shared Location = root of shared directory Directory Structure
ASA Directory (referred to as <ASA>) C:\Program Files\Sybase\SQL Anywhere 7 Win32 Charsets Java Scripts Directory Structure (cont)
Shared Directory (referred to as <Shared>) C:\Program Files\Sybase\Shared Sybase Central 4.0 jConnect-4_2 jConnect-5_2 jutils-2_0 docs-42_52 Sun\jdk122\jre Java Win32 Directory Structure (cont)
Common files dblgen7.dll, dbcon7.dll, dbipx7.dll ODBC dbodbc7.dll, dbodtr7.dll + common + MDAC OLEDB dboledb7.dll + common + MDAC DBLib dblib7.dll + common + MDAC Interface Files
JDBC Sun JRE, and jConnect directories Open Client Lots of files Interface Files (cont)
Contains error messages and strings dblgXX7.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 Language DLL
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, FoxPro) MDAC
ODBC (C:\Winnt\System32) ds16gt.dll, ds32gt.dll, mtxdm.dll, odbc16gt.dll, odbc32.dll, odbc32gt.dll, odbcad32.exe, odbccp32.cpl, odbccp32.dll, odbccr32.dll, odbccu32.dll, odbcint.dll, odbctrac.dll OLEDB (C:\Program Files\Common Files\System\ole db) msdadc.dll, msdaenum.dll, msdaer.dll, msdaosp.dll, msdaps.dll, msdasc.dll, msdasql.dll, msdasqlr.dll, msdatl2.dll, msdatt.dll, msdaurl.dll, msxactps.dll, oledb32.dll, oledb32a.dll, oledb32r.dll, oledb32x.dll ADO (C:\Program Files\Common Files\System\ado) msader15.dll, msado15.dll, msado20.tlb, msado21.tlb, msadomd.dll, msador15.dll, msadox.dll, msadrh15.dll MDAC Details
RDS (C:\Program Files\Common Files\System\msadc) msadce.dll, msadcer.dll, msadcf.dll, msadcfr.dll, msadco.dll, msadcor.dll, msadcs.dll, msadds.dll, msaddsr.dll, msdaprsr.dll, msdaprst.dll, msdarem.dll, msadremr.dll, msdatsrc.tlb, msdfmap.dll Common (C:\Winnt\System32) asycfilt.dll, oleaut32.dll, olepro32.dll, stdole2.tlb ctl3d32.dll, msvcirt.dll, msvcrt.dll, msvcrt40.dll msdart32.dll, msdamg9x.dll MDAC Details (cont)
Driver needs to be registered with driver manager HKLM\Software\ODBC\ODBCINST.INI\Adaptive Server Anywhere 7.0 Driver = full path to dbodbc7.dll Setup = full path to dbodbc7.dll HKLM\Software\ODBC\ODBCINST.INI\ODBC Drivers Adaptive Server Anywhere 7.0 = Installed Or: let the driver register itself Configuring the ODBC Driver
Two ways to do this From the command-line regsvr32 dbodbc7.dll From a program module = LoadLibrary( “dbodbc7.dll” ); proc = GetProcAddress( module, “DLLRegisterServer” ); rc = *proc(); FreeLibrary( module ); Self-Registering DLLs
Driver needs to be registered with COM HKCR\ASAProv (Default) = Sybase ASA OLE DB Provider HKCR\ASAProv\CLSID (Default) = {41dfe9e0-db91-11d2-8c43-006008d26a6f} HKCR\ASAEnum and HKCR\ASAErrorLookup etc. Or: let the driver register itself Configuring the OLEDB driver
Technical support aid On client and server machines Classic version may be better for machines with limited resources <ASA>\win32\dbisqlc.exe Requires common, dblib7.dll, MDAC, libunic.dll Deploying Interactive SQL
Rich user-interface, and cross-platform support <ASA>\java directory isql.jar, jlogon.jar <ASA>\win32 directory dbisql.exe, dbisqlg.exe, dbput7.dll, dblib7.dll + common + MDAC Shared Java components Deploying Java ISQL
Shared directory java (sceditor40.jar, queryeditor40.jar, jsyblib.jar) win32 (jsyblib.dll) Sun\jdk122\jre\… jConnect-4_2\… jConnect-5_2\… jutils-2_0\… docs-42_52\… Shared Java Components
Sybase Central Viewer Registry: HKLM\Software\Sybase\Sybase Central\4.0 Location = root of Sybase Central directory Shared Location = root of shared directory Additional Classpath = <ASA>\java\jlogon.jar;<Shared>\jConnect-5_2\classes\jconn2.jar Deploying Sybase Central 4.0
Sybase Central directory In the Shared directory <Shared>\Sybase Central 4.0 Java (sybasecentral.jar, scjview.exe, scjlgen.dll, bridge32.jar, jcchart400k.jar, scwven40.*) Shared Java components Deploying Sybase Central 4.0 (cont)
ASA Plugin <ASA>\Java asaplugin.jar, jlogon.jar <ASA>\Win32 dbput7.dll, dblib7.dll + common + MDAC Register the plugin <Shared>\Sybase Central 4.0\java\.scRepository Deploying Sybase Central 4.0 (cont)
# Adaptive Server Anywhere 7.0.3 Provider installed 6-14-2001 11:44:32 Providers/asa70/ProviderId=asa70 Providers/asa70/Provider=com.sybase.asiq.plugin.ASAPlugin Providers/asa70/Classpath=C:\\PROGRA~1\\Sybase\\SQLANY~1\\java\\ASAPLU~1.JAR Providers/asa70/AdditionalClasspath=C:\\PROGRA~1\\Sybase\\SQLANY~1\\java\\isql.jar;C:\\PROGRA~1\\Sybase\\SQLANY~1\\java\\PROCDE~1.JAR;C:\\PROGRA~1\\Sybase\\Shared\\java\\QUERYE~1.JAR Providers/asa70/Version=7.0.3 Providers/asa70/Name=Adaptive Server Anywhere 7 Providers/asa70/UseClassloader=true Deploying Sybase Central 4.0 (cont)
dbeng7.exe or dbsrv7.exe or rteng7.exe required files dbserv7.dll, dblgen7.dll, dbwtsp7.dll dbctrs7.dll, dbctrs7.ini, sqlactnm.h Self-register dbctrs7.dll Deploying Database Servers
optional files libunic.dll and charsets directory scripts directory dbjava7.dll, asajdbc.zip, asajio.zip, jdbcdrv.zip, asaul.zip, classes.zip dbextf.dll dbstop.exe, dbspawn.exe Deploying Database Servers (cont)
SQL Remote Architecture Database Server Message Agent Message Agent Database Server Message System Consolidated Database Remote Database
Message agent - dbremote.exe Requires dblgen7.dll, dbtool7.dll and dbwtsp7.dll One of dbvim7.dll, dbfile7.dll, dbsmtp7.dll, dbmapi7.dll Database server and database Client interface for your application Deploying SQL Remote
MobiLink Architecture Consolidated Database Server MobiLink Server MobiLink Client ODBC Stream Stream Consolidated Data Store Remote Database
On the server Consolidated database server, ODBC driver and database (can be ASA) MobiLink server – in <ASA>\win32 dbmlsrv7.exe, dbmlsv7.dll, dbmlstop.exe, dbmlput7.dll, dbmlctr7.dll, dbmlctr7.ini, dbmlctr7.h, dblgen7.dll, libunicl.dll, mlxtract.exe Self-register dbmlctr7.dll Deploying MobiLink
Stream – in <ASA>\win32 dbsock7.dll, dbser7.dll, dbhttp7.dll Security addon – in <ASA>\win32 dbtls7.dll Script files – in <ASA>\MobiLink\setup mlcpy*.sql, sync* Script files – in <ASA>\scripts syncasa.sql Deploying MobiLink (cont)
MobiLink Plugin In <ASA>\java mlplugin.jar, jlogon.jar Register the plugin <Shared>\Sybase Central 4.0\java\.scRepository Deploying MobiLink (cont)
# MobiLink Synchronization 7.0.3 Provider installed 6-14-2001 11:44:32 Providers/mobilink70/ProviderId=mobilink70 Providers/mobilink70/Provider=com.sybase.mec.mobilink.plugin.MLPlugin Providers/mobilink70/Classpath=C:\\PROGRA~1\\Sybase\\SQLANY~1\\java\\mlplugin.jar Providers/mobilink70/Version=7.0.3 Providers/mobilink70/Name=MobiLink Synchronization Providers/mobilink70/UseClassloader=true Deploying MobiLink (cont)
MobiLink Clients ASA Client In <ASA>\win32 – dbmlsync.exe Requires stream, security addon UltraLite Applications In <ASA>\win32 – ulrt7.dll Deploying MobiLink (cont)
Generally done with an ODBC datasource User datasources in HKEY_CURRENT_USER System datasources in HKEY_LOCAL_MACHINE KEY\Software\ODBC\ODBC.INI\ODBC Data Sources mydsn = Adaptive Server Anywhere 7.0 Deploying Connection Information
KEY\Software\ODBC\ODBC.INI\mydsn Driver = <ASA>\win32\dbodbc7.dll UID = dba PWD = sql DatabaseName = mydb ServerName = myserver DatabaseFile = path\mydb.db Start = <ASA>\win32\dbeng7.exe Deploying Connection Information (cont)
File datasources Location stored in HKLM\Software\ODBC\ODBC.INI\ODBC File DSN DefaultDSNDir = path Usually C:\Program Files\Common Files\ODBC\Data Sources Deploying Connection Information (cont)
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 Deploying Databases
Develop your own installation program Use the ASA installer – can be run in ‘silent mode’ Use InstallShield templates Use InstallShield objects Use Mobile Manager Which ever option you choose, you must not violate the license agreement Ways to Redistribute Files
Run without user-interaction Install the software in record mode setup –r Creates setup.iss in your C:\Windows directory Silent Installs
To use a silent install setup –s –f1”c:\winnt\setup.iss” setup TARGET_DIR=dirname SHARED_DIR=shared_dirname –s –f1”…” From InstallShield DoInstall( "ASA_install_image\setup.ins, " –s", WAIT ); Silent Installs (cont)
Response in setup.log ResultCode=X (0 if successful) Reboot result Reboot=X (1 if reboot is necessary) SMS Installs asa7.pdf in extras folder Include install image, setup.iss, asa7.pdf setup –s –SMS –m Silent Installs (cont)
New in 7.0.1 Use with InstallShield 5.x In the <ASA>\deployment folder Templates for Client, Personal Server, Network Server, Java Tools InstallShield Templates
Available from SDN http://www.sybase.com/developer/mobile Patches and EBF installs Maintain the ASA directory structure Obtaining Maintenance and Software Updates