Good things to do after creating your ASE server

- Change the SA password from NULL (if not done during install).

- Add a user, grant the user sa_role incase the SA password is lost.
(also a useful backdoor to be able to fix problems quickly after
you pass off the server).

- Drop the two default tape devices and configure one correctly.

- If not done so through sybinit, configure a Backup server.

- Document the Sybase ports used in /etc/services.

- Immediately get a backup copy of master database.  Get a flat
file copy of sysusages, sysdatabases, sysdevices, sysloginroles, 
and syslogins.  (this is also a good idea to do ongoing for disaster
recovery purposes).

- If you've created any devices on flat files (typically only tempdb),
chmod and chown the device files for safety.  

- Create a start/stop script in /etc/init.d (or /etc/rc3.d) to stop/start
the server automatically and/or attempt to gracefully stop the server
in the case of an unexpected shutdown.  Here's a basic example:

#!/bin/sh
SYBASE=/usr/sybase
ISQL=$SYBASE/bin/isql
INSTALL=$SYBASE/install
export SYBASE ISQL INSTALL

case "$1" in
'start')
#
# Sybase server startup.
#
su sybase -c "$INSTALL/startserver -f $INSTALL/RUN_FOO -f $INSTALL/RUN_FOO_BACKUP &"
;;

'stop')
#
# Sybase server shutdown.
#
$ISQL -S FOO -U sa -P password > /dev/console 2>&1 <<-'END'
shutdown SYB_BACKUP
go
shutdown
go
END
;;

*)
#
# Invalid param.
#
echo "Usage: /etc/init.d/sybase { start | stop }"
;;
esac

---

- drop the existing local server, run sp_addserver, to populate the 
@@servername variable (convenience)
- create a directory $SYBASE/config_backup, copy all backup copies of
the $DSQUERY.cfg file there. (cleanliness).

- Configure model to have tables, stored procedures, users, db_options
you'd like all databases to have going forward.

- Remember to set "trunc log on chkpt" on tempdb (isn't set automatically).
Also, extend tempdb on your temp devices.  And if desired, remove the 
2mb segment of tempdb created on master (see www.isug.com/Sybase_FAQ for
the procedure).  Note: apparently in ASE 12.0 the tempdb will default to
this option, even if its not physically set by the SA.  AND, apparently
even if "trunc log on chkpt" isn't set, the server has always been hard
coded to truncate the tempdb log on checkpoint...so this is a superfluous
command to run.

- Add good additional stored procedures to sybsysprocs.  See 
www.bossconsulting.com/sybase_dba/ and click on "additional stored procedures"

- Run sp_configure and change some of the typically low default variables
set by default during config.  this includes:
x number of user connections
x number of open databases
x number of devices
x total memory
x number of locks
x allow updates to system tables

Some less common (but usually set) config parameters:
x max online engines
x max network packet size
x additional network memory
x procedure cache percent
x cpu grace time
x identity burning set factor

- Configure a 4k buffer pool using sp_poolconfig in the default data cache 
for the transaction logs to use.  Transaction logs work most efficiently 
w/ 4k buffer pool.

- run sp_diskdefault master, defaultoff to prevent table create statements
in master.  Also ensure that added logins do NOT have master as their 
default database.

- Adjust tcp's keepalive param to 10 mins for PCs which disconnect unexpectedly.
Sun recommend that the value be set no lower than 10 minutes or performance
may be affected.  It defaults to 2 hours.

/usr/sbin/ndd -set /dev/tcp tcp_keepalive_interval 600000