Problem:Oracle Pro*c Precompiler on Linux

Hi,
PLEASE HELP!!!!
Regards
Bhagat Singh
Before discussing all these issue I want to inform u that this code is running code in sun solaris means it compiles cleanly and runs without flaws or error and results are to the mark.
But in linux first of all it does not compiles if it compiles then it does not produce the right/desired results .
1.ora erro 1008
2.ora errno 1438
3.ora errno 1403
Information is there in database but update is not working and returning code 1403
if it is working then also the message is "no data found".
Pl/Sql block is being used in the Pro*c code so we have made SQLCHECK = SEMANTICS then also it is not working.
When we use math.h then also it does not compiles at all and falters out.
When I update the database it does not updates may there be relevant information present in the database, but if i do select count(*) into :variable from the same table then it updates else it fails to do so they all are peculiar issues.
Some times it says parent record not found in the master whereas it very exists over there.
Some times core dump if I define two dimensional char pointer array of 10000 size it results in core dump
say char_ptr[300][10000] .
Some functions in the program return char pointer there also it is giving and error where and I am collecting the information from the return variable through string copying and it is having clear cut definition in header files for the return type of that function this is working very well in sun but I fail to understand about linux.
operating systems details
=====================
Linux Details
===========
Linux=Red Hat Release 6.2 (Zoot), Kernel 2.2.14-12 on an i686
Oracle 8 i=Release 2 Version 8.1.6
Proc Compiler= Release 8.1.6.0.0
Sun Details
==========
SunOS blrgps 5.6 Generic sun4u sparc SUNW,Ultra-1
Oracle 8=Release 8.0.3.0.0
Proc Compiler= Release 8.0.3.0.0
.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=.:$PATH:$HOME/bin:/opt/oracle/OraHome1/bin:/usr/bin:/bin:/usr/local/bin:/opt/oracle/OraHome1/bin:/usr/sbin
:/opt/oracle/OraHome1/precomp/lib:/usr/include:/usr/lib
BASH_ENV=$HOME/.bashrc
USERNAME=""
ORACLE_HOME=/opt/oracle/OraHome1
ORACLE_SID=telecom
ORACLE_OWNER=oracle
EPC_DISABLED=TRUE
LD_LIBRARY_PATH=/opt/oracle/OraHome1/lib
export USERNAME BASH_ENV PATH ORACLE_HOME ORACLE_SID ORACLE_OWNER LD_LIBRARY_PATH
NLS_LANG=american; export NLS_LANG
null

I have very similar problems, all of which I have been able to work around, except for the very serious defect where the executed code returns bizarre errors like no data found for a query like:
EXEC SQL SELECT sum(X) INTO :var FROM table;
These same programs were working just fine under Oracle 8.0.5 on Solaris/Intel 2.6 w/ gcc 2.7.2p.
My configuration is RedHat 6.2 / Kernel 2.2.14-6.1.1smp / gcc egcs-2.91.66 (release 1.1.2) / glibc 2.1.3-15
Note: Pro*C 8.1.6 for Linux does come with some alternate system header files in $ORACLE_HOME/proc/syshdr. This should fix your math.h problem if you place that directory early in your include path.

Similar Messages

  • Problem with Pro*C Precompiler in 10gR2

    To test whether my pro*c precompiler was working, I copied a sample program and tried running it through the precompiler. I am running Fedora 6 on Linux X86-64
    This was what I got.
    proc iname=sample1.pc ltype=long
    Pro*C/C++: Release 10.2.0.1.0 - Production on Sat Aug 18 01:53:49 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from: /u01/app/oracle/product/10.2.0/db_1/precomp/admin/pcscfg.cfg
    Syntax error at line 72, column 26, file /usr/include/gconv.h:
    Error at line 72, column 26 in file /usr/include/gconv.h
    unsigned char **, size_t *, int, int);
    .........................1
    PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
    ... auto, char, const, double, enum, float, int, long,
    ulong_varchar, OCIBFileLocator OCIBlobLocator,
    OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
    OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
    short, signed, sql_context, sql_cursor, static, struct,
    union, unsigned, utext, uvarchar, varchar, void, volatile,
    a typedef name, exec oracle, exec oracle begin, exec,
    exec sql, exec sql begin, exec sql type, exec sql var,
    The symbol "enum," was substituted for "size_t" to continue.
    Syntax error at line 88, column 7, file /usr/include/gconv.h:
    Error at line 88, column 7 in file /usr/include/gconv.h
    size_t *);
    ......1
    PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
    ... auto, char, const, double, enum, float, int, long,
    ulong_varchar, OCIBFileLocator OCIBlobLocator,
    OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
    OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
    short, signed, sql_context, sql_cursor, static, struct,
    union, unsigned, utext, uvarchar, varchar, void, volatile,
    a typedef name, exec oracle, exec oracle begin, exec,
    exec sql, exec sql begin, exec sql type, exec sql var,
    The symbol "enum," was substituted for "size_t" to continue.
    Syntax error at line 97, column 6, file /usr/include/gconv.h:
    Error at line 97, column 6 in file /usr/include/gconv.h
    size_t *);
    .....1
    PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
    ... auto, char, const, double, enum, float, int, long,
    ulong_varchar, OCIBFileLocator OCIBlobLocator,
    OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
    OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
    short, signed, sql_context, sql_cursor, static, struct,
    union, unsigned, utext, uvarchar, varchar, void, volatile,
    a typedef name, exec oracle, exec oracle begin, exec,
    exec sql, exec sql begin, exec sql type, exec sql var,
    The symbol "enum," was substituted for "size_t" to continue.
    Syntax error at line 106, column 3, file /usr/include/gconv.h:
    Error at line 106, column 3 in file /usr/include/gconv.h
    __gconv_trans_fct __trans_fct;
    ..1
    PCC-S-02201, Encountered the symbol "__gconv_trans_fct" when expecting one of th
    e following:
    char, const, double, enum, float, int, long, ulong_varchar,
    OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
    OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
    OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
    struct, union, unsigned, utext, uvarchar, varchar, void,
    volatile, a typedef name,
    Syntax error at line 0, column 0, file sample1.pc:
    Error at line 0, column 0 in file sample1.pc
    PCC-S-02201, Encountered the symbol "<eof>" when expecting one of the following:
    ; : an identifier, end-exec, random_terminal
    Error at line 0, column 0 in file sample1.pc
    PCC-F-02102, Fatal error while doing C preprocessing
    This is what I have in pcsfg.cfg
    sys_include=(/build/s630/precomp/public,/usr/include,/opt/gcc33/lib64/gcc-lib/x86_64-suse-linux/3.3/include,/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/include,/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/include,/usr/include/linux,/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include)
    ltype=short
    define=__x86_64__
    include=(/u01/app/oracle/product/10.2.0/db_1/precomp/public)
    include=/u01/app/oracle/product/10.2.0/db_1/precomp/hdrs
    I would be very grateful for any help.
    Thanks

    Thanks very much for your help. With code=CPP the size_t error disappears. But will that produce Pro C code in C format ?
    I ran into another problem.
    [oracle@Falcon source]$ proc iname=sample1.pc ltype=long code=CPP
    Pro*C/C++: Release 10.2.0.1.0 - Production on Sun Aug 19 08:33:31 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from: /u01/app/oracle/product/10.2.0/db_1/precomp/admin/pcscfg.cfg
    Semantic error at line 19, column 22, file sample1.pc:
    EXEC SQL CONNECT :userid;
    .....................1
    PCC-S-02322, found undefined identifier
    Semantic error at line 25, column 23, file sample1.pc:
    WHERE deptno = :dept_number;
    ......................1
    PCC-S-02322, found undefined identifier
    Semantic error at line 38, column 39, file sample1.pc:
    EXEC SQL FETCH emp_cursor INTO :emp_name;
    ......................................1
    PCC-S-02322, found undefined identifier
    [oracle@Falcon source]$ vi sample1.pc
    Where this is the code.
    [oracle@Falcon source]$ cat sample1.pc
    #include <stdio.h>
    /* declare host variables */
    char userid[18] = "PRODUSER/PRODUSER";
    char emp_name[10];
    int emp_number;
    int dept_number;
    char temp[32];
    void sql_error();
    /* include the SQL Communications Area */
    #include <sqlca.h>
    main()
    { emp_number = 7499;
    /* handle errors */
    EXEC SQL WHENEVER SQLERROR do sql_error("Oracle error");
    /* connect to Oracle */
    EXEC SQL CONNECT :userid;
    printf("Connected.\n");
    /* declare a cursor */
    EXEC SQL DECLARE emp_cursor CURSOR FOR
    SELECT ename
    FROM emp
    WHERE deptno = :dept_number;
    printf("Department number? ");
    gets(temp);
    dept_number = atoi(temp);
    /* open the cursor and identify the active set */
    EXEC SQL OPEN emp_cursor;
    printf("Employee Name\n");
    printf("-------------\n");
    /* fetch and process data in a loop
    exit when no more data */
    EXEC SQL WHENEVER NOT FOUND DO break;
    while (1)
    EXEC SQL FETCH emp_cursor INTO :emp_name;
    printf("%s\n", emp_name);
    EXEC SQL CLOSE emp_cursor;
    EXEC SQL COMMIT WORK RELEASE;
    exit(0);
    void sql_error(msg)
    char *msg;
    char buf[500];
    int buflen, msglen;
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    EXEC SQL ROLLBACK WORK RELEASE;
    buflen = sizeof (buf);
    sqlglm(buf, &buflen, &msglen);
    printf("%s\n", msg);
    printf("%*.s\n", msglen, buf);
    exit(1);
    Why won't it recognize userid ? And that is a valid login/password.

  • Register database problem (oracle 8.1.6) on Linux 6.2

    I'm unable to register my database using RMAN. I'm using Oracle 8.1.6 on Redhat Linux 6.2 (glibc - 2.2.14-5.0). Is there any known bug in Oracle 8.1.6 / rman on Linux 6.2.
    These are the steps I followed:
    1. Create rman Tablespace
    =============================
    create tablespace TS_RMAN
    datafile '/u01/orauser/oradata/mydb/TS_RMAN.dbf'
    size 5M
    autoextend on;
    2. Create rman user
    =============================
    create user rmanusr identified by rmanusr
    default tablespace TS_RMAN
    temporary tablespace TEMP
    quota unlimited on TS_RMAN;
    3. Grant roles to rman user
    ==================================
    grant connect, resource,recovery_catalog_owner to rmanusr;
    4. I'm logging on the server directly
    $rman target system/manager catalog rmanusr/rmanusr
    5. RMAN> create catalog tablespace TS_RMAN
    .... catalog created!
    6. RMAN> register database;
    ... gives me all these errors messages >>
    RMAN> register database;
    RMAN-03022: compiling command: register
    RMAN-03023: executing command: register
    RMAN-08006: database registered in recovery catalog
    RMAN-03023: executing command: full resync
    RMAN-03026: error recovery releasing channel resources
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-07005: error during channel cleanup
    RMAN-07004: unhandled exception during command execution on channel default
    RMAN-10032: unhandled exception during execution of job step 1:
    RMAN-10031: ORA-65535 occurred during call to DBMS_BACKUP_RESTORE.DEVICESTATUS
    RMAN-03008: error while performing automatic resync of recovery catalog
    RMAN-07004: unhandled exception during command execution on channel default
    RMAN-10032: unhandled exception during execution of job step 1:
    ORA-01403: no data found
    RMAN-10031: ORA-65535 occurred during call to DBMS_BACKUP_RESTORE.GETPARM
    ------ end of message -------
    Actually I followed the same steps in my own PC with Oracle 8.1.7 on Win2k, It worked!!

    Hello,
    Narender,you have to include DISPLAY in your .bash_profile and set to your hostname, somewhat like this DISPLAY=hostname:0.0
    or read the installation guides, installation of Oracle 8.1.6 in RHL 6.2 is straight forward.

  • Problem installing Oracle 8.05 on Redhat Linux 7.1

    I am currently trying to install Oracle 8.05 onto Redhat Linux 7.1. I can get part of the way through
    the installation, however, when it is installing the rdbms portion. I stops with an error about a failure
    during relinking. Here is the part of make.log which details what really happened. Could someone tell
    me how to proceed.
    Thank you,
    Nicholas Waltham
    --------------[ rdbms.ins 2618 ]---------------------------------------------
    Action: Installing install.
    Command: (make -f ins_rdbms.mk ORACLE_HOME=/opt/oracle/home install), Out=/opt/oracle/home/orainst/make.log, Err=/opt/oracle/home/orainst/make.log
    chmod 755 /opt/oracle/home/bin
    rm -f oracle exp imp sqlldr tkprof mig dbv tstshm maxmem orapwd dbfsize cursize rman genoci svrmgrl extproc ihsalloci ihsots ihsdepxa ogms ogmsctl osh sbttest /opt/oracle/home/rdbms/lib/ksms.s /opt/oracle/home/rdbms/lib/ksms.o
    echo " - Linking Oracle " ;\
    /opt/oracle/home/bin/echodo cc -L/opt/oracle/home/lib/ -L/opt/oracle/home/rdbms/lib -o /opt/oracle/home/rdbms/lib/oracle /opt/oracle/home/rdbms/lib/opimai.o /opt/oracle/home/rdbms/lib/ssoraed.o /opt/oracle/home/rdbms/lib/ttcsoi.o /opt/oracle/home/rdbms/lib/config.o \
    -lserver -lclient -lvsn -lcommon -lgeneric \
    /opt/oracle/home/rdbms/lib/defopt.o /opt/oracle/home/lib/ncrstab.o -lknlopt \
    -lslax -lplsf -lplsb -lextp -lserver -lclient -lvsn -lcommon -lgeneric -lknlopt \
    -lslax -lplsf -lplsb -lextp -ldbicx \
    /opt/oracle/home/lib/nautab.o /opt/oracle/home/lib/naeet.o /opt/oracle/home/lib/naect.o /opt/oracle/home/lib/naedhs.o `cat /opt/oracle/home/lib/naldflgs` -lnetv2 -lnttcp -lnetwork -lncr -lclient -lvsn -lcommon -lgeneric -lmm -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lnetv2 -lnttcp -lnetwork -lncr -lclient -lvsn -lcommon -lgeneric -lepc -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lclient -lvsn -lcommon -lgeneric -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 `cat /opt/oracle/home/lib/sysliblist` -ldl -lm -ldl -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lsql -lsql `cat /opt/oracle/home/rdbms/lib/nmliblist` `if ar tv /opt/oracle/home/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lmdknl -lmdhh"; fi` \
    -lkidt -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 `cat /opt/oracle/home/lib/sysliblist` -ldl -lm -ldl -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lsql -lsql ;
    - Linking Oracle
    cc -L/opt/oracle/home/lib/ -L/opt/oracle/home/rdbms/lib -o /opt/oracle/home/rdbms/lib/oracle /opt/oracle/home/rdbms/lib/opimai.o /opt/oracle/home/rdbms/lib/ssoraed.o /opt/oracle/home/rdbms/lib/ttcsoi.o /opt/oracle/home/rdbms/lib/config.o -lserver -lclient -lvsn -lcommon -lgeneric /opt/oracle/home/rdbms/lib/defopt.o /opt/oracle/home/lib/ncrstab.o -lknlopt -lslax -lplsf -lplsb -lextp -lserver -lclient -lvsn -lcommon -lgeneric -lknlopt -lslax -lplsf -lplsb -lextp -ldbicx /opt/oracle/home/lib/nautab.o /opt/oracle/home/lib/naeet.o /opt/oracle/home/lib/naect.o /opt/oracle/home/lib/naedhs.o -lnetv2 -lnttcp -lnetwork -lncr -lclient -lvsn -lcommon -lgeneric -lmm -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lnetv2 -lnttcp -lnetwork -lncr -lclient -lvsn -lcommon -lgeneric -lepc -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lclient -lvsn -lcommon -lgeneric -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lnsl -lm -ldl -lm -ldl -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lsql -lsql /opt/oracle/home/rdbms/lib/skgxns.o -lmdknl -lmdhh -lkidt -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lnsl -lm -ldl -lm -ldl -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lncr -lsql -lsql
    /opt/ora cle/home/lib//libplsf.a(spssimb.o): In function `pss_gets':
    spssimb.o(.text+0x4ef): the `gets' function is dangerous and should not be used.
    /opt/oracle/home/lib//libgeneric.a(skgfr.o): In function `skgfrcre':
    skgfr.o(.text+0x4de): the `llseek' function may be dangerous; use `lseek64' instead.
    /opt/oracle/home/lib//libserver.a(hoco.o): In function `hoconsi':
    hoco.o(.text+0x104d): undefined reference to `__strtoq_internal'
    /opt/oracle/home/lib//libserver.a(hoco.o): In function `hoconui':
    hoco.o(.text+0x126a): undefined reference to `__strtouq_internal'
    collect2: ld returned 1 exit status
    make: *** [opt/oracle/home/rdbms/lib/oracle] Error 1
    Status: 2
    (( OIERR-SYSTEM: make -f ins_rdbms.mk ORACLE_HOME=/opt/oracle/home install ))
    --------------[ rdbms.ins 2631 ]---------------------------------------------
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Nicholas Waltham ([email protected]):
    I am currently trying to install Oracle 8.05 onto Redhat Linux 7.1. I can get part of the way through
    the installation, however, when it is installing the rdbms portion. I stops with an error about a failure
    during relinking. Here is the part of make.log which details what really happened. Could someone tell
    me how to proceed.
    Thank you,
    Nicholas Waltham
    --------------[ rdbms.ins 2618 ]<HR></BLOCKQUOTE>
    Well ,I tried to install Oracle 8.0.5 in Debian Potato. At end I desist.
    Oracle 8.0.5 works with glibc 5 and Debian Potato with glibc6 .
    I guess this is your problem.
    There are patches for this but i don't get
    to make work.
    Sorry for my english.
    Cisar

  • Problem installing Oracle 9.2 on RedHat Linux 7.1 and 9.0

    Hi everyone,
    As the subject line says, I tried installing Oracle 9.2 on
    RedHat Linux 7.1 and 9.0, strictly following instructions
    written by Werner Puschitz
    (http://www.puschitz.com/InstallingOracle9i.shtml). Both
    attempts failed with identical symptoms:
    - the installer asks for Disk 2
    - after the disk is inserted, it hangs. It turns out that
    kernel is writing messages similar to these in
    /var/log/messages:
    Jun 16 02:45:19 boston kernel: 16:00: rw=0, want=317696, limit=149920
    Jun 16 02:45:19 boston kernel: attempt to access beyond end of device
    Unless interrupted, this continues until the /tmp filesystem gets full.
    Has anyone experienced this? I haven't been able to find
    an explanation so far.
    Any help would be much appreciated.
    Regards,
    Ljubomir Buturovic

    Providing a thread-bare configuration of your machine on which you are trying to install Oracle on Linux (and mind you - which kernel/distro, coz that's important) would definitely help you elicit more responses to your messages.

  • Problem with CD-Rom Mount point ( Oracle 8.1.5 for Linux )

    I try to create database using dbassist ( copy from CD method
    But I receive error message about "Can not detect CD-ROM'.
    Where should I use as my CD-Rom muont point ?
    null

    Mubashir (guest) wrote:
    : End of June? In the mean time we got to deal with older
    version
    : that you have to go through an 84 process long install
    procedure
    : to get working. Life stinks.
    : Mubashir
    : Michael (guest) wrote:
    : : Hi Vladimir,
    : : the new shipping announcement for Oracle 8i for Linux is now
    : end
    : : of June. When Oracle 8i on Linux is available, I'm sure you
    can
    : : download it from technet.
    : : Stay tuned.
    : : Best regards Michael
    : : Vladimir Borkovkin (guest) wrote:
    : : : HI,
    : : : Oracle promised that shipping of Oracle 8.1.5 for Linux
    will
    : : : begin last week of May. It is neary middle of June, but we
    : have
    : : : no CD shipping. Fathermore, there is no information abaut
    : delay
    : : : time.
    : : : Best regards,
    : : : Vladimir
    null

  • Problem with pro*c compilation and linking

    Hi all,
    I have a problem running the pro*c program on an windows environment.
    I have oracle9i and visual studio .net. Ya kinda strange about the combo, but need to live with it.
    I create a .pc file and precompile it using oracle pro*c/c++ precompiler. so now I got the .c file.
    I used .net command line to compile this .c file
    It gave me the .obj file. Now I am getting a link error. I am not sure how I need to link the linkfile.
    Let me know if you have any suggestions.
    Thank you,
    -Raghu

    Make sure you are including the Pro*C library. The platform docs tell you explicitly what the library name is. I think for 9i it is called orasql9.lib.

  • Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto

    h1. Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
    Author: Dude
    Version: D
    Last modified: 14-Jan-2012
    You are welcome to add comments, but please do not discuss your installation issues in this thread.  If you have a question about the instructions, please add a simple note to the link of your own thread. The instructions are the result of my own research and development. If you would like to use any of the information for your own blog or website, please include a link to this reference to include future changes.
    Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
    h2. Purpose
    This document outlines instructions how to install Oracle XE under Ubuntu 11.10.
    Ubuntu or Debian based Linux is not on the list of supported operation systems according to the Oracle documentation at http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm. You may want to consider virtualization software like Oracle Virtualbox and install Oracle Enterprise Linux as a free and professional alternative to installing XE under Ubuntu. You can also download pre-build virtual machines that include Oracle XE. You can browse http://otn.oracle.com/community/developer-vm for more information.
    h2. Topics
    h4. 1) Install Linux Ubuntu
    h4. 2) Remote Terminal
    h4. 3) Install Additional Software
    h4. 4) Managing Swap Space
    h4. 5) Modify Kernel Parameters
    h4. 6) Oracle Home Directory
    ...a) Resize the Root Partition
    ...b) Setup External Storage
    h4. 7) ORA-00845: MEMORY_TARGET
    h4. 8) Installing Oracle 11gR2 Express Edition
    h4. 9) Post-Installation
    h4. 10) Tips and Troubleshooting
    ...a) Port 1521 appears to be in use by another application
    ...b) cannot touch `/var/lock/subsys/listener': No such file or directory
    ...c) ORA-00845: MEMORY_TARGET
    ...d) Apex ADMIN password
    ...e) SYS and SYSTEM password
    ...f) Uninstall Oracle 11g XE
    ...g) Reconfigure Oracle 11g XE
    ...h) Gnome Classic desktop
    ...i) Unix vi cursor keys
    ...j) Backup Database
    h4. 11) History
    h4. 12) References
    h2. 1) Install Linux Ubuntu
    The following assumes you have installed Ubuntu 11.10 Desktop Edition for AMD 64-bit, or upgraded from a previous version. Keep in mind that Oracle 11gR2 Express Edition is only available for 64-bit architecture. It is not necessarily a requirement, but I would not bother to install Oracle 11gR2 XE on a system with less than 2 GB of RAM installed. You can download Ubuntu for free at: http://www.ubuntu.com/download/ubuntu and install it using the default settings provided.
    You can apply the latest OS patch-sets by clicking the power button icon in the upper right hand corner of the screen and selecting "Updates available..."
    h2. 2) Remote Terminal
    You will need command line access to perform the installation tasks. Select the top "Dash Home" button of the Unity toolbar and enter the word "terminal", or use CTRL-ALT-t. If you prefer to open a remote terminal session use SSH. Ubuntu does not come with a secure shell login by default. To install it, use the following command:
    sudo apt-get install openssh-serverYou cannot login as root unless you set a root password using the "sudo passwd root" command. However, you can get root user access using the "sudo" command, which requires only to re-enter the password of your personal account. Access to "sudo" is controlled by the /etc/sudoers file.
    The best way to establish a remote command line session as root is to login with your personal account, e.g.: ssh [email protected], and then type "sudo su -" to become root, or use "sudo <command>" to execute individual commands. If your account does not have "sudo" access you can login as root using "su - root", but will need to know the root password.
    h2. 3) Install Additional Software
    Oracle 11g Express Edition requires additional software that is not installed by default:
    sudo apt-get install alien libaio1 unixodbch2. 4) Managing Swap Space
    Oracle demands that the minimum swap space for Oracle Database XE is 2 GB (2095100 KB) or twice the size of RAM, whichever is lesser. Enter the following shell command to verify your swap space:
    cat /proc/meminfo | grep -i swap
    SwapCached:            0 kB
    SwapTotal:       2095100 kB
    SwapFree:        2095100 kBYou can increase available swap space by using a swap file as long as disk space permits. The advantage of a swap file versus a swap partition is flexible space management because you can add or delete swap space on demand as necessary. The following will create and enable an additional 1 GB swap file at system startup, located in the /home directory:
    Login as root:
    sudo su -Enter the following commands:
    dd if=/dev/zero of=/home/swapfile bs=1024 count=1048576
    mkswap /home/swapfile
    swapon /home/swapfile
    swapon -aCreate a backup of the original "fstab" file and add the new swap file:
    cp /etc/fstab /etc/fstab.backup_`date +%N`
    echo '/home/swapfile swap swap defaults 0 0' >> /etc/fstabExit from root and verify the new swap space:
    exit
    swapon -s
    Filename                    Type          Size     Used     Priority
    /dev/sda5                               partition     2095100     0     -1
    /home/swapfile                          file          1048572     0     -2Swap space is not a substitute for installed RAM. Swap space is a safeguard that allows the system to move idle processes to disk before the OOM killer will begin to terminate processes in order to free up enough real memory to keep the system operational. The general rule for sizing the swap space depends on the size of installed RAM. If your system has less then 4 GB of RAM the swap space should usually be at least twice this size. If you have more than 8 GB of RAM installed you may consider to use an equal size as swap space. The more RAM you have installed, the less likely you are going to run into memory starvation, and the less likely you are going to need swap space, unless you have a bad process.
    h2. 5) Modify Kernel Parameters
    Oracle 11gR2 Express Edition requires the following Kernel parameters. Enter the commands exactly as shown:
    Login as root:
    sudo su -Cut & paste the following directly into a command shell (not a text editor):
    cat > /etc/sysctl.d/60-oracle.conf <<-EOF
    # Oracle 11g XE kernel parameters
    fs.file-max=6815744
    net.ipv4.ip_local_port_range=9000 65500
    kernel.sem=250 32000 100 128
    # kernel.shmmax=429496729
    kernel.shmmax=107374183
    EOFLoad and verify the new kernel parameters:
    service procps start
    sudo sysctl -q fs.file-max
    sudo sysctl -q kernel.shmmax
    sudo sysctl -q net.ipv4.ip_local_port_range
    sudo sysctl -q kernel.sem The SHMMAX kernel parameter defines the upper memory limit of a process. It is a safeguard to stop a bad process from using all memory and causing RAM starvation. The Linux default is 32 MB. The official Oracle XE installation documentation suggests a value of 4 GB -1 bytes (429496729). Since Oracle 11g XE has a 1 GB memory limit, a smaller footprint will be a better safeguard for the complete system. Setting the SHMMAX parameter to 107374183 will be sufficient.
    h2. 6) Oracle Home Directory
    At the time of this writing, Enterprise Linux 6 is not supported for Oracle database yet. It is therefore not possible to confirm Oracle ext4 filesystem compatibility, which is default in Ubuntu 11. According to various information, ext4 may cause a performance problem for Oracle 11g database. The following will show you how to add a ext3 partition to your existing setup.
    h3. 6.a) Resize the Root Partition
    Provided you have sufficient free disk space, you should be able to resize the root partition to create an extra ext3 filesystem. Considering the 11 GB user datafile limit of the Express Edition, 18 GB should be more than enough.
    You can use the free Gparted Live CD to shrink your startup volume. Gparted downloads are available at http://sourceforge.net/projects/gparted/files/gparted-live-stable. When burning the CD, pay attention to burn the raw .iso image and not the possibly "mounted" image. If you are using a virtual machine like Oracle Virtualbox, you can mount the .iso image directly. There are going to be a few prompts when the system starts from the CD, but you can press Return to accept the defaults.
    When the Gparted window appears:
    - Select your ext4 root partition, usually /dev/sda1
    - Select the "Resize/Move" button from the toolbar.
    - Enter 18000 into the "Free space following" field and press the Return key.
      Be careful not not change the start of the partition!
    - Click the "Resize/Move" of the dialog and then then the "Apply" toolbar button.
      The process may take several minutes - do not abandon it!
    - Select the new unallocated free space of ~ 18 GB and push the "New" button.
    - Set the file system to "ext3" and label it "oraclexe" and click the "Add" button.
      Be sure to label it oraclexe, otherwise the follow-up instructions will fail.
    - Finally select "Apply from the toolbar to apply the changes.
    - Quit "Gparted", select "Exit" from the desktop and choose "Reboot" to restart the system.
    {code}
    After the system has restarted, open a terminal command shell.
    Login as root:
    {code}
    sudo su -
    {code}
    Backup "fstab" and add the UUID of the partition. The "tr" command remove the quotes:
    {code}
    cp /etc/fstab /etc/fstab_`date +%N`
    uuid=`blkid | grep oraclexe | awk '{print $3}'`
    uuid=`echo $uuid | tr -d '\042'`
    echo $uuid
    echo "$uuid  /u01  ext3  errors=remount-ro 0 1" >> /etc/fstab
    {code}
    The UUID is a unique number and should look similar to:
    {code}
    UUID=d1db753e-b5dd-4a4c-a61e-259c69867b58
    {code}
    Restart the system:
    {code}
    reboot
    {code}
    Verify the success:
    {code}
    df -h /u01
    {code}
    h3. 6.b) Setup External Storage
    If you prefer to setup an external drive to install Oracle XE, beware that it can be a fatal mistake to make an entry in /etc/fstab to automount your external storage device.  An unavailable device in /etc/fstab will prevent a system startup and prompt for appropriate actions at the console.
    The following is an example of how to prepare an external storage device to be used for Oracle 11g, including a script to automatically mount an external drive at system startup without the disadvantages of /etc/fstab. The script will also take into consideration that a device name might shift if you attach additional devices.
    To find out which USB devices are connected:
    {code}
    sudo parted -l
    {code}
    Look for the device that matches your USB storage. For example: /dev/sdb1
    {code}
    Model: USB 2.0 Flash Disk (scsi)
    Disk /dev/sdb: 2064MB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Number  Start   End     Size    File system  Name     Flags
    1      20.5kB  1929MB  1929MB  hfs+         mystick
    {code}
    Initialize the device using ext3 filesystem - this will erase all data. The "-c" option will check for bad blocks (read-only), "-L" is the volume label:
    {code}
    sudo umount /dev/sdb1
    sudo mkfs.ext3 -c -L oraclexe /dev/sdb1
    {code}
    Install the pmount distribution package:
    {code}
    sudo apt-get install pmount
    {code}
    Login as root:
    {code}
    sudo su -
    {code}
    Cut & paste the following into the command prompt (not a text editor):
    {code}
    cat > /etc/init.d/oracle-mount <<-EOF
    #! /bin/sh
    # /etc/init.d/oracle-mount
    VOL_UUID=alphanumeric
    VOL_LABEL=oraclexe
    VOL_SYMLINK=/u01
    mount=/usr/bin/pmount
    uuid2dev() {
       VOL_DEVICE="\`blkid | grep \$VOL_UUID | awk '{print \$1}'\`"
       VOL_DEVICE="\`echo \$VOL_DEVICE | tr -d ':'\`"
       echo \$VOL_DEVICE
    case "\$1" in
      start)
        echo "Starting script /etc/init.d/oracle-mount"
        uuid2dev
        \$mount \$VOL_DEVICE \$VOL_LABEL
        if [ -d /media/\$VOL_LABEL ]; then
           echo "Mount \$VOL_DEVICE success"
           ln -sf /media/\$VOL_LABEL \$VOL_SYMLINK
        else
           echo "Error mouting \$VOL_DEVICE"
        fi
      stop)
        echo "Stopping script /etc/init.d/oracle-mount"
        uuid2dev
        /bin/umount \$VOL_DEVICE 2>/dev/null
        if [ "\`/usr/bin/pmount | /bin/grep \$VOL_DEVICE\`" ]; then
           echo "Error unmounting \$VOL_DEVICE"
        else
           rm -f \$VOL_SYMLINK
        fi
        echo "Usage: /etc/init.d/oracle-u01 {start|stop}"
        exit 1
    esac
    ### BEGIN INIT INFO
    # Provides:          oracle-mount
    # Required-Start:    \$remote_fs \$syslog
    # Required-Stop:     \$remote_fs \$syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Start daemon at boot time
    # Description:       Mount hotplug-usb drive and create symlink
    ### END INIT INFO
    EOF
    {code}
    Install the oracle-mount init script:
    {code}
    chmod 755 /etc/init.d/oracle-mount
    update-rc.d oracle-mount defaults 01 99
    {code}
    Get the UUID of the volume "oraclexe" and update the VOL_UUID in the init script accordingly:
    {code}
    uuid=`blkid | grep oraclexe | awk '{print $3}'`
    echo $uuid
    sed -i "s/^VOL_UUID=.*/VOL_$uuid/g" /etc/init.d/oracle-mount
    {code}
    The UUID of your device will be a unique number, but should be similar to:
    {code}
    UUID="3f5e9963-b328-49f3-b3e8-a3561ae34106"
    {code}
    Logout of root and test the init script:
    {code}
    exit
    sudo /etc/init.d/oracle-mount stop
    ls /u01
    sudo /etc/init.d/oracle-mount start
    ls /u01
    {code}
    Your output should look like:
    {code}
    Stopping script /etc/init.d/oracle-mount
    /dev/sdb1
    ls: cannot access /u01: No such file or directory
    Starting script /etc/init.d/oracle-mount
    /dev/sdb1
    Mount /dev/sdb1 success
    lost+found
    {code}
    h2. 7) ORA-00845: MEMORY_TARGET
    Oracle 11gR2 XE under Ubuntu 11.10 will result in "ORA-00845: MEMORY_TARGET not support on this system" either at Oracle database startup or during the initial installation. Ubuntu 11.10 uses a new version of the "systemd" system and session manager and has migrated away from /dev/shm and other common directories in favor of /run.
    There are several ways how to address the problem. You can either enable /dev/shm shared memory, or change the default memory management of Oracle 11g from AMM (Automatic Memory Management) to ASMM (Automatic Shared Memory Management) as it was in used the previous 10g version. Since AMM is one of the new features of 11g, the following will show you how to make to make AMM work.
    Login as root:
    {code}
    sudo su -
    {code}
    Cut & paste the following into the command prompt (not a text editor):
    {code}
    cat > /etc/init.d/oracle-shm <<-EOF
    #! /bin/sh
    # /etc/init.d/oracle-shm
    case "\$1" in
      start)
        echo "Starting script /etc/init.d/oracle-shm"
        # Run only once at system startup
        if [ -e /dev/shm/.oracle-shm ]; then
          echo "/dev/shm is already mounted, nothing to do"
        else
          rm -f /dev/shm
          mkdir /dev/shm
          mount -B /run/shm /dev/shm
          touch /dev/shm/.oracle-shm
        fi
      stop)
        echo "Stopping script /etc/init.d/oracle-shm"
        echo "Nothing to do"
        echo "Usage: /etc/init.d/oracle-shm {start|stop}"
        exit 1
    esac
    ### BEGIN INIT INFO
    # Provides:          oracle-shm
    # Required-Start:    $remote_fs $syslog
    # Required-Stop:     $remote_fs $syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Bind /run/shm to /dev/shm at system startup.
    # Description:       Fix to allow Oracle 11g use AMM.
    ### END INIT INFO
    EOF
    {code}
    Install the oracle-shm init script:
    {code}
    chmod 755 /etc/init.d/oracle-shm
    update-rc.d oracle-shm defaults 01 99
    {code}
    Restart the system:
    {code}
    reboot
    {code}
    Verify the success:
    {code}
    sudo cat /etc/mtab | grep shm
    {code}
    {code}
    none /run/shm tmpfs rw,nosuid,nodev 0 0
    /run/shm /dev/shm none rw,bind 0 0
    {code}
    The upper limit of shared memory under Linux is set to 50 % of the installed RAM by default. If your system has less than 2 GB of RAM installed, there is still a chance to run into ORA-00845 error if your shared memory is used by other software.
    The verify available shared memory, type the following commands:
    {code}
    sudo df -h /run/shm
    {code}
    h2. 8) Installing Oracle 11gR2 Express Edition
    The final release version of Oracle 11gR2 Express Edition can be downloaded for free at http://otn.oracle.com/database/express-edition/downloads. The software should automatically downloaded into the "Downloads" folder of your home directory.
    Enter the following commands to unpack the installer:
    {code}
    cd ~/Downloads
    unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
    rm oracle-xe-11.2.0-1.0.x86_64.rpm.zip
    {code}
    The Debian Linux based package management of Ubuntu is not compatible with the Red Hat package manager. The Oracle installer needs to be converted using the following commands:
    {code}
    cd ~/Downloads/Disk1
    sudo alien --to-deb --scripts oracle-xe-11.2.0-1.0.x86_64.rpm
    (This may take a few minutes)
    rm oracle-xe-11.2.0-1.0.x86_64.rpm
    {code}
    The following needs to be set for compatibility:
    {code}
    sudo ln -s /usr/bin/awk /bin/awk
    sudo mkdir /var/lock/subsys
    {code}
    Ubuntu uses different tools to manage services and system startup scripts. The "chkconfig" tool required by the Oracle installer is not available in Ubuntu. The following will create a file to simulate the "chkconfig" tool.
    Login as root:
    {code}
    sudo su -
    {code}
    Copy & paste the following *directly* into the command prompt to create a file:
    {code}
    cat > /sbin/chkconfig <<-EOF
    #!/bin/bash
    # Oracle 11gR2 XE installer chkconfig hack for Debian based Linux (by dude)
    # Only run once.
    echo "Simulating /sbin/chkconfig..."
    if [[ ! \`tail -n1 /etc/init.d/oracle-xe | grep INIT\` ]]; then
    cat >> /etc/init.d/oracle-xe <<-EOM
    ### BEGIN INIT INFO
    # Provides:                  OracleXE
    # Required-Start:        \\\$remote_fs \\\$syslog
    # Required-Stop:        \\\$remote_fs \\\$syslog
    # Default-Start:            2 3 4 5
    # Default-Stop:            0 1 6
    # Short-Description:   Oracle 11g Express Edition
    ### END INIT INFO
    EOM
    fi
    update-rc.d oracle-xe defaults 80 01
    EOF
    {code}
    Exit root:
    {code}
    exit
    {code}
    Set execute privileges:
    {code}
    sudo chmod 755 /sbin/chkconfig
    {code}
    Install Oracle 11gR2 Express Edition entering the following commands:
    {code}
    cd ~/Downloads/Disk1
    sudo dpkg --install ./oracle-xe_11.2.0-2_amd64.deb
    (This may take a couple of minutes)
    {code}
    Run the configuration script to create (clone) the database and follow the screen. Accept the default answers, including "y" to startup the database automatically, or modify as required.
    {code}
    sudo /etc/init.d/oracle-xe configure
    (This can take a few minutes - the installation completed successfully.)
    {code}
    To verify success, the procedure should end showing:
    {code}
    Starting Oracle Net Listener...Done
    Configuring database...Done
    Starting Oracle Database 11g Express Edition instance...Done
    Installation completed successfully.
    {code}
    Set a password for the Oracle account:
    {code}
    sudo passwd oracle
    {code}
    h2. 9) Post-Installation
    In order to use sqlplus and other tools, the Oracle account requires specific environment variables. The following will set these variables automatically at every Oracle login:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Copy the default account skeleton files and add the Oracle env script to .profile:
    {code}
    cp /etc/skel/.bash_logout ./
    cp /etc/skel/.bashrc ./
    cp /etc/skel/.profile ./
    echo "" >>./.profile
    echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >>./.profile
    {code}
    By default, the Oracle Database XE graphical user interface is only available at the local server, but not remotely. The following will enable remote logins:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and execute the following:
    {code}
    sqlplus / as sysdba
    SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
    exit
    {code}
    See http://download.oracle.com/docs/cd/E17781_01/admin.112/e18585/toc.htm for more information.
    h3. a) Unity desktop configurations
    The Oracle XE menu under the previous Gnome Classic desktop shows several useful scripts to backup the database, start and stop the database, etc. Under the Unity based desktop this menu is not available. You can either switch to the Gnome Classic desktop as outlined in chapter 2, or perform the following steps to modify and copy the scripts as outlined below. The start and stop database scripts will also be modified to perform a progress feedback.
    Login as user root:
    {code}
    sudo su -
    {code}
    Convert desktop files:
    {code}
    cd /usr/share/applications
    sed -i 's/Categories.*/Categories=Database;Office;Development;/g' oraclexe*
    sed -i 's/MultipleArgs/X-MultipleArgs/g' oraclexe*
    sed -i 's/MimeType.*/MimeType=application\/x-database/g' oraclexe*
    sed -i 's/.png//g' oraclexe*
    sed -i 's/Terminal=false/Terminal=true/g' oraclexe-startdb.desktop
    sed -i 's/Terminal=false/Terminal=true/g' oraclexe-stopdb.desktop
    {code}
    Exit root:
    {code}
    exit
    {code}
    Login as user Oracle:
    {code}
    su - oracle
    {code}
    Modify database start and stop scripts:
    {code}
    cd /u01/app/oracle/product/11.2.0/xe/config/scripts
    cp startdb.sh start.sh_orig
    cp stopdb.sh stopdb.sh_orig
    sed -i 's/>.*//g' startdb.sh
    sed -i 's/>.*//g' stopdb.sh
    {code}
    You will need SYSDBA privileges and set Oracle environment variables in order to use your regular user account.
    Login to your regular user account:
    {code}
    su - dude
    {code}
    Enter the folowing command:
    {code}
    sudo usermod -a -G dba dude
    {code}
    Then update your profile to automatically set the necessary Oracle environment variables:
    {code}
    echo "" >>./.profile
    echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >>./.profile
    {code}
    Update your Desktop folder to contain useful Oracle XE scripts:
    {code}
    cp /usr/share/applications/oraclexe* ~/Desktop
    chmod 750 ~/Desktop/oraclexe*
    {code}
    To verify success re-login and try "sqlplus":
    {code}
    su - oracle
    sqlplus / as sysdba
    {code}
    h2. 10) Tips and Troubleshooting
    h3. 10. a) Port 1521 appears to be in use by another application
    Error: Port 1521 appears to be in use by another application. Specify a different port.This error happens after a previously unsuccessful configuration attempt using /etc/init.d/oracle-xe configure script. The script was able to start the Listener process, but most likely failed to continue  to clone the database, e.g. ORA-00845. The following should correct the problem:
    Determine the oracle listener process that is already running:
    {code}
    $ ps -ef | grep oracle
    {code}
    Your output should be similar to:
    {code}
    oracle   19789     1  0 19:46 ?        00:00:00 /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr
    {code}
    Then kill the process, using the appropriate process id, for instance:
    {code}
    $ sudo kill -9 19789
    {code}
    h3. 10.b) cannot touch `/var/lock/subsys/listener': No such file or directory
    Starting Oracle Net Listener...touch: cannot touch `/var/lock/subsys/listener': No such file or directoryThis error occurs when you run /etc/init.d/oracle-xe configure, but failed the preinstallation step to create the /var//lock/subsys directory as outlined in chapter 8.
    h3. 10.c) ORA-00845: MEMORY_TARGET
    ORA-00845: MEMORY_TARGET not supported on this system See chapter 7 to enable /dev/shm and verify free space available in /run/shm
    h3. 10.d) Apex ADMIN password
    According to the Oracle documentation, the password for the INTERNAL and ADMIN Oracle Application Express user accounts is initially the same as the SYS and SYSTEM administrative user accounts. Well, I tried several times without success. To reset the Apex Admin password:
    Login as user oracle:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and type the following:
    {code}
    sqlplus / as sysdba
    {code}
    At the SQL prompt, type the following to be prompted to change the password:
    {code}
    SQL> @?/apex/apxxepwd.sql
    exit
    {code}
    When done, open your browser and go to http://127.0.0.1:8080/apex
    Workspace: Internal
    Username: ADMIN
    Password: password you set with apxxepwd.sql
    I will prompt you to reset the password:
    old password: password you set with apxxepwd.sql
    new password: final_password
    You can also login as the Apex Admin using http://127.0.0.1:8080/apex/apex_admin
    h3. 10.e) SYS and SYSTEM password
    Use the following commands to reset the SYS and SYSTEM passwords if necessary:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and type the following at the SQL prompt:
    {code}
    sqlplus / as sysdba
    SQL> alter user sys identified by "password" account unlock;
    SQL> alter user system identified by "password" account unlock;
    SQL> exit
    {code}
    h3. 10.f) Uninstall Oracle 11g XE
    The following will completely uninstall and remove Oracle 11g XE:
    Open a terminal seesion and login as user root:
    {code}
    sudo su -
    {code}
    Enter the following:
    {code}
    /etc/init.d/oracle-xe stop
    dpkg --purge oracle-xe
    rm -r /u01/app
    rm /etc/default/oracle-xe
    update-rc.d -f oracle-xe remove
    update-rc.d -f oracle-mount remove
    update-rc.d -f oracle-shm remove
    {code}
    h3. 10.g) Reconfigure Oracle 11g XE
    Type the following commands in a terminal window:
    {code}
    sudo /etc/init.d/oracle-xe stop
    sudo rm /etc/default/oracle-xe
    sudo /etc/init.d/oracle-xe configure
    {code}
    h3. 10.h) Gnome Classic desktop
    Ubuntu 11 moved from the Gnome Classic desktop to Unity and removed the "Ubuntu Classic" login option. Unity was designed to make more efficient use of space given a limited screen size and touch screens. If you prefer to use the Gnome Classic desktop, enter the following into a terminal window:
    {code}
    sudo apt-get install gnome-panel
    {code}
    To log into the Gnome Classic desktop, select the "Gearwheel" at the login screen and select "Gnome Classic".
    h3. 10.i) Unix vi cursor keys
    The instructions in this tutorial do not require the use of any text editor. However, if you would like use the backspace and cursor keys in the "vi-editor", the following needs to be installed:
    {code}
    sudo apt-get install vim
    {code}
    h3. 10.j) Backup Database
    In order to perform an online database backup using the supplied "Backup Database" script, the database needs to run in Archive-Log mode. This can be setup using the following commands:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and type the following:
    {code}
    sqlplus / as sysdba
    SQL> shutdown immediate
    SQL> startup mount
    SQL> alter database archivelog;
    SQL> alter database open;
    SQL> exit
    {code}
    h2. 11) History
    Version: A, 24-Oct-2011
    - first release
    Version: B, 25-Oct-2011
    - reduced instructions.
    - corrected errors in 6a and 8.
    - new strategy addressing ORA-00845 error.
    - rework of chapter 10.
    Version: C, 30-Nov-2011
    - corrected typo in 6a
    - new procedures in 9a.
    - added progress feedback to database scripts.
    Version D, 14-Jan-2012
    - corrected presentation errors.
    - reorganized instructions.
    h3. 12) References
    http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm
    http://askubuntu.com/questions/57297/why-has-var-run-been-migrated-to-run
    http://lwn.net/Articles/436012/
    https://forums.oracle.com/forums/thread.jspa?threadID=2300750&tstart=0
    Kind regards and best of luck!
    Dude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Excellent Blog. Thank You
    Small clarification on Step **6) Oracle Home Directory, ...a) Resize the Root Partition**
    Ubuntu 11.10 has Gparted available as a Ubuntu software download, DONT use that while trying the above step, instead download the ISO file from http://sourceforge.net/projects/gparted/files/gparted-live-stable/ gparted-live-0.12.0-5.iso (124.6 MB)
    Burn that ISO file on a Blank DVD, reboot the Ubuntu , during startup select Boot from DVD Option if not already selected. this will take to Boot Menu Options of Gparted Live then select the first menu option, and this allows to do further action such as Re-sizing .
    and once you have chosen and executed step a) . do NOT run step b) also that is "Setup External Storage"
    I hope this minor clarification can avoid some confusion
    Regards
    Madhusudhan Rao
    Edited by: MadhusudhanRao on Mar 24, 2012 11:30 PM

  • Error message with install of Oracle 9.2 on Mandrake Linux 9.0

    Hi,
    I hope somebody can help with this. I'm getting an error message during the installation for oracle 9.2 on mandrake linux 9. An error get thrown saying the IP address of a host cannot be determined.
    Here is what is in the log:
    *** Database Configuration Page***
    TitleLabel = Database Configuration
    Prompt = Select a database suited to your needs.
    ConfigList = General Purpose,Installs a pre-configured database optimized for general purpose usage,Transaction Processing,Installs a pre-configured database optimized for transaction processing,Data Warehouse,Installs a pre-configured database optimized for data warehousing,Customized,Allows you to create a customized database. This option takes longer than the pre-configured options,Software Only,Installs software only and does not create a database at this time,
    Selection = s_cfgtyperet = General Purpose
    Setting value of s_dbcaProgressOnly to -progress_only
    Setting value of b_autoStartApache to true
    Setting value of b_launchNETCA to true
    Calling query netQueries2.2.0.7.0 getHostIPAddress
    Query Exception: UnknownHostException
    Query Exception Class: class oracle.sysman.oii.oiil.OiilQueryException
    Anyone know how to resolve this error and whether or not it is very critical to the oracle installation?
    Cheers
    Johnny

    Hi johnny,
    You should first check the hosts file to see if the correct hostname and the IP address are shown. You can also check if the "hostname" command returns the correct result. If everything looks good so far, then next check if command "nslookup" returns the correct IP address. If the nslookup <hostname> command returns error, you will need to talk to the Domain Name Server (DNS) administrator to correct this network configuration problem.
    Yogi

  • Install oracle 8.1.7 on linux 9.0

    I want to install oracle 8.1.7 on linux 9.0,but where I run ./Disk1/runInstaller,show a error like 'symbol errno,version GLIBC_2.0 not defined in file libc.so.6 where link time reference (libzip.so)
    Unable to initialize threads:cannot find class java/lang/Thread
    Could not create Java VM'
    use rpm ,I discover my glibc's version is:glibc-2.3.2-11.9
    Who can help me?
    thank you.

    I have seen this before.
    Quick Fix:
    The problem with files still named xxxxxO is caused by the install. Sometimes it
    works to just copy the file in this case:
    $cp lsnrctlO lsnrctl
    There are probably other files that were not renamed by the install:
    Finally, the listener can run! yipee.. :)
    It failed to run because there're some file 'missing'.
    I told u before, lsnrctl didn't exist in my box. Well, I found that not only lnsrctl.
    There're three more files needed to be renamed. So, total in the list are
    dbsnmp, lsnrctl, tnslsnr, and oratclsh.
    All of them still have their odd xxxxO name (I should have known it from
    the start).
    Once I copied all the file to their 'proper' name, the listener can start
    successfully. (Though i think the listener need only lsnrctl and tnslsnr,
    i still renamed them all).
    But I wonder, why does the installer not rename those files?
    I found that those file were created normally during installation, until
    i run setup_stubs.sh.
    Is there any bug on setup_stubs.sh? Why you didn't experience it as I did?
    However, the most important things is, the database running well :)

  • Oracle 8.1.7 on Linux 7

    Hi,
    Is it possible to install Oracle 8.1.7 on Linux 7.0? I know it wasnt possible a while ago with 8.1.6.
    Thanks in advance for your help!!!
    Mike

    Regarding to the solution from John Smiley
    the problem has been fixed now.
    I have received so many emails lately that I thought it would help to re-post this under a different topic to make it easier to find.
    If you're having trouble with Oracle 8.1.x on any version of Linux that uses glibc version 2.2, try this and see if it solves your problem:
    The problem is that Oracle 8.1.x needs glibc 2.1.3. It will link without error with glibc 2.2, but when you try to run dbassist or create a database from scratch, there are problems (dbassist hangs, "End of file on communication channel", etc.)
    Here is a step-by-step process for getting Oracle 8.1.6 or 8.1.7 working on systems with glibc 2.2 (don't bother with 8.1.5 if you can help it):
    1. Install the compat-glibc RPM for 2.1.3.x
    2. cd to the directory where compat-glibc installed the files (for me it's /usr/i386-glibc21-linux/lib).
    3. Copy the following files to $ORACLE_HOME/lib:
    libc-2.1.3.so
    libpthread.so
    libdl.so
    ld-linux.so.2
    For me, several of these are symbolic links, so you'll need to copy the target of the symbolic link and rename it to the link name when you copy it to $ORACLE_HOME/lib.
    For example, if ls -l shows:
    ld-linux.so.2 -> ld-2.1.3.so
    libc-2.1.3.so
    libdl.so -> libdl.so.2
    libpthread.so -> libpthread.so.0
    Then you will:
    cp ld-2.1.3.so $ORACLE_HOME/lib/ld-linux.so.2
    cp libc-2.1.3.so $ORACLE_HOME/lib
    cp libdl.so.2 $ORACLE_HOME/lib/libdl.so
    cp libpthread.so.0 $ORACLE_HOME/lib/libpthread.so
    4. Create a file in $ORACLE_HOME/lib called libc.so with the following contents (as a single line):
    GROUP ( <OH>/lib/libc-2.1.3.so <OH>/lib/ld-linux.so.2 <CL>/libc_nonshared.a )
    Substitute the value of $ORACLE_HOME for <OH> and the location of the compat-glibc directory for <CL>. For example:
    My $ORACLE_HOME is:
    /u01/app/oracle/product/8.1.7
    (Notice the use of the OFA standard? Do yourself and others a favor - follow the standard. If you don't know what OFA is, please see the Oracle Administrator's Guide for UNIX.)
    and my compat-glibc directory is:
    /usr/i386-glibc21-linux/lib
    so the GROUP line looks like this for me:
    GROUP (/u01/app/oracle/product/8.1.7/lib/libc-2.1.3.so /u01/app/oracle/product/8.1.7/lib/ld-linux.so.2 /usr/i386-glibc21-linux/lib/libc_nonshared.a)
    This is all one line.
    5. cd $ORACLE_HOME/bin
    6. Run the following command from the UNIX prompt:
    relink all
    All of the Oracle software, including the assitants, will work fine now.
    I have used this technique for RedHat 7.0 with the 2.2.16 kernel, as well as the 2.4.0 and 2.4.1-pre11 kernels.
    Thanks to Richard Rankin for this simple and reliable method (there are others, but they are not as clean).
    John Smiley
    Sr. Oracle DBA
    Lucent Technologies, Inc.
    null

  • Oracle 8.1.7 and Linux 6.2

    Hi
    Please help us in solving the below mentioned problem.
    We are trying to install Oracle 8.1.7 under Linux 6.2 . During the installation the following error displays and could not able to finish the instllation. The problem is
    Error in invoking target ntcontab.o of makefile /usr/local/u01/app/oracle/product/8.1.7/network/lib/ins_net_client.mk
    If any has a soln for this please reply to us. Thanks in advance
    regards
    Santhosh
    null

    Does this problem occurs during installation when the DBASSIST is creating a DB for you?
    If so, just cancel it for the moment, let the installation process proceed with the Net8 configuration where it will startup the Oracle listener. Then after, click on the DB creation and restart the DB creation process. I account this b4.
    Hope this helps.

  • Error during installation of oracle 8.1.7 on Linux 7.2

    hello folks,
    i am having a problem in installing oracle 8.1.7 on linux 7.2 redhat.
    i fulfill all the pre-installation requirements,,then started installation,,
    before executing "runInstaller",i have to use the command:
    $ export LD_ASSUME_KERNEL=2.2.5
    (if i dont give this command,the "runInstaller" halts.).
    now installation starts,during Linking Oracle8i Enterprise Edition segment,,at 62 or 64%,,it start
    generating errors like:
    Error in invoking target relink of makefile
    /dba01/app/oracle/product/8.1.7/precomp/lib/ins_precomp.mk
    no effect on retry,just ignore ignore and ignore all the rest part,,
    i have read a nearly similar type of problem yesterday in this forum where author suggested
    to change LD_SELF_CONTAINED in ORACLE_HOME/bin/genclntsh and then run "genclntsh",,but he did'nt
    mentioned what change should we do??
    plz help me to wriggle out from this stuff.
    thanx
    regards

    hello folks,
    i am having a problem in installing oracle 8.1.7 on linux 7.2 redhat.[...snip...]
    now installation starts,during Linking Oracle8i Enterprise Edition segment,,at 62 or 64%,,it start
    generating errors like:
    Error in invoking target relink of makefile
    /dba01/app/oracle/product/8.1.7/precomp/lib/ins_precomp.mk
    no effect on retry,just ignore ignore and ignore all the rest part,,
    i have read a nearly similar type of problem yesterday in this forum where author suggested
    to change LD_SELF_CONTAINED in ORACLE_HOME/bin/genclntsh and then run "genclntsh",,but he did'nt
    mentioned what change should we do??http://www.puschitz.com/OracleOnLinux.shtml
    From the above guide:
    Edit the file $ORACLE_HOME/bin/genclntsh and change the following line (people have sent me emails pointing out that this also works for Mandrake 8.1 and Mandrake 8.2):
    LD_SELF_CONTAINED="-z defs"
    to read:
    LD_SELF_CONTAINED=""
    Then run the script $ORACLE_HOME/bin/genclntsh as the user "oracle" and not as the user "root". Also make sure you have all the Oracle environments set! (I got so many emails because people were not doing this)
    $ su - oracle
    $ $ORACLE_HOME/bin/genclntsh
    Created /opt/oracle/product/9.0.1/lib/libclntst9.a
    $
    Also another 'jewel'http://staff.in2.hr/denis/oracle/index.html
    Regards,
    Pedro

  • Oracle 8.1.7 on linux. plslq block not compiled

    I created table test
    create test (a varchar2(100),b varchar2(100));
    I send query:
    delete from test
    where (a, b) in (('Z','V'),('X', 'C'),('S', 'P'),('D', 'Y'));
    All ok;
    I send pl/sql block:
    begin
    delete from test
    where (a, b) in (('Z','V'),('X','C'),('S', 'P'),('D', 'Y'));
    end;
    Server proccess associated with my session using 100% of CPU and 10 min later
    my client receive error ORA-04031:
    begin
    ERROR at line 1:
    ORA-04031: unable to allocate 1024 bytes of shared memory ("shared pool","begin
    delete from test
    w...","PL/SQL DIANA","PAR.C:parchk:page")
    When I send:
    begin
    delete from test
    where (a, b) in (('Z','V'),('X','C'),('S', 'P'));
    end;
    all ok
    What is the reason?
    null

    I think that the problem is not in size of shared_pool. I changed this parameters but it is not help me. I tested this pl/sql block on such computer with such parameters of kernel and oracle but version of oracle was 8.1.6 - all ok.
    I solved this problem by using another pl/sql block:
    begin
    delete from test
    where (a, b) in (('Z','V'),('X','C'),('S', 'P'));
    delete from test
    where (a, b) in (('D', 'Y'));
    end;
    And that is why I have a question: Is it Oracle(8.1.7 on Linux) bag or not?
    null

  • Oracle 8.1.7 for Linux

    Anyone know when Oracle 8.1.7 for Linux will be available for download or if it will fix the incompatibility problems with Red Hat 7?
    Philip Ross

    Anyone know when Oracle 8.1.7 for Linux will be available for download or if it will fix the incompatibility problems with Red Hat 7?
    Philip Ross

Maybe you are looking for

  • Can U set breakpoint within a batch job and look at variables?

    Hello friends, I am trying to solve a problem that occurs within a program / transaction which can only be executed in background. The transaction in question is FPCOPARA and apparently this program cannot be executed in foreground. If I understand w

  • Using BlueTooth Joystick from PS3?

    Hello, I'm porting a game from web to mobile. I ant to be able to let the user use a joystick if they have one. Anyone know where I can find how to get bluetooth joysticks working with mobile? ,Jim

  • Uxwdog:  Poll Failed messages in syslog

    Hello, I'm running iPlanet 6.0 service pack 5 on HPUX 11i. I'm seeing the following in the syslog: Sep 10 08:47:10 cosmoweb2 uxwdog[26300]: Poll failed: nmsgs=-216, errno=216 (Soc ket operation on non-socket) Sep 10 08:47:10 cosmoweb2 above message r

  • Can I am able to cature IP ADDRESS in WEB URL?

    Hi friends, Can i access IP ADDRESS of my pc by abap code.? This ABAP PROGRAM i run by ITS URL. I used below code. Its working in R/3 .I am able to cature IP ADDRESS. But its not working in WEB URL.I am NOT able to cature IP ADDRESS. CALL METHOD cl_g

  • Passing table name to a procedure and then need to open a cursor ..

    Hi All, I have been out of touch in plsql for sometime and need to do something like : passing table name to a procedure while calling(fp_table_old captures this value) and then need to open a cursor for this table in 'for i in (select * from fp_tabl