- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: starting listener running on remote server us...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 02:41 AM
тАО06-25-2004 02:41 AM
remsh ${PRODUCTION_NODE} -n "su - oracle -c 'lsnrctl start'" >>${LOGFILE} 2>& 1
Now however it just hangs and we have to kill off the remsh to continue the script.According to Oracle this should never have worked but it did !!
Anyone had similar problems and have cured them or does anyone have any other ways of starting a listener on a remote server from within a script
We are running Oracle 8.1.7
Any help appreciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 02:57 AM
тАО06-25-2004 02:57 AM
Re: starting listener running on remote server using script
A beeter solution is to use remsh to invoke a script on the remote host which sets and exports all the needed environment variables and then executes lsnrctl.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 03:27 AM
тАО06-25-2004 03:27 AM
Re: starting listener running on remote server using script
Do you happen to know what variables are needed in order to start the listener.
I know I need PATH to the bin dir but what others do I need to putin the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 03:38 AM
тАО06-25-2004 03:38 AM
Re: starting listener running on remote server using script
Oracle upgrade? you need to check with the dba's and find out what changed...
Try it manually.
remsh PROD
su - oracle
Does that work?
what about 'lsnrctl start'?
Ask them the correct command to start the listener...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 03:45 AM
тАО06-25-2004 03:45 AM
Re: starting listener running on remote server using script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 04:02 AM
тАО06-25-2004 04:02 AM
Re: starting listener running on remote server using script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 04:55 AM
тАО06-25-2004 04:55 AM
Re: starting listener running on remote server using script
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=${ORACLE_BASE}/product/8.1.7
TNS_ADMIN=${ORACLE_HOME}/network/admin
export ORACLE_BASE ORACLE_HOME TNS_ADMIN
You may need to export others such as ORACLE_SID or TWO_TASK
I tend to put these commands in a script such as /usr/local/bin/oraenv.sh but make sure that this script contains no exit or return statements
Then both oracle's .profile AND any other batch scripts souce this file using the shell's "." dot operator so that the file is sourced.
e.g.
. /usr/local/bin/oraenv.sh
Now oracle's .profile and everything else "zig" together and any changes can be made in one file.
Plan B.
Surround all interactive commands in oracle's .profile with
if [ -t 0 ]
then
stty ...
tset ...
tabs
fi
so that they are only executed if stdin (-t 0) is a tty device.
I find the common sourced file to be a more elegant approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 04:57 AM
тАО06-25-2004 04:57 AM
Re: starting listener running on remote server using script
remsh ${PRODUCTION_NODE} -n "su - oracle -c 'lsnrctl start &'" >>${LOGFILE} 2>& 1
Do all remsh's hang?
remsh ${PRODUCTION_NODE} date
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 05:36 AM
тАО06-25-2004 05:36 AM
Re: starting listener running on remote server using script
1. Why not write a script to do this, and call it directly with a su oracle "script" rather than trying to run the lsnrctl directly?
2. Why not just write a monitoring script to run on the system under the oracle cron that would check and see if the listener is available, and starting it as needed?
Thanks,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2004 08:48 PM
тАО06-27-2004 08:48 PM
Re: starting listener running on remote server using script
the starting of the listener is part of a script that is runing a database refresh using BCVs
so basic order of events are :
bcv establish
shut prod database and listener
bcv split
restart prod database and listener
import bcv
mount filesystems
the script runs on the DR server and does remsh to prod server to do database shutdown and restart.
The only remsh that hangs is the one that restarts the listener so script does not continue to import bcvs,etc to the DR server. Once we kill the listener remsh it will continue and complete ok.