Difference between revisions of "Installation guidelines ASE 15.0"

From SybaseWiki
Jump to: navigation, search
Line 1: Line 1:
'''** TEMPORARILY UNDER REVIEW **'''
+
'''** CURRENTLY UNDER REVIEW **'''
  
 
This page describes how to install and configure a Sybase ASE server.
 
This page describes how to install and configure a Sybase ASE server.
Line 29: Line 29:
 
  kernel/shmmax=33554432000
 
  kernel/shmmax=33554432000
  
Create at least 5 raw-devices for master (200M), sybprocs(200M), sybsystemdb(200M), data01(32G) and log01(2G). Raw devices are never slower than cooked-devices. Also chown the raw-devs.
+
===Raw devices or filesystem files===
 
+
Sybase recommends, and I fully 100% agree, to store all database files on raw devices except for temporary databases like tempdb. Some Unix adminstrators do not like raw devices and then you need to put everything on filesystems. Whenever possible, use directio when the mounted filesystem allows it.
When you using filesystems, solaris 9 or newer and sybase 12.x , use the forecedirectio option tot mount the filesystem. Because this option is for the whole filesystemen, do not use this filesystem for other files than sybase datadevices.
+
====Raw devices====
 
+
When you do raw devices, create the following:
An /etc/vfstab example:
+
* master (60Mb but 100Mb is better)
/dev/md/dsk/d33  /dev/md/rdsk/d33  /var/sybase  ufs  2  yes    '''forcedirectio'''
+
* sybsystemprocs(250M)
 
+
* sybsystemdb(20M)
Now, switch to the newly created user:
+
* data01 (for instance 32G but for testing purposes 100Mb is also good. You can always add more)
su - sybase
+
* log01(for instance 5G but for testing purposes 20Mb is also good. You can always add more).
 +
Do not forget to chown the raw devices to the sybase user. Check if this setting is persistent after a reboot.
 +
====File system files====
 +
Make sure you have a filesystem that's big enough to store the files mentioned in the 'Raw devices' section.
 +
====Temporory databases====
 +
Files for temporary databases should be stored on the filesystem. Allow at least for 100Mb but, depending on your application, 1Gb is not uncommon.
  
 
===Determine your license policy===
 
===Determine your license policy===
Line 45: Line 50:
  
 
===Installation===
 
===Installation===
 +
Now, switch to the newly created user:
 +
su - sybase
 
You should now be in the directory /opt/sybase. Make a work directory and put the downloaded Sybase software in it.
 
You should now be in the directory /opt/sybase. Make a work directory and put the downloaded Sybase software in it.
 
  mkdir work
 
  mkdir work
Line 76: Line 83:
 
Is is fairly common to activite the SYBASE.sh script (or similar one) from your login script.
 
Is is fairly common to activite the SYBASE.sh script (or similar one) from your login script.
  
 +
When you have generated a licence file through http://sybase.subscribenet.com install it in the directory $SYBASE/$SYBASE_SYSAM/licences
 
===Create the server===
 
===Create the server===
 +
Most installations run multiple ASE's and backup servers from a single Sybase software tree. For a good overview it is quite handy to store files that are specific for a server in it's own directory. In this example we create two servers: an ASE called SERVER1 and a backupserver called SYB_BACKUP.
  
  cd $HOME
+
Create the directories for these servers:
 +
  cd /opt/sybase
 
  mkdir admin
 
  mkdir admin
  mkdir MYINSTANCE01
+
  mkdir admin/SERVER1
 +
mkdir admin/SYB_BACKUP
  
 
Make some raw-devices, and make symbolic-links to them.
 
Make some raw-devices, and make symbolic-links to them.

Revision as of 22:25, 30 May 2007

** CURRENTLY UNDER REVIEW **

This page describes how to install and configure a Sybase ASE server.

Get the software

First download ASE.

For a licensed version you need to go here: http://sybase.subscribenet.com or to the eShop at sybase.com: http://eshop.sybase.com/eshop/buy?id=19517

To get a free download you can find several places here: http://www.sypron.nl/get_ase_soft.html

Prepare the Operating System

Make sure that the filesystem for the Sybase software is big enough. A full installation needs approx. 800 Mb so 3 Gb should give you enough room to handle upgrades too. In this case we install the software in /opt/sybase/ase15. Database files will be stored on raw devices and/or in /var/sybase.

Become root and add a group "sybase" and a user "sybase" to the system. Also create the needed directories.

mkdir -p /opt/sybase
mkdir -p /var/sybase
groupadd sybase
useradd -g sybase -d /opt/sybase sybase
chown sybase:sybase /opt/sybase
chown sybase:sybase /var/sybase

Enable the operating system to allow more than the default 500M for a single shared memory segment.

  • Solaris /etc/system
set shmsys:shminfo_shmmax = 4294967295
  • Linux /etc/sysctl (this is for Debian/Ubuntu, use a dot instead of the / in Redhat)
kernel/shmmax=33554432000

Raw devices or filesystem files

Sybase recommends, and I fully 100% agree, to store all database files on raw devices except for temporary databases like tempdb. Some Unix adminstrators do not like raw devices and then you need to put everything on filesystems. Whenever possible, use directio when the mounted filesystem allows it.

Raw devices

When you do raw devices, create the following:

  • master (60Mb but 100Mb is better)
  • sybsystemprocs(250M)
  • sybsystemdb(20M)
  • data01 (for instance 32G but for testing purposes 100Mb is also good. You can always add more)
  • log01(for instance 5G but for testing purposes 20Mb is also good. You can always add more).

Do not forget to chown the raw devices to the sybase user. Check if this setting is persistent after a reboot.

File system files

Make sure you have a filesystem that's big enough to store the files mentioned in the 'Raw devices' section.

Temporory databases

Files for temporary databases should be stored on the filesystem. Allow at least for 100Mb but, depending on your application, 1Gb is not uncommon.

Determine your license policy

Since ASE 15 you cannot run a production server with no license file. License files can reside on the network or on the local system. Think about the license policy that suits you best.

When there is no valid license after the installation ASE will run with a grace time of 30 days. After that it will shutdown and it cannot be rebooted anymore until you install a license.

Installation

Now, switch to the newly created user:

su - sybase

You should now be in the directory /opt/sybase. Make a work directory and put the downloaded Sybase software in it.

mkdir work
cd work
<put the software in this directory>
tar -xf <software-distro>

Start the installation.

./setup -console

Use /opt/sybase/ase15 as the destination directory. Assuming you store Sybase licenses on your local system, answer No at "Will licenses be obtained from the License Server?". Also, at "Do you want to configure email alerts?" answer No.

At the possible options of the Product Edition choose the one that suits your situation. After installation you can reconfigure it, in case you picked the wrong option.

At the list of possible servers to configure, deselect all options. We will do it manually.

When the installation has finished succesful you can safely remove the work directory.

Setup your environment

In /opt/sybase/ase15 you will find a few files, like SYBASE.csh, SYBASE.sh and SYBASE.env. Depending on the type of shell you use you need to source in one of these. For instance, when your default shell is bash you should do this:

. /opt/sybase/ase15/SYBASE.sh

By doing:

echo $SYBASE

it should return /opt/sybase/ase15. Is is fairly common to activite the SYBASE.sh script (or similar one) from your login script.

When you have generated a licence file through http://sybase.subscribenet.com install it in the directory $SYBASE/$SYBASE_SYSAM/licences

Create the server

Most installations run multiple ASE's and backup servers from a single Sybase software tree. For a good overview it is quite handy to store files that are specific for a server in it's own directory. In this example we create two servers: an ASE called SERVER1 and a backupserver called SYB_BACKUP.

Create the directories for these servers:

cd /opt/sybase
mkdir admin
mkdir admin/SERVER1
mkdir admin/SYB_BACKUP

Make some raw-devices, and make symbolic-links to them.

Make a resource file srvbuild-myase.rs to create the ASE:

sybinit.release_directory: USE_DEFAULT
sybinit.product: sqlsrv
sqlsrv.server_name: LUCSY05P
sqlsrv.new_config: yes
sqlsrv.do_add_server: no
sqlsrv.network_protocol_list: tcp
sqlsrv.network_hostname_list: avondster
sqlsrv.network_port_list: 8001
sqlsrv.server_page_size: USE_DEFAULT
sqlsrv.force_buildmaster: no
sqlsrv.master_device_physical_name: /opt/sybase/data/LUCSY05P/master.dat
sqlsrv.master_device_size: 200
sqlsrv.master_database_size: USE_DEFAULT
sqlsrv.errorlog: USE_DEFAULT
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: /opt/sybase/data/LUCSY05P/sybprocs.dat
sqlsrv.sybsystemprocs_device_size: 200
sqlsrv.sybsystemprocs_database_size: USE_DEFAULT
sqlsrv.sybsystemdb_device_physical_name: /opt/sybase/data/LUCSY05P/sybsystemdb.dat
sqlsrv.sybsystemdb_device_size: USE_DEFAULT
sqlsrv.sybsystemdb_database_size: USE_DEFAULT
sqlsrv.default_backup_server: SYB_BACKUP

Build the Instance with the command:

srvbuildres -r srvbuild-myase.rs

Make a resource file sqlloc-myase.rs to the configure the charset-sortorder of the new ASE:

sybinit.release_directory: USE_DEFAULT
sqlsrv.server_name: PUT_YOUR_SERVER_NAME_HERE
sqlsrv.sa_login: sa
sqlsrv.sa_password: 
sqlsrv.default_language: french
sqlsrv.language_install_list: spanish,german
sqlsrv.language_remove_list: USE_DEFAULT
sqlsrv.default_characterset: cp437
sqlsrv.characterset_install_list: mac,cp850
sqlsrv.characterset_remove_list: USE_DEFAULT
sqlsrv.sort_order: dictionary

Now, re-configure the characterset and sortorder of the ASE:

sqllocres -r sqlloc-myase.rs

Configure tempdb as needed. See here http://www.petersap.nl/SybaseWiki/index.php/Tempdb_space_management how to do this.


Memory and cache tuning (in the sybase ASE) example:

sp_configure 'max memory','15000M'
  sp_cacheconfig 'default data cache','7000M',strict
    sp_poolconfig 'default data cache','5000M','2K'
    sp_poolconfig 'default data cache','2K','wash=200M'
    sp_poolconfig 'default data cache','2000M','16K'
    sp_poolconfig 'default data cache','16K','wash=200M'
 sp_cacheconfig 'tempdb_cache','1500M',mixed,strict
   sp_poolconfig 'tempdb_cache','7500M','2K'
   sp_poolconfig 'tempdb_cache','2K','wash=200M'
   sp_poolconfig 'tempdb_cache','7500M','16K'
   sp_poolconfig 'tempdb_cache','16K','wash=200M'
     sp_bindcache tempdb_cache,tempdb
     -- check with:  sp_helpdb tempdb
 sp_cacheconfig 'my_syslogs_cache','750M',logonly,strict
   sp_poolconfig 'my_syslogs_cache','750M','2K'
   sp_poolconfig 'my_syslogs_cache','2K','wash=200M'
     sp_bindcache my_syslogs_cache,syslogs (for all user databases, use <userdatabase>)
     -- check with:   sp_help syslogs (within the userdatabase)
sp_configure 'procedure cache size',208160

Some other re-config's:

sp_configure 'number of user connections',1000
sp_configure 'number of locks',20000
sp_configure 'number of open databases',30


  • create the dbcc databases