em411 asa deployment – tips and techniques bill hillis senior manager, engineering ianywhere...

48
EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions [email protected]

Upload: juliana-daniel

Post on 17-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

EM411ASA Deployment – Tips and Techniques

Bill HillisSenior Manager, EngineeringiAnywhere [email protected]

Page 2: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere 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

Page 3: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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

Page 4: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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

Page 5: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deployment Models (cont)

• 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

Page 6: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Client-Server Architecture

ClientApplication

InterfaceODBCOLEDBDBLibJDBCOpen Client

DatabaseServer

Database

Page 7: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

ASA Database Servers

• 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

Page 8: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

What Files Do You Need

• On the client machine

• Your application

• Interface files

• Connection information

• On the server machine

• Database server

• Database file

Page 9: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Directory Structure

• 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

Page 10: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Directory Structure (cont)

• ASA Directory (referred to as <ASA>)

• C:\Program Files\Sybase\SQL Anywhere 7

• Win32

• Charsets

• Java

• Scripts

Page 11: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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

Page 12: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Interface Files

• 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

Page 13: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Interface Files (cont)

• JDBC

• Sun JRE, and jConnect directories

• Open Client

• Lots of files

Page 14: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Language DLL

• 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

Page 15: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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, FoxPro)

Page 16: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

MDAC Details

• 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

Page 17: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

MDAC Details (cont)

• 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

Page 18: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Configuring the ODBC Driver

• 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

Page 19: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Self-Registering DLLs

• 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 );

Page 20: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Configuring the OLEDB driver

• 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

Page 21: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying Interactive SQL

• 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

Page 22: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying Java ISQL

• 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

Page 23: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Shared Java Components

• 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\…

Page 24: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying Sybase Central 4.0

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

Page 25: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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, bridge32.jar, jcchart400k.jar, scwven40.*)

• Shared Java components

Page 26: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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

Page 27: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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

Page 28: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying Database Servers

• 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

Page 29: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying Database Servers (cont)

• 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

Page 30: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

SQL Remote Architecture

DatabaseServer

RemoteDatabase

DatabaseServer

ConsolidatedDatabase

MessageAgent

MessageAgent

MessageSystem

MessageSystem

Page 31: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying SQL Remote

• 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

Page 32: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

MobiLink Architecture

MobiLinkClient

RemoteDatabase

ConsolidatedDatabaseServer

ConsolidatedData Store

MobiLinkServer

ODBC Stream Stream

Page 33: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying MobiLink

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

Page 34: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying MobiLink (cont)

• 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

Page 35: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying MobiLink (cont)

MobiLink Plugin

• In <ASA>\java

• mlplugin.jar, jlogon.jar• Register the plugin

• <Shared>\Sybase Central 4.0\java\.scRepository

Page 36: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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

Page 37: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying MobiLink (cont)

MobiLink Clients

• ASA Client

• In <ASA>\win32 – dbmlsync.exe

• Requires stream, security addon

• UltraLite Applications

• In <ASA>\win32 – ulrt7.dll

Page 38: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying Connection Information

• 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

Page 39: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Deploying Connection Information (cont)

• 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

Page 40: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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

Page 41: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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

Page 42: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Ways to Redistribute Files

• 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

Page 43: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Silent Installs

• Run without user-interaction

• Install the software in record mode

• setup –r

• Creates setup.iss in your C:\Windows directory

Page 44: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Silent Installs (cont)

• 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 );

Page 45: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

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

Page 46: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

InstallShield Templates

• New in 7.0.1

• Use with InstallShield 5.x

• In the <ASA>\deployment folder

• Templates for Client, Personal Server, Network Server, Java Tools

Page 47: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Mobile Manager

Page 48: EM411 ASA Deployment – Tips and Techniques Bill Hillis Senior Manager, Engineering iAnywhere Solutions hillis@sybase.com

Obtaining Maintenance and Software Updates

• Available from SDN

• http://www.sybase.com/developer/mobile

• Patches and EBF installs• Maintain the ASA directory structure