Oracle lsnrctl stops and hangs
Hi ,
I installed Oracle 11g in OEL Linux . OEL Linux is inside Oracle VM . I installed in another machine (OEL Linux inside Oracle VM) . In the other machine installed Weblogic 10.3.2 , SOA Suite and RCU . I've noticed connection problems and hangs since installation of RCU .Database listener gets down or hangs every time i try to connect with it . Installation took a lot of time (this was unusual ) but in the end was successful . When i start soa_server i see errors regarding ConnectionDeadSQLException and DataSource related , when i try lsnrctl status it hangs a lot and sometimes it stops by itself .I'm 100% sure that it's listeners problem (I've tested connection from other machines too). I'm attaching listener.ora file . Please help me cause this is really urgent for me
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.51)(PORT = 1521))
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = orcl)
ADR_BASE_LISTENER = /u01/app/oracle
Ok ,
i changed it , now i can connect with ora.facilization.net but still seems slow
For example when i try to connect with rcu for creatin repositories the response is delayed with
10secs or more even for a simple connection , connection from navicat takes a lot and in the meantime
i exexute lsnrctl status from terminal it hangs a lot .
This is log.xml again
<msg time='2012-01-20T12:37:02.677-05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='ora.facilization.net'
host_addr='192.168.1.51'>
<txt>20-JAN-2012 12:37:02 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=oracle))(service_name=ORCL.FACILIZATION.NET)(server=dedicated)) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.53)(PORT=39979)) * establish * ORCL.FACILIZATION.NET * 0
</txt>
</msg>
<msg time='2012-01-20T12:37:02.677-05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='ora.facilization.net'
host_addr='192.168.1.51'>
<txt>20-JAN-2012 12:37:02 * service_update * orcl * 0
</txt>
</msg>
<msg time='2012-01-20T12:37:02.678-05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='ora.facilization.net'
host_addr='192.168.1.51'>
<txt>20-JAN-2012 12:37:02 * service_update * orcl * 0
</txt>
</msg>
<msg time='2012-01-20T12:37:02.679-05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='ora.facilization.net'
host_addr='192.168.1.51'>
<txt>WARNING: Subscription for node down event still pending
</txt>
</msg>
<msg time='2012-01-20T12:37:02.679-05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='ora.facilization.net'
host_addr='192.168.1.51'>
<txt>20-JAN-2012 12:37:02 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=ora.facilization.net)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186646784)) * status * 0
</txt>
</msg>
<msg time='2012-01-20T12:37:05.681-05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='ora.facilization.net'
host_addr='192.168.1.51'>
<txt>20-JAN-2012 12:37:05 * service_update * orcl * 0
</txt>
</msg>
<msg time='2012-01-20T12:37:11.689-05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='ora.facilization.net'
host_addr='192.168.1.51'>
<txt>20-JAN-2012 12:37:11 * service_update * orcl * 0
</txt>
</msg>
<msg time='2012-01-20T12:37:32.715-05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='ora.facilization.net'
host_addr='192.168.1.51'>
<txt>20-JAN-2012 12:37:32 * service_update * orcl * 0
</txt>
</msg>
Similar Messages
-
Listener ( lsnrctl ) - stop and start just one instance
Hey all. I hava a Oracle 9.2 installed over a Linux Red Hat 4.0 64 bits server.
Some Virtual Machines will connect in some databases installed in my Oracle server. My listener has one instance for each database like this:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = VM01)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(SID_NAME = VM01)
(SID_DESC =
(GLOBAL_DBNAME = VM02)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(SID_NAME = VM02)
(SID_DESC =
(GLOBAL_DBNAME = VM03)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(SID_NAME = VM03)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = VM01))
(ADDRESS = (PROTOCOL = IPC)(KEY = VM02))
(ADDRESS = (PROTOCOL = IPC)(KEY = VM03))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab2)(PORT = 1521))
And my tnsnames:
VM03 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab2)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = VM03)
VM02 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab2)(PORT = 1521))
(CONNECT_DATA =
(SID = VM02)
VM01 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab2)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = VM01)
I need to start and stop just one instance (VM01 or VM02 or VM03). I really can't stop all instances when I need to stop just one. And more if i have to create another instance i will have to stop the listener... and i can't because other people are using your instance...
Do you know how to help me?
ThanksssssssYou still use listener.ora, just create 3 listeners, one for each instance:
listener.ora:
LISTENER_VM01 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(HOST = lab2)(KEY = VM01))
(ADDRESS = (PROTOCOL = TCP)(HOST = lab2)(PORT = 1521))
SID_LIST_LISTENER_VM01 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = VM01)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(SID_NAME = VM01)
LISTENER_VM02 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(HOST = lab2)(KEY = VM02))
(ADDRESS = (PROTOCOL = TCP)(HOST = lab2)(PORT = 1522))
SID_LIST_LISTENER_VM02 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = VM02)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(SID_NAME = VM02)
LISTENER_VM03 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(HOST = lab2)(KEY = VM03))
(ADDRESS = (PROTOCOL = TCP)(HOST = lab2)(PORT = 1523))
SID_LIST_LISTENER_VM03 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = VM03)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(SID_NAME = VM03)
Then, when you need to stop the connections to only one instance, you stop the corresponding listener:
lsnrctl stop listener_vm02
lsnrctl start listener_vm02
For each instance you need to configure the parameter local_listener:
sys@VM01> alter system set local_listener=listener_vm01;
sys@VM02> alter system set local_listener=listener_vm02;
sys@VM03> alter system set local_listener=listener_vm03;
And register in tnsnames.ora:
listener_vm01=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=lab2)(PORT=1521)))
listener_vm02=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=lab2)(PORT=1522)))
listener_vm03=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=lab2)(PORT=1523)))
It's a recommended configuration for the flexibility it provides,it requires a different port for each listener, but you don't need to edit the listener.ora file each time you need to stop the connectivity to only one instance. -
Moving files from USB drive (iPod in disk mode) stops and hangs Finder
I’m having trouble trying to copy a load of music files from my iPod to my new MacBook. The iPod is in disk mode so I’m just using it to move a load of MP3 files from my old PC to my MacBook. They copied from the PC fine and are sat in a fold on the iPod (which I boot into disk mode and connect to my MacBook running Leopard 10.5.5).
The disks mount fine and I can read and playback the files, but when I start to copy them to my MacBook after a minute or too the progress bar stops and it just sits there. I have thousands of file that I need to move and even tried to move say 100 at a time, but after the first few hundred it just stops again.
I have to force quit the finder, but this then hangs the finder unless I disconnect my iPod and then the finder starts back up but warns me that I have removed a driver without first ejecting it.
My iPod is a Video model 5.5 80GB which I connect via USB 2.0 to my MacBook. Anyone got any ideas why copying the files isn’t working?Thanks for those suggestions. I have tried copying them one by one, but with over 6000 files it’s just not feasible to do this. I don't think adding more memory will help as my MacBook is the new Aluminum model with a 2.0GHz processor and 2GB. I have also tried connecting the same iPod to a Mac Pro with dual 2.8GHz processors, 4GB memory and a set of RAID hard drives and this also has the same problem as my MacBook.
Also, none of the files have any DRM protection.
Message was edited by: ChrisWad -
ICould email stops typing and hangs
When using iCloud with Firefox on Windows, typing often stops and hangs. I get a message that a script has stopped running. Does anyone know what this is about? I have verified that my Java version is up to date.
Just seen the other thread about the issue.
Message was edited by: markhort -
Oracle database is very slow and hangs sometime
I am using Oracle 11g on Red hat 5.2 . My RAM is of 6 GB and swap size is 12GB . When I checked the used RAM and Swap area by using $ free -m command it shows that enough free memory (almost 4990 GB and swap space (more than 10GB) is available to use. Then I checked an alert.log file as my database was hanged . It contains error like
1. audit commit delay exceeded oracle
2. unable to spawn jobq slave process oracle
3. maximum number of sessions exceeded
4. could not allocate new resource
My init.ora contains following parameters.
Processes =150
Sessions= 248
Transactions = 220
memory_target = 2400m
sga_max_size = 1500m
sga_target = 0m
So, what steps i should take to stop database hanging and how can i boost slow performance ? Is there any problem with my resource manager and if so then how can i correct it?
Thanks
Tushar LapaniHi,
Please check the query
SELECT username,default_tablespace from dba_users;
Ususally the default tablespace of the user should not be in SYSTEM tablespace. This might cause performance issue. Create a seperate tablespace and alter/assign this user. Also must move all the objects from SYSTEM tablespace to this new tablespace which you created.
For complete details, you can refer the document http://docs.oracle.com/cd/B14117_01/server.101/b10752.pdf -
When I run the command, 'lsnrctl stop' to stop listerner. The listener stopped well but the command did not end.
I could recognize following error using ktrace.
556 lsnrctl NAMI "/Users/oracle/10g/oracle/lib/libociei.dylib"
556 lsnrctl RET open -1 errno 2 No such file or directory
556 lsnrctl CALL close(0xffffffff)
556 lsnrctl RET close -1 errno 9 Bad file descriptor
556 lsnrctl CALL open(0xbfffc260,0,0)
556 lsnrctl NAMI "/Users/oracle/10g/oracle/rdbms/lib/libociei.dylib"
556 lsnrctl RET open -1 errno 2 No such file or directory
556 lsnrctl CALL close(0xffffffff)
556 lsnrctl RET close -1 errno 9 Bad file descriptor
556 lsnrctl CALL open(0xbfffc280,0,0)
556 lsnrctl NAMI "/libociei.dylib"
556 lsnrctl RET open -1 errno 2 No such file or directory
556 lsnrctl CALL close(0xffffffff)
556 lsnrctl RET close -1 errno 9 Bad file descriptor
556 lsnrctl CALL open(0x4026d0,0,0)
556 lsnrctl NAMI "libociei.dylib"
556 lsnrctl RET open -1 errno 2 No such file or directory
556 lsnrctl CALL close(0xffffffff)
556 lsnrctl RET close -1 errno 9 Bad file descriptor
556 lsnrctl CALL open(0xbfffc270,0,0)
556 lsnrctl NAMI "/Users/oracle/lib/libociei.dylib"
556 lsnrctl RET open -1 errno 2 No such file or directory
556 lsnrctl CALL close(0xffffffff)
556 lsnrctl RET close -1 errno 9 Bad file descriptor
Could not find out the 'libociei.dylib'.
Thanks in advance.Hi
beforem issuing the lsnrctl stop command try the following:
onsctl start
lsnrctl stop
onsctl stop
This is a known issue and has been on the forum before. I hope it helps
Paul. -
How to stop and start only the process of Oracle Application Express?
I'd like to know how to stop the process of Oracle Application Express on my server installed oracle express package.
After installed Oracle Express edition, not only oracle database server processes but also Oracle Application Express, such as http server, is started automatically...
I hope to stop and start Application Express on demand but is this feature enabled?Oracle Apex is an API, if that helps you understand / visualize. You do not start Apex process nor stop it.
When an Apex session starts it starts calling the API.
You can however start / stop the listener. It may be OHS, ApexListener and the J2EE container running it, OC4J or any other "server" that you are using.
The built-in EPG is something like an API again, you cannot start / stop it but you can disable/enable it with DBMS_XDB.SETHTTPPORT API.
Regards, -
My computer slows down and hangs after installing oracle 10g
My computer just slows down after installing oracle 10g. I have a pentium 4 3ghz with 512 memory (32 mb used by graphics built in card). It slows down and hanged even if I agjusted the swap memory to 800 mb. I have two swap file/page file - in drive c and drive d. I even cannot shut it down because it takes maybe 30 minutes just to see the "shut-off/log-off" screen.
Before starting up Oracle, when you go to the task manager, how much RAM does it show actually free? 512 MB is pretty small to run Oracle in the first place-- Windows and Office can use a fair chunk of RAM themselves, depending on which Office apps you are running. You may also be suprised by the amount of RAM that a web browser, email client, and the various other apps that folks generally install can use.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Script to Stop and Start Oracle Meter Data Management
Hi,
This is my first post in Oracle forums so if i open this in the wrong thread please forgive me.
I tried to create a windows batch script to stop and start Oracle Meter Data Management but i can´t.
@echo off
D:\spl\MDMDEV\bin\splenviron.cmd -e MDMDEV
D:\spl\MDMDEV\bin\spl.cmd stop
D:\spl\MDMDEV\bin\splenviron.cmd -e MDMDEV
D:\spl\MDMDEV\bin\spl.cmd stop
The batch exits in the first command and i can´t understand why.
Another thing is if i use spl.cmd stop command it doesn´t do nothing, is this normal?
Thanks in advanced for all replies.
Best Regards.
NunoI had to put a call command in mine. I think it is because you are trying to run a .cmd file within your bat file. You're actually changing shells. Thats why you need the call.
call d:\spl\mdmdev\bin\splenviron.cmd -e mdmdev
call d:\spl\mdmdev\bin\spl.cmd start
I actually set mine up to use variables so all I had to change from script to script was the environment...
<snip>
SET SPLENV=MDMDEV
SET INSTALLDRIVE=D:
SET INSTALLDIR=SPL
SET BINDIR=%INSTALLDRIVE%\%INSTALLDIR%\%SPLENV%\bin
%INSTALLDRIVE%
cd %BINDIR%
REM Set envornment
call %BINDIR%\splenviron.cmd -e %SPLENV%
REM Wait a few seconds for environment to setup
ping localhost -n 5 > nul
REM Start SPL Web
call %BINDIR%\spl.cmd start
</snip>
I was unable to find a way to get this to run as a service. Have you?
I'm currently running these scripts in the startup/shutdown script section of the local machine policy (gpedit.msc). -
Hi Guys,
Creating Oracle Inventory Installation Step Does Not Finish and Hangs at 99% while installing Hyperion 11.1.1.4.I'm running the installer from a local drive and also noticed that the uninstaller files are not created.The installer process has been running for 4+ hours.
Any suggestions/tips?
Thanks
Manojhi John,
we left the installer running overnight, but the install process has still not completed.Also it has not created any uninstaller files under the following directory:
E:\APPS\Hyperion\uninstall
what could be the reason for that?
Thanks.
Manoj -
Hi Gurus,
Please suggest What will happen if oracle listener is stopped and started again on a running SAP System ?
Thanks in advance.Hi Lakhbir,
What will happen is that, all SAP work processes will loose connection to the database.
If any active jobs(background jobs, updates, insert to database ) are running, they may fail. All the work processes will go to a re-connect state.
( There are few notes on WP reconnect which you can check and read about)
DB Reconnect Parameters - SAP High Availability - SAP Library
Application will be running but users will not be able to do any activity or may not be able to login at all and may get errors like ( No connect to database possible)
As soon as you start the listener process again , all the work processes will connect to the database again.
This is because the WPs will keep on trying to connect to database at regular interval and as soon as the connection is available they will re-connect.
You do not have to restart any work process manually in SM50 or anywhere else as this feature is enabled by default until disabled manually.
Thanks
Amit -
Srvctl on 11.2.0.3 does not stop and start listeners
I recently installed the Grid software under the "grid" user on RH5. Clusterware and ASM run under GRID_HOME, the single instance database runs under ORACLE_HOME. I have created 2 listeners on non-default ports (manually using entried in listener.ora) and then added to srvctl (srvctl add listerner -l LISTENER_XPT -o /app/oracle/product/dhome_1 -p "TCP:1523" -- in ORACLE_HOME.
When stopping the listener using:
oracle@#####>srvctl stop listener -l LISTENER_XPT -- note starting with oracle user in ORACLE_HOME. Below is from "/app/grid/product/11.2.0/grid/log/server_name/agent/ohasd/oraagent_grid/oraagent_grid.log
2012-06-12 12:48:00.549: [ora.LISTENER_XPT.lsnr][1125030208] {0:0:1233} [check] (:CLSN00010:) TNS-00511: No listener
2012-06-12 12:48:00.549: [ora.LISTENER_XPT.lsnr][1125030208] {0:0:1233} [check] (:CLSN00010:) Linux Error: 111: Connection refused
2012-06-12 12:48:00.549: [ora.LISTENER_XPT.lsnr][1125030208] {0:0:1233} [check] (:CLSN00010:)Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1523)))
2012-06-12 12:48:00.549: [ora.LISTENER_XPT.lsnr][1125030208] {0:0:1233} [check]
**********FROM TAILING THE listener LOG ****************************
TNS-01190: The user is not authorized to execute the requested listener command
12-JUN-2012 12:44:12 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=v01orarac01w)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER_XPT)(VERSION=186647296)) * status * 0
TNS-01195: Listener rejected registration of endpoint "(ADDRESS=(PROTOCOL=TCP)(HOST=10.5.87.5)(PORT=1523)(IP=FIRST))"
12-JUN-2012 12:50:02 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=v01orarac01w)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER_XPT)(VERSION=186647296)) * status * 0
TNS-01190: The user is not authorized to execute the requested listener command
12-JUN-2012 15:12:58 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=v01orarac01w)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER_ADMIN)(VERSION=186647296)) * status * 0
12-JUN-2012 15:12:58 * version * 0
12-JUN-2012 15:12:58 * service_register * LsnrAgt * 1195
TNS-01195: Listener rejected registration of endpoint "(ADDRESS=(PROTOCOL=TCP)(HOST=********)(PORT=1524)(IP=FIRST))"
12-JUN-2012 15:12:59 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=********)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER_XPT)(VERSION=186647296)) * status * 0
12-JUN-2012 15:13:05 * (CONNECT_DATA=(SID=PRDRAC01)(CID=(PROGRAM=perl)(HOST=********)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=*******)(PORT=41398)) * establish * PRDRAC01 * 0
Why wouldnt the Oracle user not be able to start/stop a resource from ORACLE_HOME ? Any assistance would be helpfulI just removed the listener out of the ORACLE_HOME and added it using srvctl to the GRID_HOME. Now I am able to stop and start.
Still the question, why cant oracle user start an oracle_home managed resource. But the oracle user could start and stop using lsnrctl stop/start
Below if the results from ps (note I just started listener from GRID_HOME):
grid@PRODBLD:+ASM>ps -ef |grep lsnr
grid 9114 1 0 09:40 ? 00:00:00 /app/grid/product/11.2.0/grid/bin/tnslsnr LISTENER_ADMIN -inherit
grid 10348 1 0 Jun12 ? 00:00:00 /app/grid/product/11.2.0/grid/bin/tnslsnr LISTENER -inherit
grid 20234 21990 0 09:49 pts/2 00:00:00 grep lsnr
oracle 29926 1 0 Jun12 ? 00:00:00 /app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr LISTENER_XPT -inherit -
How to automate the Oracle database start and shutdown process
How we can automate and oracle database start and stop procees with Linux start/shutdown process.
I want to automatically start the oracle database at the time linux server and shutdown the database on shutdown linux server.Hi,
I can share my scripts:
1) /home/oracle/start_oracle.sh
#Script should be ran as Oracle user
cd /tmp
export ORACLE_SID=orcl
export ORACLE_HOME=/oracle/ora9i
lsnrctl start
sqlplus -S /nolog <<ENDSQL
connect / as sysdba
startup
exit
ENDSQL
emctl start dbconsole
isqlplusctl start
NOTE: emctl and isqlplus are optional
2) /home/oracle/stop_oracle.sh
#Script should be ran as Oracle user
cd /tmp
export ORACLE_SID=orcl
export ORACLE_HOME=/oracle/ora9i
isqlplusctl stop
emctl stop dbconsole
sqlplus -S /nolog <<ENDSQL
connect / as sysdba
shutdown immediate
exit
ENDSQL
lsnrctl stop
NOTE: emctl and isqlplus are optional
Then what you need:
1) K91oracle_stop (put it in the desired run level)
#!/bin/bash
# description: Stop Oracle before reboots
su - oracle -c "/home/oracle/stop_oracle.sh" >> /home/oracle/stoporacle.log
2) S91oracle_start (put it in the desired run level)
#!/bin/bash
# description: Start Oracle after reboots
su - oracle -c "/home/oracle/start_oracle.sh" >> /home/oracle/startoracle.log
Bye. -
Start, restart, stop and status stored procedure - howto?
First:
- this and other otn forums are awesome!
- apex is neat
Second:
- I have O'Reilly books: "Oracle pl/sql programming" and "Mastering Oracle SQL"
- Also tried to search / google best practices around stopping 'hanging stored procedures' and creating logics for such happening
Challenge:
I would like to implement simple solution for starting, stopping, restarting and maybe even getting status of stored procedures. Sounds like unix runlevels but in "userspace" without the sys rights.
Finally I would like to have this functionality in apex-application where predefines stored procedures could be started, restarted, stopped and maybe even status could be retrieved.
start - this is simple, start - but maybe check if such stored procedure is already started ( so this start will fail)
stop - send signal to certain procedure(s) that now it/they should exit immediately
restart - actually stop+start
status - maybe via status table indicating e.g. records_processed/records_to_be_processed
Mostly I need this stop so what would be the best way to write "exit" for stored procedure? I would like to avoid the following approach:
SELECT sid, serial# , username, schemaname, osuser FROM gv$session;
ALTER SYSTEM KILL SESSION '<sid>,<serial#>' IMMEDIATE;
/paavo
Edited by: paavo on Jul 13, 2009 11:35 AM - added status to subject :)paavo wrote:
Thank you, very good references, but still I think my challenge persist on stop still because I try to do this without the rights to v$session etc. tables.
So what would be the best way to deliver stop-message to executing stored procedure. E.g.
- via table which is regularly checked by stored procedure (e.g. in loop it selects from the table)
/paavoI think for stopping such a procedure you have only two sensible possibilities.
First option is to kill the session. For this you or the logic that does the kill needs the appropriate rights to do it.
Second option would be to programm this behaviour. The procedure can listen to a kind of signal and if it gets that signal it is stopped. This signal can be a value in a parameter table, but it can also be a message in some pipe/advanced queue. However this means the procedure will stop only at certain defined points (whenever it checks for the stop signal).
Btw: You didn't mention what is the business case behind that technical request. Maybe you can elaborate a little on that too. -
Intermittent ora-1017; poor workaround lsnrctl stop/start
Running Oracle 11.2.0.3 on a redhat Linux x86_64 installation.
I've mapped the servicename to the desired sid in the listener.ora to avoid continually remapping the config information in the source code. This allows the URL to remain consistent for all developers, "jdbc:oracle:thin@//host:port/service" and during predeployment testing it is changed in the listener.ora file to reflect the "production" deployment for final testing.
This has been working great until recently when we began to receive intermittent ora-1017 during connection. If I stop and start the listener, lsnrctl stop:lsnrctl start, I can connect successfully for two sessions and then the ora-1017 reappears.
os authentication is in use(until ??? & I know it's bad) with remote_os_authent=true os_authent_prefix=''. User accounts are the same in both instances, "scott identified externally" for instance
The client is Windows XP and the connection is made using hibernate 3.26 (empty pwd/uid in hibernate.cfg.xml)
listener.ora:(example)
sid_list_listener =
(sid_list =
(sid_desc =
(global_dbname = productionServiceName)
(ORACLE_HOME = /the/oracle/home)
(sid_name = developmentName)
(sid_desc =
(global_dbname = developmentName)
(ORACLE_HOME = /the/oracle/home)
(sid_name = developmentName)
two connections and ora-1017 consistently.
I've noticed that the lsnrctl status reports an increased number of handlers as soon as this error occurs for the "productionServiceName" but I'm unsure whether theere's a connection to the error
host > lsnrctl status
Service "productionServiceName" has 1 instance(s)
Instance "developmentName"status UNKNOWN, has 1 handler(s) for this service
ORA-1017...
host > lsnrctl status
Service "productionServiceName" has 2 instance(s)
Instance "developmentName"status UNKNOWN, has 1 handler(s) for this service
Instance "productionServiceName", status READY, has 2 handler(s) for this service
Thanks for any helpVery insightful response, thanks :|. I asked the same question of our administrator and she insists she changed nothing.
However, I found that dynamic service registration via PMON/service_names init parameter and what appears to be "load-balancing" is causing the 1017 error regardless of what I specify in the listener.ora. According to the oracle docs (link here) the dynamic service registration takes precedence over the static sid list entries in the listener.ora. The invalid username/password error was occurring because the "production instance" had remote_os_authent set to false, so as the uncontrollable load balance switch occurred the username of course is invalid.
I asked our administrator to set the remote_os_authent to true on the "production" instance and now i receive a different failure - intermittently - due to the absence of a collection object in that instance accessed during application launch.
Now to determine when the switch is occurring and control it OR find an alternative to allow constant jdbc configuration with a dynamically configured back-end...as well as to determine what allowed this to work in the first place?
My configuration was based on the statement in the listener.ora configuration documentation that says:
"Use the parameter GLOBAL_DBNAME to identify the database service.
While processing a client connection request, the listener tries to match the value of this parameter with the value of the SERVICE_NAME parameter in the client connect descriptor. If the client connect descriptor uses the SID parameter, then the listener does not attempt to map the values" It does go on to state this is mainly for Oracle8 , 7 but does not indicate issues with newer releases nor that it may be OBE.
****** SOLUTION I FOUND *********
is to use the new 11G parameter DEFAULT_SERVICE_<listener>=<serviceName> configuration in the listener.ora and to NOT specify a service in my jdbc connect string, jdbc:oracle:thin:@//host:port. This provides the functionality I need cleaner than the initial config -
Thanks to all who helped
Maybe you are looking for
-
File Associations & Default Application
Hi All, First time post so please be gentle. I have a file (extension qif) which at the moment opens with a windows program via Codeweavers Crossover. I now need to change this to open with a little Applescript application I have written myself. So o
-
Issue upgrading to snow leopard. CD ejected halfway
I have an old mac laptop that is os x 10.5.8, Inter Core 2 Duo. I want to upgrade to snow leopard so I got the CD. It downloads to about 48% ejects itself and reboots, and does not finish the download, what do I do?
-
How to run lint in the Sun Studio 12 IDE
I'm a newbie to the Sun Studio IDE, and I can't find a way to run lint in the IDE. The C compiler does not give many warnings (unused variables, etc), and lint does, so I want to get the lint diagnostics within the IDE. I can run lint from a terminal
-
i updated my iphone 3g to ios4.2.1 ... the update was succesful but nw itunes says that sim card inserted in this phone is not acceptable and also states that on;y compatible sim from supported carrier is acceptable !!! kindly suggest ...
-
Hi All, Ours is NOT a Oracle EBS environment. We are currently using Oracle Reports and we run reports by passing the appropriate URL to the Reports Server. We are considering using Oracle BI Publisher / Oracle XML publisher. The question we are seek