SCRIPT FOR INSTANCE STATUS
제품 : ORACLE SERVER
작성날짜 : 2002-11-05
--- Under writing ---
# usage: dbstat
ORATAB=/etc/oratab
trap 'exit' 1 2 3
case $ORACLE_TRACE in
T) set -x ;;
esac
# Set path if path not set (if called from /etc/rc)
case $PATH in
"") PATH=/bin:/usr/bin:/etc
export PATH ;;
esac
clear
echo ""
echo " ORACLE_SID Running? "
echo " ---------- -------- "
cat $ORATAB | while read LINE
do
case $LINE in
;; #comment-line in oratab
if [ "`echo $LINE | awk -F: '{print $3}' -`" != "" ] ; then
ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
SMONS=`ps -ef | grep ora_smon_$ORACLE_SID | wc -l`
if [ $SMONS = 2 ] ; then
DBRUN='Yes'
else
DBRUN='No'
fi
echo " $ORACLE_SID $DBRUN "
fi
esac
done
echo ""
All right, I agree hiding it in Java sounds good. The problem is that I cannot provide method public static Scriptable jsConstructor(...), because it would allow instantiation of many server objects. However, when I do not provide that method, how can I make Java class Server available in the JavaScript environment as static, singleton type server.
I guess I could define the class like any other in class ScriptableObject, but without a JavaScript constructor I wouldn't know how to create a singleton instance either. I've tried setting server as some sort of top level property and having it refer to the Java class Server, but that didn't work...
Similar Messages
-
Hi Guys,
I need a script, that will show the status of the script
for example,
It is creating a paragraph styles then, Like vb label, it has to show,
"Paragraphy style creating"
something like this.
regards,
sudar.A JavaScript example:
#targetengine "session"
var myProgressPanel;
var myMaximumValue = 100; // should be set to the amount of cycles (could be myDocument.pages.length, for a script looping all pages)
var myProgressBarWidth = 300; // width in the window
var myIncrement = myMaximumValue/myProgressBarWidth;
myCreateProgressPanel(myMaximumValue, myProgressBarWidth);
var myProgressPanel = myCreateProgressPanel(myMaximumValue, myProgressBarWidth);
myProgressPanel.show();
for (i = 0; i < myMaximumValue; i++) {
myProgressPanel.myProgressBar.value = i;
myProgressPanel.myStatus.text = "Cycle number: " + i ;
for (n = 0; n < 10000; n++) {
myProgressPanel.mySecondaryStatus.text = "Sub cycle number: " + n;
myProgressPanel.close();
function myCreateProgressPanel(myMaximumValue, myProgressBarWidth){
myProgressPanel = new Window('window', 'Progress');
with(myProgressPanel){
myProgressPanel.myStatus = add('statictext', [12, 12, 300, 30], 'Working ...', {alignment: "left"});
myProgressPanel.mySecondaryStatus = add('statictext', [12, 12, 300, 30], 'Working ...', {alignment: "left"});
myProgressPanel.myProgressBar = add('progressbar', [12, 12, myProgressBarWidth, 24], 0, myMaximumValue);
return myProgressPanel;
Hope this helps you
Thomas B. Nielsen
http://www.nobrainer.dk -
Dear experts,
I have to do the below requirments can you please help me on this,
i have to check the database status on every 2 hour intravel, i need a shell script to check the database status whether up or down, if the status is up i have to call .sql file , if the status is down the mail will be sent to dba team with mailx functionality, can any one plz help me on this? this requirment needs to be used only shell script code. thanks in advance
Os is AIX
db version 11.2.0.2I can think of a few ways this can mislead...
expired password
mail problems (both mail not working, and too much mail on Monday...)
network problems (for example, db can be up and working, but that client can't get there - false negative)
Client dead, or process can't start (false postive - no mail, therefore no problem)
Login storm (so only some new connections rejected, random false negative or false positive)
Listener down or related login problems, device with executables offline, out of horsepower - users still working, but no new logins.
Multiple problems (I've seen more than once, both phone lines and power fail, no notification sent)
Error not discriminatory enough - the email should at least send the error it got.
False positive - only script can get to db, users can't with modern tiered architecture.
client tnsnames.ora not available or corrupted.
Nothing wrong with having a script, you just have to watch the requirements and definitions. More sophisticated solutions have problems too. In the end you have to decide what the operational priorities are. Two hours down might be OK at 4AM but not at 6. You also don't want to stretch the limits of an UPS. -
Hi there,
Anybody has an EEM applet script for ISDN status? let's say if ISDN layer-1 Deactivated or Fail, sends email alert immediately? Thanks !
Global ISDN Switchtype = primary-5ess
ISDN Serial1/0:23 interface
dsl 0, interface ISDN Switchtype = primary-ni
Layer 1 Status:
ACTIVE
Layer 2 Status:
TEI = 0, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
Layer 3 Status:
0 Active Layer 3 Call(s)
Active dsl 0 CCBs = 0
The Free Channel Mask: 0x807FFFFF
Number of L2 Discards = 0, L2 Session ID = 250
Total Allocated ISDN CCBs = 0This applet should work:
event manager applet isdn-down event snmp oid 1.3.6.1.2.1.10.20.1.3.4.1.2.X entry-op ne entry-val 2 get-type exact poll-interval 10 exit-op eq exit-val 2 action 1.0 mail from "[email protected]" to "[email protected]" server "smtp.company.com" subject "ISDN is down" body "The ISDN status is currently $_snmp_oid_val"
Besides the obvious email addresses and SMTP server, the value of X here is the ifIndex of the ISDN interface (as seen in the output of "show snmp mib ifmib ifindex"). SNMP will be the easier course of action here as it will work on more versions of IOS in applet form. -
PS2013 - When creating a new instance of Project Server hangs in 'Waiting for resources' status
Hi,
I have one instance of Project Server 2013 fully operational and I tried to duplicate the instance to make some tests. As I know the issue of using the same Content Database of Project Server in the same Server Farm, I used the powershell backup/restore/dismount
and mount the content database to change the site IDs to avoid index duplication. The Project server database was a regular SQL backup and restore in another database.
I created a new Web App in the port 90 as show below.
Then I included the Content database of Project Server as separated DB from SharePoint for this new SharePoint -acme90 and I tried to create the new instance. The creation hanged in "Waiting for Resources" status.
To make another check excluding the reuse of the SharePoint-80 I tried to create another instance both in the SharePoint-80 where is the working instance and in the SharePoint-90, everything default and again they all hanged in Waiting for Resource.
If I try to create the instance using PowerShell I got the following error:
PS C:\Users\epm_setup> Mount-SPProjectWebInstance -DatabaseName Test_EPM -SiteCo
llection http://acme02/epm -Lcid 1046
Mount-SPProjectWebInstance : Cannot find an SPSite object with Id or Url:
http://acme02/epm.
At line:1 char:1
+ Mount-SPProjectWebInstance -DatabaseName Test_EPM -SiteCollection
http://acme02/ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : InvalidData: (Microsoft.Offic...ountPwaInstance:
PSCmdletMountPwaInstance) [Mount-SPProjectWebInstance], SPCmdletPipeBindEx
ception
+ FullyQualifiedErrorId : Microsoft.Office.Project.Server.Cmdlet.PSCmdletM
ountPwaInstance
All SharePoint and Project Server services are running, all App Pools and sites are started at the IIS. I could not find a hanging timer job.
I cannot stop the hanged process or dismount the instances using Powershell since no instance created.
How should I solve the hanging status of creation of the instance? As they are in Hyper-V I can go back using one snapshot.
Thank you.
Best regards, Ricardo Segawa - Segawas Projetos / Microsoft PartnerHi Eric,
Thank your for your interest in this case.
I checked for running and crashed PWA jobs and deleted all of them just after restoring the snapshot and tried to create the new instance in the new web app in port 90 (besides the existing and working instance in port 80), but again it hanged in "waiting
for resources". There is not any timer job hanging, no error in event viewer or in log. So the error is well before working with cloned dbs.
Answering your questiion, I am working all on 2013. My intention is backup one instance of the port 80 and copy to the instance of port 90, changing of course the url and the index of the content db of SharePoint. The process I used was:
Create a new web app in port 90, creating a new SharePoint_Content_2 on a
http://server:90 site.
Created the top level site called Portal using the Team Site template.
Create a new content db for new instance of Project Server named EPM_Content_2 using Central Admin.
Backup content db from port 80 instance of Project Server and restore to this EPM_content_2 using PowerShell cmd.
Dismounted and mounted this Project Server content db to create new index for existing sites to avoid index conflicts.
Backup the Project Server DB from port 80 using SQL backup and restored as ProjectWebApp2 db for port 90 instance.
Tried to create a new instance of Project Server
http://server:90/pwa on web app of port 90 using the ProjectWebApp2 db and using the same app pool of the other instance. But as in the previous case, it hang out in "Waiting for resources".
Best regards, Ricardo Segawa - Segawas Projetos / Microsoft Partner -
Script for getting the online/offline status
Hi all,
After enabling checkbox of "Enable assistive access device" is possible to get the online/ offline status.From Menu we will get the status.Without doing this i want to get the apple mail account online/offline status.hope some help scripts for this.[That script|http://discussions.apple.com/message.jspa?messageID=11012484#11012484] could change the Online Status of all mail accounts. The following one will just report their Online Status. Is this what you are (were) asking for?
--BEGINNING OF SCRIPT
tell application "Mail" to activate
tell application "System Events" to tell process "Mail"
set theMenu to menu "Mailbox" of menu bar 1
if enabled of menu item "Take All Accounts Online" of theMenu then
return "All accounts are currently offline"
else
return "All accounts are currently online"
end if
end tell
--END OF SCRIPT -
Script for Checking the Server Status
Hi All,
I just need the script for monitoring the server status through the WLST.My scenario:I have 2 server in Running State.If any one of the server get failed or in not RUNNING state then i use the script for starting that server automatically.I tried some of the script but it is not working properly .If any one have the sample script please share with me.
Regards,
Ove.Hi Syed,
Replication state is very easy to see in 4.x and earlier. The last changenumber in the supplier changelog is visible (on the root DSE IIRC), and each consumer suffix has an operational attribute "copiedfrom" that tells you the name of the supplier, the database generation id, and the last change replayed from the supplier.
So a script that compares the results of
ldapsearch -h <supplier> -s base -b "" "objectclass=*" lastchangenumber
and
ldapsearch -h <consumer> -s base -b <base_suffix> "objectclass=*" copiedFrom
will show you if a replica has fallen out of sync. It won't tell you more than how many changes behind the replica is, though, because pre-5.x changenumbers are sequential integers, not timestamps.
However, the change that corresponds to the changenumber is clearly visible under the "cn=changelog" suffix. So if you look at the change itself you can see the timestamp on it.
For more info on the status of replication, you should be able to query the agreements on the supplier. Those live under the "Netscape Machine Data Suffix", which you can also find on the supplier's root DSE:
ldapsearch -h <supplier> -s base -b "" "objectclass=*" netscapemdsuffix
And of course the error logs will usually tell you if replication is failing outright.
I may be off on some of the attribute names, but if you do some investigating along these lines, you should be able to figure it out. -
When I download a PDF, a user manual for instance, the page is black and the font is green, how do I change this to a white page and black script?
Try opening it with Adobe Acrobat Reader.
Note: Appleworks is the Apple office like application that stopped being able to run with Mac OS X 10.6.8. If you have a question particular to 10.9, I would ask in the 10.9 (OS X Mavericks) forum. -
Status profile defined in IMG for instance in BS02 trx
Dear all
Could you please give some help about this:
We need to control on-line the user statuses defined both for header and item level in quotations and sales orders VA21-VA22 VA01-VA02.
For instance if header status is X item status cannot be Y. Or if item status cannot change from Y to Z if item is rejected (VBAP-ABGRU).
Aditionnaly we would like to gray the items statuses but userexit_field_modification seems not to work in the status tab to gray the statuses.
Thank you very much
MaximilianoHi Martin
There is an option for mainayaining the profile for change master record in spro.
You can assign the status profile you had defined to the change master record profile. The it will be automatically populated for the end user.
Regards
Prasad K -
Rational Robot Test Scripts for Oracle Application Vanilla Instance
Hi,
Does anybody have Rational Robot Test Scripts for Oracle Applications Vanilla Instance. We are in the process of automating testing. But for the same, we need to have the test scripts for the standard functionalities/flows.
Any help would be highly appreciated.
kanjurmHi;
I belive there is no sch a script as you mention. Please log a SR for your request
Regard
Helios -
Can anybody provide AIX shell script for Oracle Apps R12 instance backup
Hi
Can anybody provide AIX shell script for Oracle Apps R12 instance backup? Manually, i am able to backup but i donot have shell script to schedule through crontab.
Help me please.
ThanksRman can be used for Database, not for Application tier. Again, I assumed you are looking for a script to backup the database. For the application tier, you can simply do a filesystem backup.
I still do not understand your concern? Is it about using crontab? If so, then check here --> man crontab <-- -
Where can i find start/stop scripts for all SAP instances
Hi,
I installed CI, DB and Dialog instance on a standalone S10 machine and i could see start scripts under /sapmnt/RAM/profile
START_DVEBMGS09_hostSAP
START_D24_hostSAP
But i cann't see stop scripts for the above and also i cann't see start and stop scripts for SAP DB instance. Could some one point me where i can find them when everything is installed on a single box.
Thanks,
RamUSAGE: STARTSAP.EXE name=<SID> nr=<SYSNR> SAPDIAHOST=<host>
FURTHER INFORMATION:
- The executable sapstart.exe must be in the same directory
when you start sap instacne, it will check db instance first, if db instance not start , it will automatic start db instance then sap instance.
vice visa :
stopsap is alos can be used. -
Email CSQ status script for http trigger
Hello,
I have an email csq and need http trigger to monitor the emails, agents, calls etc
Does anyone have a basic script for it
Please let me know.
Thanks
KadsHi!
Can you please tell us who the initiator and the target for this call would be! You can of course have a UCCX script that initiates the call to a specific destination!
Also, please attach a screenshot of the script! Or at least the relevant part of it!
Thanks!
G! -
Need help creating script for specific instance
I am having trouble coming up with a working script for this part of the pricing form I am editing. I am trying to get the calculation fields to the right to change and populate in the respective field based on the selection in the Material Type dropdown. Would it be less of a headache if I made another text field to calculate the LE versions separately instead of trying to merge them into one field? I have attached screenshots below to give you an example of what I'm working with. Any help with this is greatly appreciated!
Script I'm tinkering with at the moment:
//Dropdown37 = Quantity Field
//Type of Door IB = Material Type dropdown
var x = this.getField("Type of Door IB").value;
if ( x = 1468 ) event.value = x * this.getField("Dropdown37").value;
if (x = 1202) event.value = x * this.getField("Dropdown37").value;
else event.value = 0;The comparison operator in JS is "==", so change this line:
if ( x = 1468 )
To this:
if ( x == 1468 )
(as well as the other if-statement). -
Script for getting mail if database is down
Hi Friends,
OS Version : IBM AIX 5,2
Oracle version : 9.2.0.7
I am executing the following script for getting mail alert if database is down. some how the script is not working
check_stat=`ps -ef|grep ${ORACLE_SID}|grep pmon|wc -l`;
oracle_num=`expr $check_stat`
if [ $oracle_num -lt 1 ]
then
exit 0
fi
# Test to see if Oracle is accepting connections
$ORACLE_HOME/bin/sqlplus -s "/as sysdba" > /tmp/check_$ORACLE_SID.ora
select name from v$database;
exit
# If not, exit and e-mail . . .
check_stat=`cat /tmp/check_$ORACLE_SID.ora|grep -i error|wc -l`;
oracle_num=`expr $check_stat`
if [ $oracle_num -ne 0 ]
then
mailx -s "$ORACLE_SID is down!" [email protected] < /tmp/check_$ORACLE_SID.ora
exit 16
fi
I am saving this as .sh file and executing at command prompt. It is just hanging, but not throwing any error.
I would like to know if there is anything to be modified in the script or please provide me any such script. Thanks in advanceHI there.
I have a script I use that works really well. It sends out an email only if the database is down and also reads an ini file to process a blackout period and a priority level of the database... High priority databases are monitored every 5 minutes and Medium priority databases every hour.
There are two scripts, the shell script and the .ini file and I have two cron entries...
Check script:_
#!/bin/ksh
# check_oracle_status.sh
# Script to check if Oracle db's are up and running.
# Script is passed a priority field and reads check_oracle_status.ini
# to determine which db's to check. If db is down an email is sent.
# Priority Levels:
# H - Checks db's with "H"igh Priority every 5 minutes (cron)
# M - Checks db's with "M"edium Priority every hour (cron)
# L - db's with "L"ow Priority currently not checked
# Script Change History:
# ======================
# October 29th, 2009 - Initial Creation
# Set environment
export SCRIPTHOME=/opt/oracle/admin/scripts
export INIFILE=$SCRIPTHOME/check_oracle_status.ini
export PRIORITY=$1
. $HOME/.profile
db=`grep -i ":$PRIORITY" $INIFILE | cut -d":" -f1`
check_database()
sqlplus <<! > $SCRIPTHOME/check.out
/ as sysdba
select * from dba_data_files;
exit
grep ORA- $SCRIPTHOME/check.out > $SCRIPTHOME/error.out
if (( $? )); then
echo ""
else
mailx -s "Oracle instance $i is currently UNAVAILABLE" +<email address>+ < $SCRIPTHOME/error.out
fi
for i in $db ; do
fields=`grep $i $INIFILE | awk -F':' '{ total = total + NF }; END {print total}'`
export ORACLE_SID=$i
if [ $fields -gt 2 ]; then
BLACKOUT_START=`grep -i "$ORACLE_SID" $INIFILE | cut -d":" -f3`
BLACKOUT_END=`grep -i "$ORACLE_SID" $INIFILE | cut -d":" -f4`
CURRENT_HOUR=`date +%H`
CHECK_BASE=YES
if [ $BLACKOUT_START -gt $BLACKOUT_END ]; then
(( $CURRENT_HOUR >= $BLACKOUT_START || $CURRENT_HOUR <= $BLACKOUT_END )) && CHECK_BASE=
else
(( $CURRENT_HOUR >= $BLACKOUT_START && $CURRENT_HOUR <= $BLACKOUT_END )) && CHECK_BASE=
fi
if [ -n "$CHECK_BASE" ]; then
check_database
fi
else
check_database
fi
done
rm $SCRIPTHOME/check.out $SCRIPTHOME/error.out
INI File:_
oracle1:L
oracle2:M:17:08
oracle3:M
oracle5:M:17:08
oracle6:H
oracle7:M:17:08
oracle8:M
oracle9:M
Where oracle1,2,3 etc is your sid
L M and H your priority level
17 is blackout start (5 PM)
08 is blackout end (8 AM)
Note: Blackout is just a start hour and an end hour and must contain both or none and my script can only process one blackout per database. I guess if you
needed a second blackout you could add another line with different times for that sid
Cron entries:_
# Check Oracle Status
# The check_oracle_status.sh script monitors "H"igh priority databases every 5 minutes
# and "M"edium priority databases every hour
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/oracle/admin/scripts/check_oracle_status.sh H > /dev/null 2>&1
0 * * * * /opt/oracle/admin/scripts/check_oracle_status.sh M > /dev/null 2>&1
Not sure if you require blackouts or priority levels but this setup works great at our site.
Hope this helps.
Maybe you are looking for
-
One of my apps has recently updated. Now I cannot get into it. I am afraid if I delete it , it will lose its data. Help.
-
Ipod nano 1st generation with SW1.3.1 doesn´t work properly
as a positive thinking person I followed the recomendations in iTunes 7.5.. and downloaded SW 1.3.1 on my 1st generation nano. The consequnce was that this dammed thing now frequently stops playing(every few minutes max. 15 min). It either jumps back
-
How to backup from Time Machine of a different computer
I want to restore my emails from time machine from a different computer?
-
Down payment - Final Billing (F2) has value zero
Dear SD Gurus, For down payment, I have set up the necessary steps with ref to SAP help file. 1. Condition type AZWR in the pricing procedure with requirement as 2 (item with pricing) and the calculation formula 48 2. Copy control set up for Order ty
-
Hi ppl, I debugged my zmedruck form but unable to find the CST and TIN number for a vendor.My requirement is i need to display the CST and TIN number.So for this we need to write sub routines or is there any field which holds the value in zm