sql511 - sql anywhere deployment tips and … · sql511 - sql anywhere deployment tips and...
TRANSCRIPT
SQL511 - SQL ANYWHERE DEPLOYMENT TIPS AND TECHNIQUES
Bill Hillis – [email protected] Manager, Software EngineeringiAnywhere Solutions
Agenda
• Overview• Ways to distribute files• Details – Directory structure• Details – Files• Deploying connection information• Deploying databases
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
Ways to Distribute Files
• Currently two ways Use the SQL Anywhere installer in silent mode Develop your own installation program
• Coming soon: Deployment Wizard
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”…”
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
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
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
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
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.
Demo
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
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
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
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
Details
• Details in sasource.xml• Describes structure of Deployment Wizard Client Interfaces SQL Anywhere Server MobiLink Administration Tools
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
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
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
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
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
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”, … )
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
Summary
• Overview• Ways to distribute files• Details – Directory structure• Details – Files• Deploying connection information• Deploying databases
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/
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