Preparing the Database and Devices

Before starting the upgrade process, confirm that you have enough space for the upgrade to succeed.

  1. To calculate the free space required for the upgrade to succeed, double the size of the largest catalog that you are going to upgrade, then add approximately 10 percent. For example, if you have a large number of stored procedures or compiled objects in any database, the syscomments and sysprocedures system tables require additional space.
    The preupgrade utility scans the system catalogs and performs this calculation automatically.
  2. If you are:
    • Not using two-phase commit or distributed transaction management (DTM) applications, create a sybsystemdb with a minimum of 4MB if it does not already exist.
    • Using two-phase commit or DTM, create either:
      • A minimum-sized sybsystemdb for upgrade and expand it later, or
      • A sybsystemdb of 5MB to 20MB, depending on your expected usage. Approximately 25 percent of the database should be data storage, and 75 percent should be log storage.
  3. If it does not already exist, create the sybsystemdb database. Servers that use a 2KB logical page size require a sybsystemdb that is at least 4MB. Servers that use a larger logical page size require a sybsystemdb that is at least as large as the model database:
    1> create database sybsystemdb on default = '4M'
    2> go
    1> use sybsystemdb
    2> go
    1> sp_create_syscoordinations
    2> go

    SAP ASE uses this database for tracking transactions, and during recovery. It is also used by applications using two-phase commit and DTM.

  4. Verify that the sybsystemdb database is large enough. For an upgrade, the default size for sybsystemdb is 124MB, or enough free space to accommodate the existing sybsystemdb database, and the largest catalog that is to be upgraded, plus 10 percent for logging upgrade changes. You may need more space if you are adding user-defined stored procedures.
  5. If you use Java in the database, the preupgrade utility detects that you set sp_configure "enable java" to 1, and requests that you enable PCI and configure sybpcidb before you upgrade the server.
  6. Increase the default database size:
    1. Use alter database to increase the size of the master database.
      For example:
      1> alter database tempdb on master=X
      2> go
      1> alter database model on master=X
      2> go
      X is the megabytes of space you are adding.
      Repeat this process for each temporary and model databases, making sure that model is at no point larger than tempdb.
    2. Use sp_helpdb to verify the size of each system database you increase in size.
    3. Use sp_configure to update the values as indicated by the preupgrade utility.
      This example updates the number of locks available for all users on the SAP ASE server to 6,000:
      sp_configure "number of locks", 6000