DBA > Job Interview Questions > Sybase Interview Questions and Answers

How Can I Run the ASE Upgrade Manually?

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

How Can I Run the ASE Upgrade Manually?

How to Run the ASE Upgrade Manually

This document describes the steps required to perform a manual upgrade for ASE from release 4.x or 10.0x to release 11.02. In most cases, however, you should use sybinit to perform the upgrade.

BE SURE TO HAVE GOOD BACKUPS BEFORE STARTING THIS PROCEDURE.

1. Use release 11.0x sybinit to run the pre-eligibility test and Check Reserved words. Make any necessary changes that are mentioned in the sybinit log. The sybinit log is located in $SYBASE/init/logs/logxxxx.yyy.
2. Use isql to connect to the 4.x or 10.0x ASE and do the following tasks:

a. Turn on option to allow updates to system tables:
1. sp_configure "allow updates", 1
2. go


b. Checkpoint all databases:
1. use "dbname"
2. go
1. checkpoint
2. go

c. Shutdown the 4.x or 10.0x ASE.
1. shutdown
2. go

3. Copy the interfaces file to the release 11.0x directory.
4. Set the environment variable SYBASE to the release 11.0x directory.
5. Copy the runserver file to the release 11.0x $SYBASE/install directory.
6. Edit the $SYBASE/install/RUN_SYBASE (runserver file) to change the path from the 4.x or 10.x dataserver directory to the new release 11.0x directory.
7. Start ASE using the new runserver file.

% startserver -f$SYBASE/install/RUN_SYBASE
8. Run the upgrade program:
UNIX: $SYBASE/upgrade/upgrade -S"servername" -P"sapassword" > $SYBASE/init/logs/mylog.log 2>&1 VMS: SYBASE_SYSTEM[SYBASE.UPGRADE]upgrade /password="sa_password" /servername="servername"
9. Shut down SQL server after a successful upgrade.
% isql -Usa -Pxxx
-SSYBASE
1. shutdown
2. go

10. Start ASE using the release 11.0x runserver file.

% startserver -f$SYBASE/install/RUN_SYBASE
11. Create the sybsystemprocs device and database if upgrading from 4.9.x. You should create a 21mb sybsystemprocs device and database.
a. Use the disk init command to create the sybsytemprocs device and database manually, for example:

disk init name = "sybprocsdev", physname="/dev/sybase/rel1102/sybsystemprocs.dat", vdevno=4, size=10752 go To check to see which vdevno is available: type 1. select distinct low/16777216 from sysdevices 2. order by low 3. go A sample create database command: create database sybsystemprocs on sybprocsdev=21 go Please refer to the "Sybase ASE Reference Manual", for more information on these commands.

12. Run the installmaster and installmodel scripts:
UNIX: %isql -Usa -Psapassword -i$SYBASE/scripts/installmaster
UNIX: %isql -Usa -Psapassword -i$SYBASE/scripts/installmodel
VMS: $isql /user="sa" /password="sapass"
/input="[sybase_system.scripts]installm aster"
VMS: $isql /user="sa" /password="sapass"
/input="[sybase_system.scripts]installm odel"

13. If you upgraded from ASE 4.9.2, you will need to run sp_remap to remap the compiled objects. Sp_remap remaps stored procedures, triggers, rules, defaults, or views to be compatible with the current release of ASE. Please refer to the Reference Manual Volume II for more information on the sp_remap command.

The syntax for sp_remap:
sp_remap object_name
If you are upgrading to ASE 11.0.x and the upgrade process failed when using sybinit, you can invoke sybinit and choose remap query tress from the upgrade menu screen. This is a new option that is added, after a failed upgrade.

(Continued on next question...)

Other Job Interview Questions