How to configure parameters in Sybase

There are three types of paramaters in Sybase:
1. Dynamic – dynamic parameter changes take affect immediately
2. Static – static parameter changes take effect when server is restarted
3. Read-only – read-only parameters cannot be changed
Dynamic and static parameters we can change in two ways:
Continue reading How to configure parameters in Sybase →

How to change timezone in Solaris

If we want to change timezone on our server running Solaris we need to:

1. On sparc server :

# vi /etc/TIMEZONE

we are changing TZ parameter eg:.

TZ=GMT

We save file and reboot server.

2. On server x86:

We edit /etc/TIMEZONE file as for sparc server, but we need also edit rtc_config file  using command:

# rtc -z GMT
# rtc -c

Then we reboot server.

List of possible timezones we can find in:

/usr/share/lib/zoneinfo/

SQL *Plus – how to change prompt (oracle 10g)

Prompt in SQL*Plus we can change by configuring sqlprompt variable:

SQL> set sqlprompt ‘my prompt> ‘
my prompt>

We can also use some predefined variables in sqlprompt:

Continue reading SQL *Plus – how to change prompt (oracle 10g) →

How to check free space in Sybase(ASE) database

If we would like to check free and occupied space in devices with data and logs in our Sybase(ASE) databases we can use script as below:

Continue reading How to check free space in Sybase(ASE) database →

How to find and kill user session in Oracle database

Command which will allow us to find active sessions :

SYS SolA >select sid,serial#,username,osuser from v$session where username is not null;

SID       SERIAL#            USERNAME  OSUSER
———- ———- —————————— ——————————
50         3                                         SYS oracle

,to end session listed above we use:

SYS SolA >alter system kill session ‘50,3’;

System altered.

Integration Oracle database with SMF in Solaris

In this article I will show how to add Oracle database as service in Solaris SMF.

To make it possible we need to do two things:

1. Create script which will stop and start database

2. Create xml manifest , which will cover configuration for our service.

Let’s start…

Continue reading Integration Oracle database with SMF in Solaris →

How to add static routes under RedHat os

To add static routing in RHEL system we need to edit/create file for chosen interface:

vi /etc/sysconfig/network-scripts/route-bond0

we put in it information to which network we need redirection, mask and gateway eg.:

10.20.20.0/24 via 10.10.10.1
10.30.30.0/24 via 10.10.10.1

then we refresh routes using command:

/etc/sysconfig/network-scripts/ifup-routes bond0

Other option (which works in most linux-based systems)  is add commands to file /etc/local:

vi /etc/rc.local

route add -net 10.20.20.0 netmask 255.255.255.0 gw 10.10.10.1 dev eth1
route add -net 10.30.30.0 netmask 255.255.255.0 gw 10.10.10.1 dev eth1

How to mount iso image under Solaris

To mount image :

# lofiadm -a /root/sparc.iso /dev/lofi/1
# mount -F hsfs -o ro /dev/lofi/1 /mnt

To unmount:

# umount /mnt
# lofiadm -d /dev/lofi/1