Re: is it possible to run oracle server as non-root, non-system process?

From: ddf <oratune_at_msn.com>
Date: Tue, 23 Sep 2014 08:54:57 -0700 (PDT)
Message-ID: <0d736052-ceef-4a60-8163-51684f8b9569_at_googlegroups.com>


On Monday, September 22, 2014 5:43:06 PM UTC-6, ted y wrote:
> I'm trying to setup a small oracle server as part of my java junit test process, because the commonly-used hsqldb lacks many oracle features, and it's very hard to mock out all those little operations in my ORM library.
>
>
>
> I downloaded the Oracle package, untarred to local, changed a bunch of settings in the .ora, .sh scripts to point to my local dir.
>
>
>
> I started the server by
>
>
>
> bash -x ./etc/init.d/oracle-xe configure
>
> when it tries to run the startdb.sql , it gave me some errors:
>
>
>
> /home/myuser/oracle/install//u01/app/oracle/product/11.2.0/xe/bin/sqlplus -s /nolog _at_/home/myuser/oracle/install//u01/app/oracle/product/11.2.0/xe/config/scripts/startdb.sql
>
> ERROR:
>
> ORA-01031: insufficient privileges
>
> if I run as root, this step gave errors:
>

You are not supposed to install or run the Oracle database as 'root'. There should be an 'oracle' account used to install, and run, the database. You need to login as the 'oracle' user, run the installer, install the software then use 'root' ONLY when requested to run any root.sh scripts. Oracle never runs as 'root'.

>
>
> ERROR:
>
> ORA-12162: TNS:net service name is incorrectly specified
>
> my listener.ora is:
>
>
>
> _at_devbox-114942 install]$ cat ./u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
>
> # listener.ora Network Configuration File:
>
>
>
> SID_LIST_LISTENER =
>
> (SID_LIST =
>
> (SID_DESC =
>
> (SID_NAME = PLSExtProc)
>
> (ORACLE_HOME = /home/myuser/oracle/install/u01/app/oracle/product/11.2.0/xe)
>
> (PROGRAM = extproc)
>
> )
>
> )
>
>
>
> LISTENER =
>
> (DESCRIPTION_LIST =
>
> (DESCRIPTION =
>
> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
>
> (ADDRESS = (PROTOCOL = TCP)(HOST = devbox-114942)(PORT = 1521))
>
> )
>
> )
>
>
>
> DEFAULT_SERVICE_LISTENER = (XE)
>
>
>
> TRACE_LEVEL_LISTENER = SUPPORT
>

The problem isn't the listener.ora, it's not setting ORACLE_SID correctly. Oracle is looking for the ORACLE_SID so it can connect to the local database. If your database is named ORCL then the ORACLE_SID will also be ORCL. To set this in your environment (presuming you're running bash or ksh) you need to do this:

export ORACLE_SID=ORCL

After the Oracle software is correctly installed and you set the ORACLE_SID correctly you should not see that error on login to the database.

> overall, I am able to start the listener, and I can see the oradata/ dir generated, and a bunch of trace files generated. but don't see apparently alarming things in the trace file. in fact when I do sqlplus and connect to the listener (?? ) , I don't see any more logging come out in the trace file

You don't connect to the listener with SQL*Plus. The listener is there to provide remote access to the database from application servers and remote desktop or laptop computers. It allows the database server to 'listen' for remote connection requests and service them appropriately.

If you have installed the Oracle software as 'root' you need to uninstall it, as 'root', then use the 'oracle' user account for installation and database creation/management (on the database server). When the software is correctly installed using the correct user account you will see Oracle database processes running, and you will have a running, functional Oracle database.

You need to read here:

http://www.linuxjournal.com/article/3572

to understand how to install the software and how to pre-configure the server to prepare for that installation.

David Fitzjarrell Received on Tue Sep 23 2014 - 17:54:57 CEST

Original text of this message