Home > Archive > Oracle Server > July 2005 > emctl appears to need $DISPLAY









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author emctl appears to need $DISPLAY
Arthur Salazar

2005-07-26, 8:23 pm

I am attempting to write a script to bring Oracle 10g up and down.
At one point I call "emctl start dbconsole". I find that it appears
to need to have the DISPLAY environment variable set to a valid X
server.

I will be running the script in a non-visual environment. Can anyone
suggest a way that this can be worked around?

Thanks,

-arthur
IANAL_VISTA

2005-07-26, 8:23 pm

Arthur Salazar <asalazar@asalazar.visionsolutions.com> wrote in
news:pan.2005.07.26.23.50.15.960482@asalazar.visionsolutions.com:

> I am attempting to write a script to bring Oracle 10g up and down.
> At one point I call "emctl start dbconsole". I find that it appears
> to need to have the DISPLAY environment variable set to a valid X
> server.
>
> I will be running the script in a non-visual environment. Can anyone
> suggest a way that this can be worked around?
>


What's wrong with using SQLPLUS instead?
PhilB

2005-07-27, 7:23 am

Use VNC to configure a dummy display. Get it here

http://www.realvnc.com/products/fre...7/download.html

Phil.

Cris Carampa

2005-07-27, 7:23 am

Arthur Salazar wrote:

> I am attempting to write a script to bring Oracle 10g up and down.
> At one point I call "emctl start dbconsole". I find that it appears
> to need to have the DISPLAY environment variable set to a valid X
> server.


On which platform? Linux doesn't seem to show this behaviour.

You can try to setup an X virtual frame buffer (Xvfb).

Kind regards,

--
Cris Carampa (cris119@operamail.com)
Don't even think of breaking large print jobs down into smaller
chunks. God forbid somebody else should sneak a one-page job in between
your 500-page Word document.
Maxim Demenko

2005-07-27, 7:23 am

Arthur Salazar schrieb:
> I am attempting to write a script to bring Oracle 10g up and down.
> At one point I call "emctl start dbconsole". I find that it appears
> to need to have the DISPLAY environment variable set to a valid X
> server.
>
> I will be running the script in a non-visual environment. Can anyone
> suggest a way that this can be worked around?
>
> Thanks,
>
> -arthur


I'm not sure, whether it applies to 10g ( don't have here a 10g
installation ), but in 9i similar problem was easily workarounded by
setting dummy DISPLAY ( Jserv checks whether the variable is set, but
don't validate it). So you can simply try
export DISPLAY=127.0.0.1
(it doesn't matter that you have not x server local running).

Best regards

Maxim
Arthur Salazar

2005-07-28, 11:26 am

On Wed, 27 Jul 2005 11:24:55 +0200, Maxim Demenko wrote:

> Arthur Salazar schrieb:
>
> I'm not sure, whether it applies to 10g ( don't have here a 10g
> installation ), but in 9i similar problem was easily workarounded by
> setting dummy DISPLAY ( Jserv checks whether the variable is set, but
> don't validate it). So you can simply try
> export DISPLAY=127.0.0.1
> (it doesn't matter that you have not x server local running).
>
> Best regards
>
> Maxim


Thanks. This applies only to 10g for me since we are using apache in 9i.
My notes say that I used the local server 10.1.255.7 as DISPLAY but it
did not work. I will try the 127.0.0.1 -- localhost idea.

-arthur

Arthur Salazar

2005-07-28, 11:26 am

On Wed, 27 Jul 2005 11:18:12 +0200, Cris Carampa wrote:

> Arthur Salazar wrote:
>
>
> On which platform? Linux doesn't seem to show this behaviour.
>
> You can try to setup an X virtual frame buffer (Xvfb).
>
> Kind regards,


This behaviour appears on AIX on iSeries. I will look into the Xvfb.

Thanks,

-arthur


Arthur Salazar

2005-07-28, 11:26 am

On Wed, 27 Jul 2005 01:50:13 +0000, IANAL_VISTA wrote:

> Arthur Salazar <asalazar@asalazar.visionsolutions.com> wrote in
> news:pan.2005.07.26.23.50.15.960482@asalazar.visionsolutions.com:
>
>
> What's wrong with using SQLPLUS instead?


I call sqlplus a little later in the script (I paseted some snippets
below).

But this is getting me thinking...

Your comment makes me think that emctl and sqlplus may be redundant
somehow in a startup script. My understanding was that sqlplus started
the database, lsnrctl starts listeners for remote users and emctl starts a
web server for access to management functions over the web (specifically
http).

Perhaps I have it wrong. Can you clarify for me or send me a pointer to
additional information?

Thanks,

-arthur

My startup script does (assume appropriate environement set up):

[version 10g]
lsnrctl start
isqlplusctl start
emctl start dbconsole
sqlplus / as sysdba << EOF
startup
quit
EOF

[version 9i]
lsnrctl start
sqlplus /nolog <<EOF
connect / as sysdba
startup
EOF

and the shut down is:

[version 10g]

emctl stop dbconsole
isqlplusctl stop
lsnrctl stop
sqlplus / as sysdba << EOF
shutdown immediate
quit
EOF

[version 9i]

lsnrctl stop
sqlplus /nolog <<EOF
connect / as sysdba
shutdown immediate
EOF

I start and stop apache separatly for version 9 with:

apachectl start
apachectl stop

Holger Baer

2005-07-28, 11:26 am

Arthur Salazar wrote:
> On Wed, 27 Jul 2005 01:50:13 +0000, IANAL_VISTA wrote:
>
>

[...]

>
>
> I call sqlplus a little later in the script (I paseted some snippets
> below).


I'd try the other way 'round: dbconsole should be started after db and listener -
at least that's my experience from windows (and as such only loosely related
to your problem).

>
> But this is getting me thinking...
>
> Your comment makes me think that emctl and sqlplus may be redundant
> somehow in a startup script. My understanding was that sqlplus started
> the database, lsnrctl starts listeners for remote users and emctl starts a
> web server for access to management functions over the web (specifically
> http).


This is also my experience: dbconsole is started separately. My startup-skript
has it like this:

case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNR -c $ORA_HOME/bin/dbstart
su - $ORA_OWNR -c "$ORA_HOME/bin/isqlplusctl start"
su - $ORA_OWNR -c "$ORA_HOME/bin/emctl start dbconsole"
su - $ORA_OWNR -c "/opt/app/oracle/Middleware/opmn/bin/opmnctl startall"

Note that dbstart is called before emctl. Funny thing though, this is called during
sys-v init when no $DISPLAY is set. So what OS are you on?

>
> Perhaps I have it wrong. Can you clarify for me or send me a pointer to
> additional information?
>
> Thanks,
>
> -arthur
>
> My startup script does (assume appropriate environement set up):
>
> [version 10g]
> lsnrctl start
> isqlplusctl start
> emctl start dbconsole
> sqlplus / as sysdba << EOF
> startup
> quit
> EOF
>


Put isqlplus and emctl after the startup of the db.

HTH
Holger
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com