Sybase basics

Directory Structure

Backup Server

Used to backup/restore databases using dump & load commands. e.g.

  1. isql
  2. dump database database_name to dumpfile
  3. go

Interface file

A list of all known servers (including backup server). When a client program needs to connect to a particular file, it looks here. Can be supplied by setting DSQUERY environmental variable. Port number is used to identify SQL server. i.e.

Entries can be created in the interface file using sybinit.

Sybase Device Files

These are portions of disk or files used to store databases and database objects. Following are required:

sybinit initialises these or disk init post installation. Logical volumes or raw partitions can be used.

The backup server is configured using sybinit.

Starting Sybase

Can use system administrator ID, sa . To set SQL server password for sa:

  1. isql -Usa -P -Sserver_name
  2. sp_password null, new_password
  3. go

When a new SQL server or backup server is installed, sybinit creates a runserver file called RUN_servername

To start a server enter: startserver -f runserverfile

Monitoring Servers

To see if a server is running, try to logon to it using isql or use showserver command. Can also issue ps -u sybase .

Shutting Sybase

Use the shudown command:

  1. isql -Usa -Ppassword -Ssever_name
  2. shutdown servername
  3. go

If database has to be shutdown immediately, use shutdown with nowait flag.

Use kill -9 only as a last resort. If you do this, may need to delete the shared memory files ($SYBASE/SERVER_NAME.krg and SERVER_NAME.srg0) . May also need to flush shared memory, e.g. for HP-UX, ipcs -mp | grep sybase , then use ipcrm to remove.

Admin Tasks

Log files are $SYBASE/install/errorlog & $SYBASE/install/backup.log Kernel Parameters

Shared memory

Monitoring Performance

Installation notes

async i/o should be enabled, i.e. For HP, driver in he kernel and /dev/async created as 101 0x000004, perms 660 , sybase,sybase . Raw partitions must be owned by sybase. For Solaris, don’t start raw partitions at cylinder 0 .