Friday, January 15, 2010

Installing Oracle 11gR1 on Ubuntu 8.10 Intrepid Ibex

Published by CybTech at 8:54 AM

Preparation

Let’s get down to it, shall we? The first thing to do is to get some files. We need an ISO image of Ubuntu (a CD/DVD will do) and one of Oracle 11gR1. Get Ubuntu 8.10 Server here; and Oracle 11gR1 here. (It’s free, but you have to register on the Oracle website to download it.)
It’s a good idea to check the md5sum of each image after downloading from the Internet.
I’m using VMWare Server for this article, since it’s very handy when you have to repeat the whole procedure several times until you get the proper sequence; also because it is free as in “free beer” (but not as in “free speech”—see http://vmware.com/products/server/). If you prefer, you can use a physical machine, Xen (http://www.xen.org/) or VirtualBox (http://www.virtualbox.org/) but I’m not covering those here.
I’ve installed a plain-vanilla x86 Ubuntu instance with 512 MB of RAM, but instead of creating a disk with the suggested defaults, I’ve created one single virtual disk with 16 GB instead, so I can be sure not to run out of disk space. During the installation, you should choose guided partitioning and no encrypted home directory, unless you know what you’re doing. Also, as we’re going to do everything remotely in this HOWTO, you will want to request the installation of a OpenSSH server in the last steps of the installation.

On the first boot, let’s check if we have everything we need, such as connectivity and sudo acccess.
bott@desktop:~$ ssh pythian@192.168.x.y
(...)
pythian@192.168.x.y's password:
Linux ibex 2.6.27-7-server #1 SMP Fri Oct 24 07:37:55 UTC 2008 i686
(...)
pythian@ibex:~$ sudo -l
[sudo] password for pythian:
User pythian may run the following commands on this host:
    (ALL) ALL
pythian@ibex:~$ logout

Connection to 192.168.x.y closed.
If you don’t have access to the box, review your installation, network addresses, etc. Let’s continue by updating every single package on the box:
bott@desktop:~/Desktop$ ssh pythian@192.168.x.y
pythian@192.168.x.y's password:
(...)
pythian@ibex:~$ sudo su -
root@ibex:~# apt-get update
Hit http://security.ubuntu.com intrepid-security Release.gpg
Ign http://security.ubuntu.com intrepid-security/main Translation-en_US
(...)
Get:7 http://security.ubuntu.com intrepid-security/multiverse Packages [14B]
Get:8 http://security.ubuntu.com intrepid-security/multiverse Sources [14B]
Fetched 6551B in 0s (7776B/s)
Reading package lists... Done
root@ibex:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
(...)
5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.7MB of archives.
After this operation, 24.6kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(...)
Running postinst hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.27-7-server
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
(...)
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
root@ibex:~#
Since we had a kernel upgrade, reboot before continuing:
root@ibex:~#reboot
(...)
The system is going down for reboot NOW!
root@ibex:~# Connection to 192.168.x.y closed by remote host.
Connection to 192.168.x.y closed.
bott@desktop:~/Desktop$
After rebooting to change the kernel, let’s install all the required packages to continue:
bott@desktop:~/Desktop$ ssh pythian@192.168.x.y
pythian@192.168.x.y's password:
(...)
pythian@ibex:~$ sudo su -
[sudo] password for pythian:
root@ibex:~# apt-get install gcc make binutils gawk x11-utils rpm alien ksh lsb-rpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
(... long list ...)
Suggested packages:
(... another long list ...)
The following NEW packages will be installed:
(... even longer list ...)
0 upgraded, 54 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.3MB of archives.
After this operation, 93.0MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://us.archive.ubuntu.com intrepid/main gawk 1:3.1.6.dfsg-0ubuntu1 [500kB]
Get:2 http://us.archive.ubuntu.com intrepid/main libdrm2 2.3.1-0build1 [260kB]
(...)
Setting up build-essential (11.4) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
root@ibex:~#
Now we have all the packages we need, so let’s make sure we have all the requirements to run the Oracle Universal Installer as it was not designed to run on Ubuntu, but rather on Redhat-like systems). First, make sure Bash is your default replacement for sh:
root@ibex:~# cd /bin
root@ibex:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-11-02 21:33 /bin/sh -> dash
root@ibex:/bin# ln -sf /bin/bash /bin/sh
root@ibex:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-11-02 22:34 /bin/sh -> bash
root@ibex:/bin#
Let’s create some users:
root@ibex:/bin# cd
root@ibex:~# pwd
/root
root@ibex:~# addgroup oinstall
Adding group `oinstall' (GID 1001) ...
Done.
root@ibex:~# addgroup dba
Adding group `dba' (GID 1002) ...
Done.
root@ibex:~# addgroup nobody
Adding group `nobody' (GID 1003) ...
Done.
root@ibex:~# usermod -g nobody nobody
root@ibex:~# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
root@ibex:~# mkdir /home/oracle
root@ibex:~# chown -R oracle:dba /home/oracle
root@ibex:~# ln -s /usr/bin/awk /bin/awk
root@ibex:~# ln -s /usr/bin/rpm /bin/rpm
root@ibex:~# ln -s /usr/bin/basename /bin/basename
root@ibex:~# mkdir /etc/rc.d
root@ibex:~# for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done
root@ibex:~# mkdir -p /u01/app/oracle
root@ibex:~# chown -R oracle:dba /u01
root@ibex:~#
Copy the unpacked Oracle 11gR1 to the box we’re working on:
bott@desktop:~/Desktop$ scp -r database pythian@192.168.x.y:
pythian@192.168.x.y's password:
(...)
And put our installation files in place:
pythian@ibex:~$ sudo su -
root@ibex:~# mv /home/pythian/database /media/database
root@ibex:~# chown -R oracle:oinstall /media/database
root@ibex:~#
Let’s change some system-wide configuration files, starting with /etc/sysctl.conf:
root@ibex:~# cd /etc
root@ibex:/etc# cp sysctl.conf sysctl.conf.original
Edit it, adding the following lines to the bottom of the file:
fs.file-max = 65535
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
Then, let’s modify /etc/security/limits.conf:
root@ibex:/etc# cd /etc/security/
root@ibex:/etc/security# cp limits.conf limits.conf.original
Add the following lines to the bottom of the file:
oracle soft nproc 2047
oracle hard nproc 16383
oracle soft nofile 1023
oracle hard nofile 65535
The last one, for now, is /etc/pam.d/login:
root@ibex:/etc/security# cd /etc/pam.d
root@ibex:/etc/pam.d# cp login login.original
Edit login, adding to it:
session required /lib/security/pam_limits.so
session required pam_limits.so
I’m not completely convinced that a reboot is needed here (you probably could get away with sysctl -p as root and logging in again as your user) but I do recommend it, just to make sure we are on the same page. Doing so guarantees that we’ve cleaned up our memory and loaded at boot time all the changes we just did.

Oracle installation

Once our VM is back online. it’s time to become user oracle and to fire up the Oracle Universal Installer. Don’t forget to allow incoming connections on your X server with xhost +192.168.x.y. The IP address 192.168.w.z is the IP address of your X server.
pythian@ibex:~$ whoami
pythian
pythian@ibex:~$ sudo su -
[sudo] password for pythian:
root@ibex:~# su - oracle
oracle@ibex:~$ export DISPLAY=192.168.w.z:0.0
oracle@ibex:~$ cd /media/database
oracle@ibex:/media/database$ ./runInstaller -ignoreSysPrereqs
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB.   Actual 12037 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 729 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-11-04_12-02-58AM. Please wait ...oracle@ibex:/media/database$ Oracle Universal Installer, Version 11.1.0.6.0 Production
Copyright (C) 1999, 2007, Oracle. All rights reserved.
The installer may throw errors at some point:
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xa35067c7]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xa3506891]
#2 /usr/lib/libX11.so.6(_XReply+0x254) [0xa354e494]
(...)
I ignored it and moved on with the installation. You should be able to finish your installation just as I did. The following screen will be presented:

oui-001.png
I’ve selected group dba:
oui-011.png
And asked the installer to proceed with the whole Enterprise Edition:
oui-021.png
Note that we changed the name and location of our ORACLE_HOME to oraibex and /u01/app/oracle/product/11.1.0/oraibex:
oui-041.png
Some of the product-specific prerequisite checks will fail, but we check each checkbox so the last column reads “User Verified” on all unchecked rows:
oui-051.png
We will install software only now, nothing else:
oui-061.png
And change the privileged OS groups to dba:
oui-081.png
It will show us a summary, but the Next is greyed out, so we hit Install
oui-091.png
And it will begin installing:
oui-101.png
And we get a cup of tea:
oui-151.png
And another cup of tea:
oui-161.png
Until it asks us to execute a couple of scripts as root:
oui-171.png
In case you’ve never done this before and want to know what it looks like, here’s the output I got:
bott@desktop:~$ ssh pythian@192.168.x.y
pythian@192.168.x.y's password:
(...)
pythian@ibex:~$ sudo su -
[sudo] password for pythian:
root@ibex:~# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname of /u01/app/oraInventory to dba.
The execution of the script is complete
root@ibex:~# /u01/app/oracle/product/11.1.0/oraibex/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.1.0/oraibex

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
root@ibex:~#
At the end of the installation, the Oracle Universal Installer is kind enough to ask us for confirmation before leaving (you can click on “Installed Products” and review what was installed before leaving the installer:
oui-191.png
Now, take note of two things, our ORACLE_BASE and our ORACLE_HOME as we’ll use them later:
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.1.0/oraibex
We now have only the database software, but no database created yet. Let’s get moving and install the few extra packages needed to complete our installation. Please note that on several attempts, I’ve installed all the packages in the earlier step, but all those attempts failed; that’s why we’re installing it just before we actually need it (dbca will fail without those and the database won’t be created):
root@ibex:~# apt-get install libaio1 lesstif2 libmotif3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libxp6
The following NEW packages will be installed:
  lesstif2 libaio1 libmotif3 libxp6
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1941kB of archives.
After this operation, 4772kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://us.archive.ubuntu.com intrepid/main libxp6 1:1.0.0.xsf1-2 [16.7kB]
Get:2 http://us.archive.ubuntu.com intrepid/multiverse libmotif3 2.2.3-2 [1283kB]
(...)
Setting up libaio1 (0.3.107-1ubuntu1) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
root@ibex:~#
Create our startup/init script:
root@ibex:~# cat /etc/init.d/oracledb
#!/bin/bash
#
# /etc/init.d/oracledb
#
# Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/oraibex
export ORACLE_OWNR=oracle
export PATH=$PATH:$ORACLE_HOME/bin

if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
    echo "Oracle startup: cannot start"
    exit 1
fi

case "$1" in
    start)
        # Oracle listener and instance startup
        echo -n "Starting Oracle: "
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
        touch /var/lock/oracle
        echo "OK"
        ;;
    stop)
        # Oracle listener and instance shutdown
        echo -n "Shutdown Oracle: "
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
        rm -f /var/lock/oracle
        echo "OK"
        ;;
    reload|restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: `basename $0` start|stop|restart|reload"
        exit 1
esac

exit 0
We will make it executable and tell the OS we want it started at boot time:
root@ibex:~# chmod a+x /etc/init.d/oracledb
root@ibex:~# update-rc.d oracledb defaults 99
update-rc.d: warning: /etc/init.d/oracledb missing LSB style header
 Adding system startup for /etc/init.d/oracledb ...
   /etc/rc0.d/K99oracledb -> ../init.d/oracledb
   /etc/rc1.d/K99oracledb -> ../init.d/oracledb
   /etc/rc6.d/K99oracledb -> ../init.d/oracledb
   /etc/rc2.d/S99oracledb -> ../init.d/oracledb
   /etc/rc3.d/S99oracledb -> ../init.d/oracledb
   /etc/rc4.d/S99oracledb -> ../init.d/oracledb
   /etc/rc5.d/S99oracledb -> ../init.d/oracledb
root@ibex:~#
Note: Do NOT reboot now.

Creating a database

Let’s install our first database with DBCA (DataBase Configuration Assistant).
root@ibex:~# su - oracle
oracle@ibex:~$ export DISPLAY=192.168.w.z:0.0
oracle@ibex:~$ export ORACLE_HOME=/u01/app/oracle/product/11.1.0/oraibex
oracle@ibex:~$ export PATH=$PATH:/u01/app/oracle/product/11.1.0/oraibex/bin
oracle@ibex:~$ dbca
(...some time will pass before you see anything -- be patient...)
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0x9fc957c7]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0x9fc95891]
(...)
Now, wait for a few moments, as dbca can take up to a couple of minutes to show this initial screen:
dbca-00.png
That’s right, we want to create a database:
dbca-01.png
A general Purpose or TransactionProcessing database, next:
dbca-02.png
And our SID will be intrepid:
dbca-031.png
But we don’t want to configure Enterprise Manager just now:
dbca-041.png
We want to use the same password for both SYS and SYSTEM accounts:
dbca-051.png
Nothing fancy, just plain filesystem for storage:
dbca-061.png
Let’s use the suggested template:
dbca-071.png
But no recovery area or archiving:
dbca-081.png
We don’t want the sample schemas or to execute any custom scripts at this time:
dbca-091.png
You can tune this if you want, but I’d suggest leaving it as-is unless you know what you’re doing:
dbca-101.png
As well as sticking with the suggestion of keeping the enhanced default security settings:
dbca-111.png
I don’t want any automatic unattended tasks running:
dbca-121.png
Check your filesystem layout, then hit Next:
dbca-131.png
Yes, we want it to go ahead and create the database. Hit Finish this time.
dbca-141.png
It will show what it’s about to do. Check it out, then hit OK when ready.
dbca-161.png
And it will get to work, creating your first database:
dbca-181.png
Go get another cup of tea:
dbca-201.png
And another:
dbca-211.png
And keep watching the screen until you see something like this:
dbca-221.png
At this point, you’ll have an empty database created.

Testing

Time to check it out. First test: we shut it down and restart it.
oracle@ibex:~$ export ORACLE_SID=intrepid
oracle@ibex:~$ . oraenv
ORACLE_SID = [intrepid] ?
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/oraibex is /u01/app/oracle
oracle@ibex:~$ sqlplus '/as sysdba'

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Nov 6 14:35:24 2008

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area  238530560 bytes
Fixed Size      1299116 bytes
Variable Size    125832532 bytes
Database Buffers   109051904 bytes
Redo Buffers      2347008 bytes
SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
oracle@ibex:~$
Next, we make it start on boot:
root@ibex:~# cat /etc/oratab
#

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
intrepid:/u01/app/oracle/product/11.1.0/oraibex:N
root@ibex:~#
See that N on the line starting with intrepid? Change it to Y:
intrepid:/u01/app/oracle/product/11.1.0/oraibex:Y
Here’s what happens when you run /etc/init.d/oracledb:
root@ibex:~# /etc/init.d/oracledb start
Starting Oracle:
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 12-NOV-2008 15:39:25

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.1.0/oraibex/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/ibex/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ibex.baia)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date                12-NOV-2008 15:39:28
Uptime                    0 days 0 hr. 0 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/ibex/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ibex.baia)(PORT=1521)))
The listener supports no services
The command completed successfully
Processing Database instance "intrepid": log file /u01/app/oracle/product/11.1.0/oraibex/startup.log
OK
root@ibex:~#
So after every reboot, you’ll be able to login to your database:
root@ibex:~# su - oracle
oracle@ibex:~$ export ORACLE_SID=intrepid
oracle@ibex:~$ . oraenv
ORACLE_SID = [intrepid] ?
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/oraibex is /u01/app/oracle
oracle@ibex:~$ sqlplus '/as sysdba'

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Nov 12 15:41:38 2008

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select sysdate from dual;

SYSDATE
---------
12-NOV-08

SQL>

So now, dear reader, we hope we have helped you figure out something you needed to know.

Friday, October 9, 2009

How to: Oracle 10g installation on RHEL5

Published by CybTech at 10:02 AM

Oracle 10g v10.2.0, RHEL 5.3, kernel 2.6.18-128.1.1.el5xen
Software requirements

After standard system installation and updating, install the following packges:

* compat-libstdc++
* libXp
* libXtst
* gcc
* gcc-c++
* glibc-devel

Users and groups

If the user oracle already exists but you could not use it (e.g., you are using a company Kerberos), you can use different user name. You can also add the user in more groups (-G argument), or set another home.

# groupadd dba
# groupadd oinstall
# useradd -g oinstall -d /home/oracle -G dba oracle
# passwd oracle

Set system limits

To view current limits use sysctl -a. The used values are required minimums.

shmall should be 2097152, shmni 4096, shmmax half the size of physical memory (in bytes). These requirements are usually met by default.

sysctl -w kernel.sem="250 32000 100 128"
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
net.ipv4.ip_local_port_range="1024 65000"
sysctl -p # reload the changes

Shell profile

Suggested changes to .bashrc:

export PATH=/opt/oracle/product/10.2.0/bin/:$PATH
export ORACLE_OWNER=oracle
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_SID=you_great_SID

Relogin for the changes to take effect.


OS Version

Pretend that you are somebody else in /etc/redhat-release:

Red Hat Enterprise Linux ES release 4 (Nahant Update 6)

GUI Installer

gunzip 10201_database_linux_x86_64.cpio.gz
cpio -idvm < 10201_database_linux_x86_64.cpio
rm 10201_database_linux_x86_64.cpio.gz
cd database
./runInstaller

Choose Advanced Installation, go with Enterprise Edition, you can let it create general purpose database.

Post Installation

You can login as SYSDBA, create a user and grant them some privileges.

CREATE USER myuser IDENTIFIED BY password DEFAULT TABLESPACE users;
GRANT ALL PRIVILEGES TO myuser;

Created on: May 14, 2009 4:49 AM by Martin Vecera - Last Modified:  May 14, 2009 9:34 AM by Martin Vecera

Tuesday, August 25, 2009

PowerBuilder NET 12

Published by CybTech at 8:25 AM

PowerBuilder .NET - Skins and PowerBuilder

Published by CybTech at 8:15 AM

Tuesday, December 18, 2007

Blinking Text

Published by CybTech at 4:25 PM

This is a very simple but very effective trick. You will need to set the timer interval of the datawindow to something, I set it to 10. You will find the timer by double clicking on any blank part of the datawindow.

Next place a text field on the datawindow (or any control) goto the attributes dialog. Then in the visible attribute place this code:

if( Mod( Integer( Mid( String( Now() ), 7, 2 ) ),2 ) = 1,0,1)

It is also possible to make the text change colours by using similar code in the color attribute:

if( Mod( Integer( Mid( String( Now() ), 7, 2 ) ),2 ) = 1,0,255)

Sort, Filter and Query Dialogs

Published by CybTech at 4:07 PM

The datawindow is the work horse of PowerBuilder, when you have been using it for a while it is easy to forget some of the basic but very powerful built-in function of the Datawindow.


Sort
You can specify the default sort sequence of the datawindow using a cool drag and drop style response window, but you may not know that with two or three simple commands you can offer the same dialog window to users of your application:

String ls_Null

SetNull( ls_Null )
dw_1.SetSort( ls_Null )
dw_1.Sort()


Filter
The filter is a great function for showing users slices of the data making the screen less cluttered and making large amounts of data easier to deal with. Well the filter dialog window is also available to your users:

String ls_Null

SetNull( ls_Null )
dw_1.SetFilter( ls_Null )
dw_1.Filter()

Query Mode
Query mode is a great feature for higher power users. It allows them to alter the where clause by entering arguments into the Datawindow columns. For example whilst in query mode the user could enter >500 to show all employees who's hourly rate was over 500 dollars. And if there are any companies out there who want to pay me 500 dollars an hour send me an email :). Anyway enough fantasy, the user only extends the original where clause so you can add a few basic joins and limits to the SQL to they don't bring the server down. You can also query the Where clause so see what they altered it to and maybe offer some ability to save their queries for future use. This code is based in the clicked event of a checkbox to allow the user to toggle the query mode:

IF NOT this.checked THEN
dw_1.Modify("DataWindow.QueryMode=YES")
ELSE
dw_1.Modify("DataWindow.QueryMode=NO")
dw_1.Retrieve()
END IF

Capturing Date and Time from Oracle Database Server

Published by CybTech at 3:48 PM

global type server_date from function_object
end type

forward prototypes
global function datetime server_date ()
end prototypes

global function datetime server_date ();datetime dfr
select sysdate
into :dfr
from dual;
return dfr

end function

Watch TV - Live online internet televisionAccess to 4000 live TV stations from your pc. No need of a TV tuner or decoder. 100% legal - no subscription needed.

Watch television channels online anywhere. All you need is our software, your pc, and Internet connection. Thousands of television shows that would cost you big money in the long run with traditional TV providers, now can watch them with no subscription. Watch 4000 TV Stations from Over 80 Countries!

Cartoons, Fashion, News, Discovery, Sport, Movies, Music, Football, Adult Shows, Weather, Stocks, Educational, and many others channels are available.

You can watch TV to your PC or laptop at any time and anywhere in the world since our service is not affected by regional terrain or weather.

This webtv software does not contain any spyware or advertise modules. It has safety installation with NO WORRIES concerning valuable information loss.

WATCH TV NOW. LIMITED TIME OFFER.