Installation & configuration of Sybase DB (15.7) Server on Linux

Download the software:

Setting up Sybase Server by tgz(bin) :

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

To get a free download you can go to this page http://www.sybase.com/ase_1500devel.

Prepare the Operating System:

Make sure that the file system for the Sybase software is big enough. A full installation needs approx. 1.5 GB so 4 GB should give you enough room to handle upgrades too. we install the software in /opt/Sybase  And storing Database files in /var/sybase.

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

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

Now Use

 sysctl kernel.shmmax

And configure

sysctl -w kernel.shmmax=274877906944

Also added in

Vi /etc/sysctl.conf

kernel.shmmax=274877906944

Installation of the software:

So, 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 install
cd install
cp /root/ase1570_linx8664_64_02.tgz /opt/sybase/install

tar –xf  ase1570_linx8664_64_02.tgz

Now start the installation

./setup.bin

Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
Launching installer...
Preparing CONSOLE Mode Installation...
Sybase Adaptive Server Enterprise Suite          (created with InstallAnywhere)
Intro
------------
InstallAnywhere will guide you through the installation of Sybase Adaptive
Server Enterprise Suite 15.5 ESD2.
It is strongly recommended that you quit all programs before continuing with
this installation.
Respond to each prompt to proceed to the next step in the installation.  If you
want to change something on a previous step, type 'back'.
You may cancel this installation at any time by typing 'quit'.
PRESS <ENTER> TO CONTINUE:
Choose Install Folder
---------------------
Where would you like to install?
Default Install Folder: /home/sybase/SYBASE_ASE
ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT
:
The directory /home/sybase/SYBASE_ASE does not exist. Do you want to create it?
(Y/N): Y
Choose Install Set
------------------
Please choose the Install Set to be installed by this installer.
->1- Typical
2- Full
3- Customize...
ENTER THE NUMBER FOR THE INSTALL SET, OR PRESS <ENTER> TO ACCEPT THE DEFAULT
:
Software License Type Selection
-------------------------------
What would you like to do?
->1- Install licensed copy of Sybase Adaptive Server Enterprise Suite
2- Install Free Developer Edition of Sybase Adaptive Server Enterprise Suite
3- Install Express Edition of Sybase Adaptive Server Enterprise Suite
4- Evaluate Sybase Adaptive Server Enterprise Suite
Enter one of the options above: 2
End-user license agreement
--------------------------
1)  All regions
Please enter the number of the location you are installing. (1-1) (DEFAULT:
1):
IMPORTANT - READ CAREFULLY BEFORE USING THE ACCOMPANYING
SOFTWARE
SYBASE(R) ADAPTIVE SERVER(R) ENTERPRISE
DEVELOPER'S EDITION v15.5.x
LICENSE AGREEMENT
NOTICE TO USER: BY INSTALLING OR USING THIS SOFTWARE YOU
ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
PLEASE READ IT CAREFULLY.
THE FOLLOWING TERMS AND CONDITIONS ("AGREEMENT") SHALL
GOVERN YOUR INSTALLATION AND USE OF THE ACCOMPANYING
ADAPTIVE SERVER ENTERPRISE DEVELOPER'S EDITION v15.5.x
SOFTWARE PROGRAM, DOCUMENTATION AND RELATED EXPLANATORY
MATERIALS (THE "PROGRAM"). BY INSTALLING AND USING THE
PROGRAM YOU AGREE TO ABIDE BY THE TERMS AND CONDITIONS OF
THIS AGREEMENT. IF YOU DO NOT ACCEPT OR AGREE WITH THESE
TERMS, YOU MAY NOT INSTALL OR USE THE PROGRAM.
YOU ARE REQUIRED TO ACCEPT THE TERMS OF THE AGREEMENT BEFORE
Press ENTER to read the text [Type 'back' and press ENTER to skip the text]
:
I agree to the terms of the Sybase license for the install location
specified. (Y/N): Y
Pre-Installation Summary
------------------------
Please Review the Following Before Continuing:
Product Name:
Sybase Adaptive Server Enterprise Suite
Install Folder:
/home/sybase/SYBASE_ASE
Product Features:
Adaptive Server Enterprise,
Open Client,
DB-Library,
jConnect 6.0 for JDBC,
jConnect 7.0 for JDBC,
Interactive SQL,
QPTune,
Sybase Central,
Adaptive Server Plug-in,
SySAM Plug-in,
Agent Management Console,
SySAM License Utilities,
Unified Agent,
ASE Agent Plug-in,
ASE ODBC Driver
Disk Space Information (for Installation Target):
Required:  1,141,741,287 bytes
Available: 2,447,298,560 bytes
Ready To Install
----------------
InstallAnywhere is now ready to install Sybase Adaptive Server Enterprise Suite
onto your system at the following location:
/home/sybase/SYBASE_ASE
PRESS <ENTER> TO INSTALL:
Installing...
[==================|==================|==================|==================]
[------------------|------------------|------------------|------------------]
===============================================================================
Remember ASE Password
---------------------
ASE Plug-in has the option to "remember passwords after connecting to servers".
The passwords are encrypted and stored on a per-user basis.  If for security
reasons you do not want ASE Plug-in to store any passwords, you can disable
this feature.
->1- Enable
2- Disable
Enter one of the options above: 1
===============================================================================

Building or Configuration of SYBASE ASE Server

Configure New Servers
---------------------
The Sybase Adaptive Server Enterprise Suite contains product(s) that needs to
configure.  At this point in the installation you can choose to configure the
product(s).  If you choose to configure the product(s) on this screen, you will
be given the option to specify custom values for each product.  If you do not
choose to configure the product(s) at this time, you can configure them using
the configuration utility at a later time.
Please deselectany products that you do not want to configure now :
[X]  1  -  Configure new Adaptive Server
[X]  2  -  Configure new Backup Server
[X]  3  -  Configure new Monitor Server
[X]  4  -  Configure new XP Server
[X]  5  -  Configure new Job Scheduler
[X]  6  -  Enable Self Management
[X]  7  -  Configure Web Services
[X]  8  -  Configure Unified Agent
To select an item enter its number, or 0 when you are finished: (DEFAULT: 0)
: 3
[X]  1  -  Configure new Adaptive Server
[X]  2  -  Configure new Backup Server
[ ]  3  -  Configure new Monitor Server
[X]  4  -  Configure new XP Server
[X]  5  -  Configure new Job Scheduler
[X]  6  -  Enable Self Management
[X]  7  -  Configure Web Services
[X]  8  -  Configure Unified Agent
To select an item enter its number, or 0 when you are finished: (DEFAULT: 0)
: 4
[X]  1  -  Configure new Adaptive Server
[X]  2  -  Configure new Backup Server
[ ]  3  -  Configure new Monitor Server
[ ]  4  -  Configure new XP Server
[X]  5  -  Configure new Job Scheduler
[X]  6  -  Enable Self Management
[X]  7  -  Configure Web Services
[X]  8  -  Configure Unified Agent
To select an item enter its number, or 0 when you are finished: (DEFAULT: 0)
: 5
[X]  1  -  Configure new Adaptive Server
[X]  2  -  Configure new Backup Server
[ ]  3  -  Configure new Monitor Server
[ ]  4  -  Configure new XP Server
[ ]  5  -  Configure new Job Scheduler
[ ]  6  -  Enable Self Management
[X]  7  -  Configure Web Services
[X]  8  -  Configure Unified Agent
To select an item enter its number, or 0 when you are finished: (DEFAULT: 0)
: 7
[X]  1  -  Configure new Adaptive Server
[X]  2  -  Configure new Backup Server
[ ]  3  -  Configure new Monitor Server
[ ]  4  -  Configure new XP Server
[ ]  5  -  Configure new Job Scheduler
[ ]  6  -  Enable Self Management
[ ]  7  -  Configure Web Services
[X]  8  -  Configure Unified Agent
To select an item enter its number, or 0 when you are finished: (DEFAULT: 0)
: 8
[X]  1  -  Configure new Adaptive Server
[X]  2  -  Configure new Backup Server
[ ]  3  -  Configure new Monitor Server
[ ]  4  -  Configure new XP Server
[ ]  5  -  Configure new Job Scheduler
[ ]  6  -  Enable Self Management
[ ]  7  -  Configure Web Services
[ ]  8  -  Configure Unified Agent
To select an item enter its number, or 0 when you are finished: (DEFAULT: 0)
:
===============================================================================
Configure New Adaptive Server
-----------------------------
Adaptive Server Name (DEFAULT: LOCALHOST): ASE1
Port Number (DEFAULT: 5000):
Error Log (DEFAULT: /home/sybase/SYBASE_ASE/ASE-15_0/install/LOCALHOST.log)
: /home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log
Application Type
->1- Mixed (OLTP/DSS)
2- Online Transaction Proccessing (OLTP)
3- Decision Support Systems (DSS)
Select an application type: 1
Page Size
1- 2k
->2- 4k
3- 8k
4- 16k
Select a page size: 2
Warning: You have selected 4k as the logical page size for the
Adaptive Server. If you plan to load dump from another database,
make sure this logical page size matches the size of the source
database. The default logical page size in previous Adaptive Server
versions was 2KB.
Master Device (DEFAULT: /home/sybase/SYBASE_ASE/data/master.dat):
Master Device Size (MB) (DEFAULT: 60):
Master Database Size (MB) (DEFAULT: 26):
System Procedure Device (DEFAULT: /home/sybase/SYBASE_ASE/data/sysprocs.dat)
:
System Procedure Device Size (MB) (DEFAULT: 152):
System Procedure Database Size (MB) (DEFAULT: 152):
System Device (DEFAULT: /home/sybase/SYBASE_ASE/data/sybsysdb.dat):
System Device Size (MB) (DEFAULT: 6):
System Database Size (MB) (DEFAULT: 6):
Tempdb Device (DEFAULT: /home/sybase/SYBASE_ASE/data/tempdbdev.dat):
Tempdb Device Size (MB) (DEFAULT: 100):
Tempdb Database Size (MB) (DEFAULT: 100):
Enable PCI
->1- No
2- Yes
Do you want to configure PCI/JAVA?:
Optimize ASE Configuration
->1- No
2- Yes
Do you want to optimize ASE configuration?:
===============================================================================
Configure New Backup Server
---------------------------
Backup Server Name (DEFAULT: ASE1_BS):
Port Number (DEFAULT: 5001):
Error Log (DEFAULT: /home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1_BS.log):
===============================================================================
Configure New Servers Summary
-----------------------------
Adaptive Server
Adaptive Server Name                                ASE1
Port Number                                 5000
Application Type                            Mixed (OLTP/DSS)
Page Size                                   4k
Error Log                                   /home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log
Master Device                               /home/sybase/SYBASE_ASE/data/master.dat
Master Device Size (MB)                             60
Master Database Size (MB)                           26
System Procedure Device                             /home/sybase/SYBASE_ASE/data/sysprocs.dat
System Procedure Device Size (MB)                            152
System Procedure Database Size (MB)                                   152
System Device                               /home/sybase/SYBASE_ASE/data/sybsysdb.dat
System Device Size (MB)                             6
System Database Size (MB)                           6
Tempdb Device                               /home/sybase/SYBASE_ASE/data/tempdbdev.dat
Tempdb Device Size (MB)                             100
Tempdb Database Size (MB)                           100
Backup Server
Backup Server Name                                  ASE1_BS
Port Number                                 5001
Error Log                                   /home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1_BS.log
Do you want to continue? (DEFAULT: yes):
===============================================================================
Configure New Adaptive Server
-----------------------------
Warning: You have selected '4k' as the logical page size for the Adaptive
Server. If you plan to load dump from another database, make sure this logical
page size matches the size of the source database. The default logical page
size in previous Adaptive Server versions was 2KB.
Building Adaptive Server 'ASE1':
Writing entry into directory services...
Directory services entry complete.
Building master device...
Master device complete.
Writing RUN_ASE1 file...
RUN_ASE1 file complete.
Starting server...
Server started.
Building sysprocs device and sybsystemprocs database...
sysprocs device and sybsystemprocs database created.
Running installmaster script to install system stored procedures...
installmaster: 10% complete.
installmaster: 20% complete.
installmaster: 30% complete.
installmaster: 40% complete.
installmaster: 50% complete.
installmaster: 60% complete.
installmaster: 70% complete.
installmaster: 80% complete.
installmaster: 90% complete.
installmaster: 100% complete.
installmaster script complete.
Creating two-phase commit database...
Two phase commit database complete.
Extending tempdb database ...
Extending tempdb database complete.
Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,
Macintosh and HP Roman-8)...
Character sets installed.
Setting server name in Adaptive Server...
Server name added.
Server 'ASE1' was successfully created.
===============================================================================
Configure New Backup Server
---------------------------
Building Backup Server 'ASE1_BS':
Writing entry into directory services...
Directory services entry complete.
Writing RUN_ASE1_BS file...
RUN_ASE1_BS file complete.
Starting server...
Server started.
Server 'ASE1_BS' was successfully created.
===============================================================================
Installation Completed
----------------------
The installation was successful.
Please check regularly for updates at http://www.sybase.com/downloads.
If you have not done so, please go to https://sybase.subscribenet.com to obtain
the Sybase software licenses.
PRESS <ENTER> TO EXIT THE INSTALLER:

After finish the installation need to set up environment So:

Setup your environment:

. /opt/sybase/SYBASE.sh

And check the server status:

[sybase@localhost t]$ showserver

F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD

0 S sybase    8812  8811  0  80   0 –  1973 sys_po 14:24 pts/1    00:00:00 /home/sybase/SYBASE_ASE/ASE-15_0/bin/backupserver

-e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1_BS.log -N25 -C20 -M/home/sybase/SYBASE_ASE/ASE-15_0/bin/sybmultbuf -SASE1_BS

0 S sybase    8771  8770  1  80   0 – 45769 select 14:24 ?        00:00:13 /home/sybase/SYBASE_ASE/ASE-15_0/bin/dataserver 

-sASE1 -d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log – 

c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0

[sybase@localhost t]$ ps -eaf|grep datas

 

 /* Checking Running status of SYBASE ASE */

sybase    8770     1  0 14:24 pts/1    00:00:00 sh -c /home/sybase/SYBASE_ASE/ASE-15_0/bin/dataserver -sASE1 –  

d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log –

c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0  > /dev/null 2>&1

sybase    8771  8770  1 14:24 ?        00:00:13 /home/sybase/SYBASE_ASE/ASE-15_0/bin/dataserver -sASE1 – 

d/home/sybase/SYBASE_ASE/data/master.dat -e/home/sybase/SYBASE_ASE/ASE-15_0/install/ASE1.log –

c/home/sybase/SYBASE_ASE/ASE-15_0/ASE1.cfg -M/home/sybase/SYBASE_ASE/ASE-15_0

sybase    9730 20657  0 14:36 pts/1    00:00:00 grep datas

[sybase@localhost t]$ isql -Usa -SASE1

Password:

1> select @@servername   /*Confirming Name of Server */

2> go

————————————————————

ASE1                                                        

(1 row affected)

1> select getdate()

2> go

————————–

Apr 18 2012  2:37PM

(1 row affected)

1>exit

Setting up Sybase Server by RPMs:

 

Install the Sybase RPMS as root:

# rpm -ivh sybase-ase-11_0_3_3-6_i386.rpm  (The core program)
# rpm -ivh sybase-doc-11_0_3_3-6_i386.rpm  (Documentation)
# rpm -ivh sybase-ocsd-10_0_4-6_i386.rpm   (Ulities)

# rpm -ivh sybase-ase-11_0_3_3-6_i386.rpm
Preparing…                ########################################### [100%]
1:sybase-ase             ########################################### [100%]

[root@localhost src]# rpm -ivh sybase-ocsd-10_0_4-6_i386.rpm
Preparing…                ########################################### [100%]
1:sybase-ocsd            ########################################### [100%]

[root@localhost src]# rpm -ivh sybase-doc-11_0_3_3-6_i386.rpm
Preparing…                ########################################### [100%]
1:sybase-doc             ########################################### [100%]

The default install directory is /opt/sybase/

Create user and group
There is a script that automatically do the jobs.

Now run the script sybinstall.sh and it will create a Sybase user account and set the right permissions.
# cd /opt/sybase/install
# ./sybinstall.sh
Press q to quit on the license  agreement
type yes to agreed
type yes to create user and group
and password is sybase.

There is a script ‘setperm_all’ that set all permission correctly on the folder and files.
# ./setperm_all

I set the permission manually by,
# chown -R sybase:sybase /opt/sybase

Setting file permissions.  (This may take a while.  Please wait.)
done…

Now that all the files are installed on your system, it is time to configure an SQL server and a backup server. A backup server is used to back up data in the SQL server while the SQL server is running. It guarantees that when restored, your database will have the proper integrity. Copying your database files from the operating system will not guarantee that your database tables will be restored properly.Let start the installation

Log in as the user sybase using the password you set when installing the SQL server. Since it is your first login as the sybase user, the login script will ask if you would like to run sybinit. The sybinit program is used to configure new and existing Sybase servers and is located in the /opt/sybase/install directory.

Otherwise run sybinit manaually,

# ./opt/sybase/sybinit

I got an error on home directory blah blah blah as follows,
==================================================================================

The context allocation routine failed when it tried to load localization files!!
One or more following problems may caused the failure

Your sybase home directory is /sybase. Check the environment variable SYBASE if it is not the one you want!
Using locale name “POSIX” defined in environment variable LANG
Locale name “POSIX” doesn’t exist in your /sybase/locales/locales.dat file
Could not allocate context structure in syb_system_default_charset().
The context allocation routine failed when it tried to load localization files!!
One or more following problems may caused the failure
=====================================================================================

ctr x to exit and
at # bash:
LANG=C; export LAN
Edit /opt/sybase-12.5/locales/locales.dat and add an entry
for en_US.UTF-8 in the [linux] section.

# vi /opt/sybase/locales

Under the linux section

add locale = en_US, us_english, iso_1

Finally we are ready to configure sybase

In /sybase/install directory

#./sybinit
======================================
SYBINIT

1.  Release directory:  /home/sybase

2.  Edit / View Interfaces File

3.  Configure a Server product
4.  Configure an Open Client/Server product
=====================================
Configure the server
The first option you should pick is option 3, “Configure a Server product”. Configure the SQL Server first by selecting option 1. Since this is a new server, select option 1 again. Each server should have a unique name. I recommend naming the server as sybase. When you finish filling in the data for a screen, press ctrl-A to save your data. Press ctrl-A now. At this point, nine more steps are required to configure this SQL server.

Select option 1. The interfaces file tells Sybase products where servers are located. Each server will listen on a specific port on its host. Sybase servers need a unique port to allow network connections. The interface file will hold the server name, host name and port number for each sybase server on your network. Select option 3 to add the port information for the linux_dev server. The sybinit program will automatically fill in the host name for your host. You should specify the TCP/IP port your server will listen on. Select option 2, then specify 4000 as the port number. Make sure there is no service running on port 4000. Press ctrl-A to save this entry in the interfaces file. After you confirm that everything is correct, press ctrl-A again.

Before continuing, When a server is installed, it will have four databases:

master: The master database holds configuration data for the entire server.

model: The model database is the basis for all new databases created on the server.

sybsystemprocs: The sybsystemprocs database holds stored procedures used to maintain the server.

tempdb: The tempdb database is a temporary workspace used when processing queries.

The sybase server manages disk space in devices. A device is a pre-allocated file of a specific size. A device file can be up to 2GB. A single server can have many devices. Databases are created on devices.

Select option 2. The master device holds the master database, the model database and the tempdb database. Its default size is 21MB. You can move the location of this file if you wish. If you have enough disk space, you can leave it in its current location. Press ctrl-A to save this screen. The sybinit program will give you a warning about the file name you selected.

This is normal; on Linux, it will always give this warning. On other UNIX operating systems, the Sybase server devices should be raw partitions on the disk. This isn’t possible on the current version of Linux, so we have to put our devices in operating system files.

Select option 3. The sybsystemprocs database contains stored procedures used to maintain the server. This database can also be used to store any procedures you write for server maintenance. I recommend you double the size of this database, so that you can add additional stored procedures to your server. When you do this, you have to select option 5 to increase the size of the device before you select option 1 to increase the size of the database. Put 32MB for options 5 and 1. You can leave the rest of the options as they are, unless you would like to place the device file in a different location. Press ctrl-A to save this screen.

Select option 4. As the server runs, it writes error messages to a text log file. This screen lets you set the location and name of this file. I recommend you give this file the same name as the database server. Change option 1 to /opt/sybase/install/linux_dev.log. Press ctrl-A to save this screen.

Select option 5. The database server needs to know the name of its backup server. I used the default name given. Press ctrl-A to save this screen.

Select option 6. The server can use many languages. I have never used anything other than us_english. Just press ctrl-A to save the default for this screen.

Select option 7. You can configure which character set to use when communicating between a client and the server. If you do not know for sure that you need another character set, you should accept the defaults for this screen. Press ctrl-A to save this screen.

Select option 8. Here you can specify which order to use when sorting data. Press ctrl-A to accept the default.

Select option 9. If you wish, you can have the server maintain auditing information about users. For our example, we won’t install auditing. Press ctrl-A to configure the server to not maintain auditing records.

We have now told the sybinit program everything it needs to know to configure your SQL server. Press ctrl-A to save your configuration. The sybinit program will now configure your SQL server. It will warn you about the master device file again, but it will create the devices and prepare the server for use. Your new SQL database server is now running on your system.

Configure the Backup Server
Press ctrl-A to go to the previous screen. The next step is to configure a new backup server. Select option 2, then option 1 to configure a new backup server. The name of the backup server should be sybase_bs or the default name. Press ctrl-A to save the backup server name.

This server needs to be specified in the interfaces file also. It will listen on its own unique port. Select option 2. Select option 3 to add a new listener. As before, the host name has already been specified. Change option 2 to 4001. This will be the port for the backup server. Press ctrl-A to save this screen. Press ctrl-A again to write this entry in the interfaces file.

Everything else should be correct, so press ctrl-A to save this screen. The sybinit program will now configure the backup server and start it for you. Both the SQL server and the backup server should now be running on your host.

We are almost done, To exit ,press ctrl-A to leave this screen. Press ctrl-A again to leave the sybinit program.

We have successfully start sybase database

To verify sybase and sybase backup server is running, do a netstat

# netstat -al

tcp        0      0 sybase:4000            *:*                     LISTEN
sybase     167862
tcp        0      0 sybase:4001            *:*                     LISTEN
sybase     167864

Great, sybase and sybase backup is running and listening on port 4000 and 4001

To confirm, you should see a sybase deamon running.
# ps -ef
[root@sybase install]# ps -ef | grep sybase
root      3758     1  0 17:25 pts/0    00:00:00 sh -c /opt/sybase/install/RUN_SYBASE > /opt/sybase/init/logs/tmp 2>&1
root      3759  3758  0 17:25 pts/0    00:00:00 /bin/sh /opt/sybase/install/RUN_SYBASE
root      3760  3759  6 17:25 ?        00:00:10 /opt/sybase/bin/dataserver -d/opt/sybase/master.dat -sSYBASE -e/opt/sybase/install/errorlog -i/opt/sybase

Include path for user

login as sybase

# vi /home/sybase/.bash_profile

Change
SYBASE=/sybase

to

SYBASE=/opt/sybase

Include path for root and allocate shared memory. The default memory is 32MB
—————————————————————————–
vi /etc/rc.d/init.d/sybase

uncomment the following line,
# export SYBASE=`rpm -q –queryformat ‘%{installprefix}’ sybase-ase-11.0.3.3`

include the following line,
SYBASE=/opt/sybase
export SYBASE
echo 67108864 > /proc/sys/kernel/shmmax

Testing the new sybase server

At /opt/sybase/bin

# ./isql -Usa -SSYBASE
Password:
1> sp_helpdb
2> go
name                     db_size       owner                    dbid
created
status
———————— ————- ———————— ——
————–
——————————————————————————————————
master                          5.0 MB sa                            1
Jan 01, 1900
no options set
model                           2.0 MB sa                            3
Jan 01, 1900
no options set
sybsystemprocs                 32.0 MB sa                            4
Jun 07, 2006
trunc log on chkpt
tempdb                          2.0 MB sa                            2
Jun 07, 2006
select into/bulkcopy

(return status = 0)
==================================================

You should see 4 default databases created

Using dsedit on client to ping sybase server
——————————————–
if you failed to ping the server IP

Check sybase is running and port 4000 is lisenting

# netstat -a
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 sybase:4000                 *:*                         LISTEN
tcp        0      0 sybase:4001                 *:*                         LISTEN

Well, port 4000 and 4001 is listening where 4000 is sybase and 4001 is backup

Edit the Hosts file
—————————————
If you have not configure the proper hostname during Fedora installation, you will fail to ping and get error
——————————————————————–
SERVER ERROR: Failed to log in to server ‘SYBASE’ to shut it down.
Press <return> to continue.
Task succeeded: update the Sybase Server runserver file.

CONNECTIVITY ERROR: DB-Library error: ‘Unknown host machine name.’.
Press <return> to continue.

INTERNAL ERROR: Could not locate message number ’514′ for product ‘SQL Server’ in message
cache.
———————————————————————-

Let change the hostname
# vi /etc/hosts

include the following line

192.168.0.100           sybase
127.0.0.1               localhost.localdomain localhost

Edit the sybase interface
—————————————
vi /opt/sybase/interfaces

## SYBASE on localhost.localdomain
query tcp ether localhost.localdomain 4000
master tcp ether localhost.localdomain 4000

to
query tcp ether sybase 4000
master tcp ether sybase 4000

SYB_BACKUP

query tcp ether localhost.localdomain 4001
master tcp ether  localhost.localdomain 4001
to
query tcp ether sybase 4001
master tcp ether sybase 4001
Start and shutdown the sybase server
——————————-
Before you shut down your Linux system, you should shut down your Sybase servers. Do this using the isql program. Log in as the sa user to shut down the server with isql
>shutdown SYB_BACKUP
>go

SYB_BACKUP is the default name for a backup server.

Then type shutdown to shut down the SQL server; this will remove both servers from memory. Now you can shut down your Linux system.

If you don’t shut down the servers properly, you could corrupt data.

To start up the servers, you need to be logged in as the user sybase. Change to the install directory and type:

./startserver -f ./RUN_sybase

to start the SQL server and then

 ./startserver -f ./RUN_sybase_bs

To start sybase at boot time

There is a start up script provide by sybase install directory

You can copy the script to /etc/rc.d/init.d
# cp /opt/sybase/install/rc.sybase /etc/rc.d/init.d

You can link this script to the proper places in rc.d directories so the server will automatically start and stop when you

start and stop your Linux system.

Let start sybase at runlevel 3,

# cd /etc/rc.d/rc3.d
# ln -s ../init.d/sybase S87sybase
# ln -s ../init.d/sybase K87sybase

Author: VaibhaV Nanoti

Hi, I am VaibhaV Nanoti & Certified with Linux, MCITP & Cisco. I has experience in handling implementation projects related to Linux, windows & Network topology .I have also published several papers globally on Linux, Windows and Network(LAN,MAN,WAN) technology.

6 thoughts on “Installation & configuration of Sybase DB (15.7) Server on Linux”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.