- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sending data to another db thru sqlldr - error
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
тАО01-14-2006 04:02 PM
тАО01-14-2006 04:02 PM
The report server goes down for routine backup and the script has no way of telling if the server is down, so when the script executes I get an error:
SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
ORA-12500: TNS:listener failed to start a dedicated server process
Is there a way to check if another database is running before I do the sqlldr routine?
I thought tnsping, but it will still return a 0 for ${?}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2006 06:09 PM
тАО01-14-2006 06:09 PM
Re: sending data to another db thru sqlldr - error
I would suggest a simple script that does the following:
select * from v$database;
That should get you a return code non-zero or some data from oracle to determine whether the database is up or down.
tnsping is a network connectivity tool to merely see if database communication is possible. Its not useful in determining whether the target database is up or down.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2006 01:45 PM
тАО01-15-2006 01:45 PM
Re: sending data to another db thru sqlldr - error
A simple sqlplus logon to the target database will return an error code saying database not available.
And in your loasing script you can look for this succussfull login and then start your loader sqlldr or exist saying database is not available.
Indira A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2006 03:01 PM
тАО01-15-2006 03:01 PM
Solution# echo Database Check for "`uname -a ; date`"
for DATABASE in
do
# echo Checking $DATABASE - \\c
if [ "`ps -ef | awk '/'co_$DATABASE'/ && $8 !~ /awk/ {print $8}' -`" = "ora_reco_$DATABASE" ] ; then
# echo $DATABASE is up and running.
# Put your SQL loader script in here (cause the database 'appears' to be up)
continue
elif [ "`ps -ef | awk '/'co_$DATABASE'/ && $8 !~ /awk/ {print $9}' -`" = "ora_reco_$DATABASE" ] ; then
# echo $DATABASE is up and running.
continue
else
echo **DATABASE ALERT! \\a \\a \\a
echo **DATABASE ALERT! The $DATABASE Database is DOWN! \\a \\a \\a
echo **DATABASE ALERT! \\a \\a \\a
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2006 08:22 PM
тАО01-15-2006 08:22 PM
Re: sending data to another db thru sqlldr - error
you can use this script to be sure that your db is up and running:
sqlplus -s <
set pages 0 feed off tab off trim on
select 'OK'||'|'||host_name||'|'||database_status from v\$instance;
exit
END_OF_SQL
if [[ $sql_status = OK ]] && [[ $db_status = ACTIVE ]]; then
echo Database is active on $host_name
fi
Feel free to adapt it on your needs,
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2006 09:00 PM
тАО01-15-2006 09:00 PM
Re: sending data to another db thru sqlldr - error
have a look at:
http://www.oracleutilities.com/OSUtil/ping.html
Summary:
1. Test machine up with ping
2. Test listener up with tnsping
3. Test database up with tnsping and specified tnsnames.ora
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2006 02:53 AM
тАО01-16-2006 02:53 AM
Re: sending data to another db thru sqlldr - error
==========
THE_SID=DBNAME
let THE_TEST=`ps ├в ef|grep ora_pmon_$THE_SID |grep ├в v grep|wc ├в l`
if [ $THE_TEST ├в gt 0 ]
then
echo "database is up do some thing"
else
mailx ├в s "database "$THE_DB" is not open" Marty fi
==========
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2006 06:51 AM
тАО01-16-2006 06:51 AM
Re: sending data to another db thru sqlldr - error
cheers!