New Features and Upgrading Guide
CHAPTER 5. Upgrading to Adaptive Server Anywhere
You can upgrade Version 5 ODBC applications in the following ways:
Replace the Version 5 ODBC data source with a Version 6 ODBC data source. This approach is a complete upgrade, and is described in this section.
Use the compatibility library to connect to a Version 6 database server. If you choose this route, your application continues to use the Version 5 ODBC driver, so this is not a complete upgrade. The procedure for upgrading in this way is the same as for Embedded SQL applications.
For information about upgrading in this manner, see Upgrading Embedded SQL applications.
StartLine parameter |
The following figure illustrates the changes you must make when upgrading an ODBC standalone application.
The ODBC data source specifies which ODBC driver to use. When an ODBC data source is created as an Adaptive Server Anywhere Version 6 data source, it uses the Version 6 ODBC driver.
Data source must be Version 6 |
This section provides step-by-step procedures for different kinds of ODBC applications:
Applications using an embedded database are standalone applications using the personal database server (dbeng50.exe for Version 5, dbeng6.exe for Version 6).
Client/server applications connect across a network to the network database server. In Version 5, these applications use the dbclient.exe executable.
Some applications allow you to change the ODBC data source name you use. Other applications use a fixed data source name. You can upgrade either kind of application.
Install the Version 6 software The Version 6 software contains components that enable Version 5 ODBC applications to continue working. You can either install into a separate directory or over the top of your Version 5 software.
Your application should be unaffected by installation of the Version 6 software.
Create a Version 6 ODBC data source The changes you make depend on the connection parameters you use in the data source.
If you start the default database server using the DBF parameter, you can use the same connection parameters in your new data source as your old one.
If you store a connection string that uses a Start Line parameter specifying dbeng50.exe, you must replace this with one specifying dbeng6.exe.
For more information on upgrading StartLine parameters, see Start parameters and the compatibility library.
If the database server is started in some other way, such as by a batch file or using a Windows NT service, you must reconfigure this so that the Version 6 database server is started instead.
For information on creating Version 6 data sources, see Working with ODBC data sources.
Use the new data source With this step, you are using all Version 6 software and have completed your upgrade. The database itself does not need to be upgraded to work with existing applications.
Some applications may have the data source name hard wired. In this case, you need to replace the Version 5 data source with a Version 6 data source of the same name. It is recommended that you rename, rather than delete, your Version 5 data source.
Prepare for the upgrade This step must be carried out at each client machine. You prepare for the upgrade by installing the Version 6 software.
Your application should be unaffected by installation of the Version 6 software.
Create a Version 6 ODBC data source This step must be carried out at each client machine. The changes you make depend on the connection parameters you use in the data source.
If you start the default database server using the DBF parameter, you can use the same connection parameters in your new data source as your old one.
If you store a connection string that uses a StartLine connection parameter specifying dbclient.exe, you must replace this with a new one. The new connection description should either contain all the dbclient information as a set of parameters or should specify dbcli6.exe instead of dbclient.exe. If your application contains a hard-coded connection string, you need to take extra steps at this point.
For more information on upgrading StartLine parameters, see Start parameters and the compatibility library.
For more information on creating connection descriptions that capture the dbclient command-line information, see Capturing dbclient command-line information.
If the database server is started in some other way, such as by a batch file or using a Windows NT service, you must reconfigure this so that the Version 6 database server is started instead.
For information on creating Version 6 data sources, see Working with ODBC data sources.
Upgrade the database server This step must be carried out at the server machine.
As with any software upgrade, back up your database before upgrading.
Install Adaptive Server Anywhere on the server machine.
Start the Version 6 database server on the database.
Use the new data source This step must be carried out at each client machine. You need to use the new connection description to connect to the Version 6 server. With this step, you are using all Version 6 software and have completed your upgrade. The database itself does not need to be upgraded to work with existing applications.
Users of Sybase PowerBuilder and InfoMaker should make some changes in order to obtain full functionality with Adaptive Server Anywhere Version 6.
PowerBuilder and InfoMaker use a file named pbodb60.ini to hold ODBC data source information. The 60 in the file name may be different, depending on the version you have. For each ODBC driver it provides such things as DDL syntax, default DBParm options, valid function names and special datatypes.
If your pbodb60.ini file does not have a Adaptive Server Anywhere section, PowerBuilder and InfoMaker default to a core syntax. This limits the operations you can carry out using these tools. For example you cannot create, alter, or drop primary and foreign keys.
To obtain complete functionality with PowerBuilder and InfoMaker, you need to upgrade your pbodb60.ini file.
Make a backup copy of your existing pbodb60.ini file.
Add an Adaptive Server Anywhere section to the working copy of the file containing the same information as the existing Sybase SQL Anywhere section:
[Adaptive Server Anywhere] PBSyntax='WATCOM50_SYNTAX' PBDateTime='STANDARD_DATETIME' PBFunctions='WATCOM_FUNCTIONS' PBDefaultValues='autoincrement,current date,current time,current timestamp,timestamp,null,user' PBDefaultCreate='YES' PBDefaultAlter='YES' PBDefaultExpressions='YES' DelimitIdentifier='YES' PBDateTimeInvalidInSearch='NO' PBTimeInvalidInSearch='YES' PBQualifierIsOwner='NO' PBSpecialDataTypes='WATCOM_SPECIALDATATYPES' IdentifierQuoteChar='"' PBSystemOwner='sys,dbo,rs_systabgroup' PBUseProcOwner='YES' SQLSrvrTSName='YES' SQLSrvrTSQuote='YES' SQLSrvrTSDelimit='YES' ForeignKeyDeleteRule='Disallow if Dependent Rows Exist (RESTRICT),Delete any Dependent Rows (CASCADE),Set Dependent Columns to NULL (SET NULL)' TableListType='GLOBAL TEMPORARY'