sql511 - sql anywhere deployment tips and … · sql511 - sql anywhere deployment tips and...

26
SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES Bill Hillis – [email protected] Senior Manager, Software Engineering iAnywhere Solutions

Upload: phungkiet

Post on 02-Oct-2018

245 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES

Bill Hillis – [email protected] Manager, Software EngineeringiAnywhere Solutions

Page 2: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Agenda

• Overview• Ways to distribute files• Details – Directory structure• Details – Files• Deploying connection information• Deploying databases

Page 3: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Overview

• Definition: Deployment Delivering a subset of files to a customer’s machine

• Warning: Check your license agreement Redistribution of files is subject to your license agreement with

Sybase

Page 4: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Ways to Distribute Files

• Currently two ways Use the SQL Anywhere installer in silent mode Develop your own installation program

• Coming soon: Deployment Wizard

Page 5: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Silent Installs

• Include the SQL Anywhere install image with your own installation program• Plays back without user intervention• Record with ‘setup –r’• Install with ‘setup –s –f1”c:\windows\setup.ins”• Or ‘setup TARGET_DIR=c:\asa90

SHARED_DIR=c:\asa90\shared –s –f1”…”

Page 6: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Silent Installs

• Advantages Simple Requires no knowledge of ASA deployment SQL Anywhere install guaranteed to be correct

• Disadvantages Large install image (150 Meg) Harder to install EBFs

Page 7: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Custom Installs

• Develop your own install program• We provide InstallShield template, objects and merge modules to assist you• Use the documentation to determine what files to include

Page 8: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Custom Installs

• Advantages Flexible, generate small installs Use any version, including EBFs

• Disadvantages More work Requires more information about SQL Anywhere files Our templates/objects/merge modules are limited

Page 9: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

New Option: Deployment Wizard

• Tool displays list of SQL Anywhere components• Generates a Windows installer file (.MSI)• Similar in nature to CE deployment installer• Idea was suggested by a customer

Page 10: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Windows Installer

• Microsoft technology introduced to install Office 2000• Technology freely available for download from Microsoft• An MSI file is actually a database A collection of table and columns Use SQL statements to populate the tables that describe the

files, directories, registry entries, etc.

Page 11: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Demo

Page 12: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Deployment Wizard Future

• Releasing ‘soon’ for 9.0.2 customers Contact me if you’re interested ([email protected])

• In Jasper, planning to replace current InstallShield templates, objects, merge modules• Adding ability in Jasper to also create MSM

Page 13: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Details – Directory Structure

• You need to maintain the SQL Anywhere directory structure• Two key registry entries: HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL Anywhere directory Shared Location = root of shared directory

Page 14: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Directory Structure

• SQL Anywhere directory• Referred to as <TARGETDIR>• Environment variable ASANY9 points here• Default location is: C:\Program Files\Sybase\SQL Anywhere 9 Win32 Java Scripts Charsets

Page 15: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Directory Structure

• Shared directory• Referred to as <SHAREDDIR>• Environment variable ASANYSH9 points here• Default location is: C:\Program Files\Sybase\Shared Sybase Central 4.3 jConnect-5_5 jutils-2_0 Sun\jre142 Win32 Java

Page 16: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Details

• Details in sasource.xml• Describes structure of Deployment Wizard Client Interfaces SQL Anywhere Server MobiLink Administration Tools

Page 17: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Details – Common Files

• Files common to all SQL Anywhere components <TARGETDIR>\win32\dblgen9.dll <TARGETDIR>\win32\dbcon9.dll

• Language DLL format is dblgXX9.dll• Other languages available: DE, FR, JA, ZH ES, IT, KO, PL, PT, RU, TW, UK

Page 18: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Self-registering Files

• Some files like the ODBC driver need to be self-registered• Create their required registry entries• From the command line: regsvr32 dbodbc9.dll

• From a program: Call the DLLRegisterServer entrypoint in the dll

Page 19: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Global Assembly Cache

• .NET assemblies need to be put in the Global Assembly Cache (GAC)• GAC stores shared assemblies iAnywhere.Data.AsaClient.dll policy.9.0.iAnywhere.Data.AsaClient.dll

• Use GACUTIL.EXE to register assemblies

Page 20: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Deploying Connection Information

• Don’t hardcode in your program• Generally done with an ODBC datasource• User datasources in HKEY_CURRENT_USER• System datasources in HKEY_LOCAL_MACHINE• \Software\ODBC\ODBC.INI\ODBC Data Sources mydsn=Adaptive Server 9.0

Page 21: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Deploying Connection Information

• \Software\ODBC\ODBC.INI\mydsn Driver=<TARGETDIR>\win32\dbodbc9.dll UID=dba PWD=sql ServerName=myserver DatabaseName=mydb Links=tcpip{…} Start=<TARGETDIR>\win32\dbeng9.exe DatabaseFile=<path>\mydb.db

Page 22: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Deploying Connection Information

• File datasources• Default location stored in registry• HKLM\Software\ODBC\ODBC.INI\ODBC File DSN DefaultDSNDir=<path>

• Usually C:\Program Files\Common Files\ODBC\Data Sources

• In your program SQLDriverConnect( …, “FILEDSN=mydsn.dsn”, … )

Page 23: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

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 the server’s –r switch Use a write file on read-write drive

Page 24: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

Summary

• Overview• Ways to distribute files• Details – Directory structure• Details – Files• Deploying connection information• Deploying databases

Page 25: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

iAnywhere at TechWave 2005

Ask the iAnywhere Experts on the Technology Boardwalk (exhibit hall)• Drop in during exhibit hall hours and have all your questions answered by our

technical experts!• Appointments outside of exhibit hall hours are also available to speak one-on-one

with our Senior Engineers. Ask questions or get your yearly technical review – ask us for details!

TechWave ToGo Channel• TechWave ToGo, an AvantGo channel providing up-to-date information about

TechWave classes, events, maps and more –now available via your handheld device!

• www.ianywhere.com/techwavetogo

iAnywhere Developer Community - A one-stop source for technical information!Access to newsgroups,new betas and code samples• Monthly technical newsletters• Technical whitepapers,tips and online product documentation• Current webcast,class,conference and seminar listings• Excellent resources for commonly asked questions• All available express bug fixes and patches • Network with thousands of industry experts

http://www.ianywhere.com/developer/

Page 26: SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND … · SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES ... HKLM\Software\Sybase\Adaptive Server Anywhere\9.0 Location = root of SQL

SQL Anywhere ‘Jasper’ Release

Learn more about 'Jasper', the upcoming SQL Anywhere release, loaded with features focused on:• Enhanced data management including performance, data protection, and

developer productivity• Innovative data movement including manageability, flexibility and

performance, and messaging

Attend the following sessions:SQL Anywhere 'Jasper' New Feature Overview Session SQL512 will be held Monday, August 22nd, 1:30pm

MobiLink 'Jasper' New Feature OverviewSession SQL515 will be held Wednesday, August 24th, 1:30pm

... and remember to look for sneak peeks in other sessions and morning education courses!

Register for the Jasper Beta program:www.ianywhere.com/jasper