Thread: Oracle 10g XE environment variables


Permlink Replies: 36 - Pages: 3 [ 1 2 3 | Next ] - Last Post: Jul 24, 2006 7:44 AM Last Post By: Jer
StrayGrey

Posts: 171
Registered: 08/05/05
Oracle 10g XE environment variables
Posted: Jul 18, 2006 9:54 AM
Click to report abuse...   Click to reply to this thread Reply
On my Ubuntu 6.06 system with Oracle 10g XE even though I have run:-
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
which I believe sets environment variables, when I try:-
sqlplus / as sysdba
I get:-
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

What is wrong with this system?
cd_2

Posts: 4,882
Registered: 09/08/98
Re: Oracle 10g XE environment variables
Posted: Jul 18, 2006 9:59 AM   in response to: StrayGrey in response to: StrayGrey
Click to report abuse...   Click to reply to this thread Reply
Try to run it like this:

. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

Note the dot before the command!

C.
StrayGrey

Posts: 171
Registered: 08/05/05
Re: Oracle 10g XE environment variables
Posted: Jul 19, 2006 8:32 AM   in response to: cd_2 in response to: cd_2
Click to report abuse...   Click to reply to this thread Reply
I don't understand why you feel that that may help.
To me ./ means current directory and what we want is not the current directory.
I feel environment variables are the problem or rather the lack of them.
cd_2

Posts: 4,882
Registered: 09/08/98
Re: Oracle 10g XE environment variables
Posted: Jul 19, 2006 8:52 AM   in response to: StrayGrey in response to: StrayGrey
Click to report abuse...   Click to reply to this thread Reply
There is a space between . and / if you look closely. Do me a favor and cut & paste that line and tell me what happened with your environment.

C.
StrayGrey

Posts: 171
Registered: 08/05/05
Re: Oracle 10g XE environment variables
Posted: Jul 19, 2006 9:05 AM   in response to: cd_2 in response to: cd_2
Click to report abuse...   Click to reply to this thread Reply
OK Please explain why that worked. The environment variables seem to be set.
cd_2

Posts: 4,882
Registered: 09/08/98
Re: Oracle 10g XE environment variables
Posted: Jul 19, 2006 9:55 AM   in response to: StrayGrey in response to: StrayGrey
Click to report abuse...   Click to reply to this thread Reply
"." or source (in bash) prevents the executed script from opening a "subshell" and setting the variables in your current context. Without this "trick", your environment would be set in the mentioned "subshell" (or instance) and after the end of the script this shell would be closed and you'll experience the effect as you've seen.

C.
StrayGrey

Posts: 171
Registered: 08/05/05
Re: Oracle 10g XE environment variables
Posted: Jul 19, 2006 10:39 AM   in response to: cd_2 in response to: cd_2
Click to report abuse...   Click to reply to this thread Reply
Thank you. I really did not know that. You are never too old to learn.
StrayGrey

Posts: 171
Registered: 08/05/05
Re: Oracle 10g XE environment variables
Posted: Jul 19, 2006 10:47 PM   in response to: StrayGrey in response to: StrayGrey
Click to report abuse...   Click to reply to this thread Reply
Now when I issue the command:-
sudo /etc/init.d/oracle-xe status
I get:-
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 20-JUL-2006 07:39:50

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER

Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 20-JUL-2006 06:45:22
Uptime 0 days 0 hr. 54 min. 28 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully

Still no apex
sudo netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:1449 0.0.0.0:* LISTEN 4615/xe_d000_XE
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 4457/mysqld
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 4586/tnslsnr
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 5136/cupsd
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 4325/perl
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 4689/master
tcp6 0 0 :::80 :::* LISTEN 4945/apache2
tcp6 0 0 :::22 :::* LISTEN 4726/sshd

but still no port 8080? What do I now need to do to get apex started?
cd_2

Posts: 4,882
Registered: 09/08/98
Re: Oracle 10g XE environment variables
Posted: Jul 19, 2006 11:16 PM   in response to: StrayGrey in response to: StrayGrey
Click to report abuse...   Click to reply to this thread Reply
If you can log into your Oracle Instance, for example with

sqlplus / as sysdba

execute

dbms_xdb.sethttpport(8080);

and take a look at netstat again. There's a XE forum dedicated to this, and I did post a short installation guide for Ubuntu 6.06 LTS here. You may need to register for this forum first.

C.
StrayGrey

Posts: 171
Registered: 08/05/05
Re: Oracle 10g XE environment variables
Posted: Jul 20, 2006 7:11 AM   in response to: cd_2 in response to: cd_2
Click to report abuse...   Click to reply to this thread Reply
oracle@firewall:/home/alf$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 20 16:08:20 2006

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

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL> dbms_xdb.sethttpport(8080)
SP2-0734: unknown command beginning "dbms_xdb.s..." - rest of line ignored.
SQL> dbms_xdb.sethttpport(8080);
SP2-0734: unknown command beginning "dbms_xdb.s..." - rest of line ignored.
SQL>

Now what?

cd_2

Posts: 4,882
Registered: 09/08/98
Re: Oracle 10g XE environment variables
Posted: Jul 20, 2006 7:45 AM   in response to: StrayGrey in response to: StrayGrey
Click to report abuse...   Click to reply to this thread Reply
I wrote "execute <package>", so in your case:

exec dbms_xdb.sethttpport(8080);


or use BEGIN & END;

Please take a look at the user guide for basic Oracle operations. It comes with a search engine, for example execute package would lead you to this link.

C.

Message was edited by:
cd
StrayGrey

Posts: 171
Registered: 08/05/05
Re: Oracle 10g XE environment variables
Posted: Jul 20, 2006 7:54 AM   in response to: cd_2 in response to: cd_2
Click to report abuse...   Click to reply to this thread Reply
SQL> exec dbms_xdb.sethttpport(8080);
BEGIN dbms_xdb.sethttpport(8080); END;

*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_XDB.SETHTTPPORT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
cd_2

Posts: 4,882
Registered: 09/08/98
Re: Oracle 10g XE environment variables
Posted: Jul 20, 2006 8:09 AM   in response to: StrayGrey in response to: StrayGrey
Click to report abuse...   Click to reply to this thread Reply
That's odd. You did login with sqlplus / as sysdba and your database is up and running?

C.
StrayGrey

Posts: 171
Registered: 08/05/05
Re: Oracle 10g XE environment variables
Posted: Jul 20, 2006 8:17 AM   in response to: cd_2 in response to: cd_2
Click to report abuse...   Click to reply to this thread Reply
The short answer is yes and yes
However a longer answer is
sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 20 17:15:30 2006

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

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL> exec dbms_xdb.sethttpport(8080);
BEGIN dbms_xdb.sethttpport(8080); END;

*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_XDB.SETHTTPPORT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

cd_2

Posts: 4,882
Registered: 09/08/98
Re: Oracle 10g XE environment variables
Posted: Jul 20, 2006 8:20 AM   in response to: StrayGrey in response to: StrayGrey
Click to report abuse...   Click to reply to this thread Reply
I don't have the XE available here right now, I'll take a look at it when I get home and write up all the steps, which should help you in getting your installation to work. One more question: which operating system user are you using to run sqlplus?

C.

Message was edited by:
cd
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums