- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- make script to start listner and database
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-17-2008 11:24 PM
тАО06-17-2008 11:24 PM
I have rp7420 server with hp-ux 11iv1 And Oracle 10g installed, i want to make script to start listner and database on server startup and/or when oracle user login
please help
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 11:50 PM
тАО06-17-2008 11:50 PM
Re: make script to start listner and database
use it when you login as oracle:
export ORACLE_SID=your_sid
export ORACLE_HOME=your_oracle_path
lsnrctl start
sqlplus "/ as sysdba" << EOF
startup
EOF
Hope it helps.
Kenan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 11:55 PM
тАО06-17-2008 11:55 PM
Re: make script to start listner and database
and where to write
export ORACLE_SID=your_sid
export ORACLE_HOME=your_oracle_path
lsnrctl start
sqlplus "/ as sysdba" << EOF
startup
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2008 11:56 PM
тАО06-17-2008 11:56 PM
Solutionecho starting listener
lsnrctl start
echo starting db
sqlplus "/ as sysdba" <
EOF
echo starting enterprise manager
emctl start dbconsole
and script stop DB with oracle user;
echo stopping listener
lsnrctl stop
echo stopping db
sqlplus "/ as sysdba" <
EOF
echo stopping enterprise manager
emctl stop dbconsole
regards,
mustafa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2008 12:11 AM
тАО06-18-2008 12:11 AM
Re: make script to start listner and database
but where i can write this script in oracle .login file or where??? my experince
in script file is not good
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2008 12:25 AM
тАО06-18-2008 12:25 AM
Re: make script to start listner and database
you can put these script in to the oracle home directory.example /home/oracle/
don't forget to change the owner of the script.
chown oracle:dba start_db (assume script's name is start_db)
chown oracle:dba stop_db
chmod +x start_db stop_db
regards;
mustafa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2008 12:41 AM
тАО06-18-2008 12:41 AM
Re: make script to start listner and database
you can place your start and stop scripts in your $ORACLE_HOME/bin as db_start and db_stop. you can find listener name cat $ORACLE_HOME/network/admin/listener.ora ( in configured line blocks)
after placing them create a file /sbin/init.d/rc_ora
#!/sbin/sh
ORA_HOME=
case "$1" in
start_msg)
echo "Start ORACLE server"
;;
stop_msg)
echo "Stop ORACLE server"
;;
'start')
/usr/bin/su - oracle -c $ORA_HOME/bin/db_start
;;
'stop')
# Stop the oracle databases
/usr/bin/su - oracle -c $ORA_HOME/bin/db_stop
;;
esac
And don't forget file to make executable by chmod +x.
after than create links for starting oracle while startup:
ln -s /sbin/init.d/rc_ora /sbin/rc3.d/S990rc_ora
ln -s /sbin/init.d/rc_ora /sbin/rc0.d/K10rc_ora
Kenan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2008 12:58 AM
тАО06-21-2008 12:58 AM