Where to put EM db console startup script?

I have 2-node RAC on Linux servers. All the services including database/listeners come up automatically after the Node reboot.
Oracle support confirmed that "db console" is not a part of auto-start script.
So I have to put together a script basically to do "emctl start dbconsole".
Need to know what is the best place/file to call this script, keeping in mind the CRS/database take sometime to comeup.
Thanks

Oh sorry. No, RAC don't use dbstart.
You probably have to come up with a simple script that just do emctl start.
For example, call this file oraem
modify based on the sample dbora script from Oracle doc.
#! /bin/sh  -x
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
case $1 in
'start')
        $ORACLE_HOME/bin/emctl start dbconsole &
'stop')
        $ORACLE_HOME/bin/emctl stop dbconsole &
        echo "usage: $0 {start|stop}"
        exit
esac
exit# chgrp dba oraem
# chmod 750 oraem
Test run it manually a couple of time make sure it works.
then link,
# ln -s /etc/init.d/oraem /etc/rc.d/rc3.d/K01dbora
# ln -s /etc/init.d/oraem /etc/rc.d/rc3.d/S99dbora

Similar Messages

  • Where to put "jbo.debugoutput=console" in WLS?

    Hi gang
    I'd like to turn the ADF BC debug output on via the "jbo.debugoutput=console" flag, for a standalone WebLogic Server (WLS) 10.3 ADF 11g application install.
    Section 6.3.7 of the Fusion 11g guide shows how to turn this on via JDeveloper (http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcqueryresults.htm#CHDBBEEB), but how do I turn it on for an application deployed to WLS? Is there a WLS console feature available for doing this?
    Cheers,
    CM.

    They normally are written into the tmp directory. You should get a message like Diagnostics: (Properties (re)loaded) Routing diagnostics to File: /tmp/bc4j61464.log in your server log file.
    The files are all names bc4jnnnn.log at some points in the application live cycle new files are generated automatically. So you have to check the log to find the actual one.
    Timo

  • Gpo computer startup scripts not running

    Hi,
    I´m making some test with a windows 7 pro 64 bit computer and a 2008 r2 domain controller where I have created a computer startup script. I give you more info:
    Domain functional level: 2008 R2
    DC: 2008 R2
    Client: Windows 7 pro x64
    Gpo: Computer configuration -> Windows configuration -> Script -> Startup
    Type of script: bat file copied on \\domain_name\SysVol\domain_name\Policies\{461E688A-E8F8-4C9B-8419-FE83DCDD4C26}\Machine\Scripts\Startup
    The windows 7 machine is full updated, windows firewall disabled, uac disabled, windows defender disabled.
    The bat file works and the gpo is applying, i have seen it via gpresult, another gpo which is in a top level works fine.
    I need some help please, because I don´t know what to try.
    Thanks in advance.

    Hello Egoitz28,
    Do you mean that you add the bat file in the startup group policy and gpresult shows that it is applied, but the bat is not run?
    Please share us the bat file to test.
    Logon/Logoff scripts could only be applied to users, whereas Start-up/Shutdown scripts applies to computers.
    I create a test.bat start %windir%\system32\notepad.exe, and add it to the User Configuration->Policies->windows Settings->Scripts->Logon in the Default domain policy. And it works.
    If I create in the startup policy in Computer configuration, I can see it in the gpresult, but it doesn’t work.
    Please test if the bat works in the Logon policy.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Bypassing startup script in .cshrc.user file for console login

    Hi,
    I'm calling a startup script in my .cshrc.user file. How do I bypass the startup script if it is a console login. Other cases like telnet, rlogin or opening a new terminal should go through the startup script.
    Thanks,
    Ramkumar

    Short note; instead of ..
    echo `tty` >> testfile
    you could just do..
    tty >> testfile
    .. since the "tty" command sends its output to STDOUT, same as "echo", and >> takes the STDOUT and puts it in a file.
    Anyway, what does "tty" give you if you run it on the console?
    //Magnus

  • FCP-specific startup script, where is it?

    History: More than 10 months ago, I imported five clips that were mounted on a remote server. I discovered my mistake, copied them to a local drive and reconnected the new media.
    Ever since then, across several updates to FCP5 and the upgrade to FCS2/FCP6, launching FCP gives me five server connection screens that must each be dismissed before the app will fire up.
    No, I'm not going to wipe my drive and do a scorched-earth reinstall of everything. I'm just looking for any one who thinks they know where I might look for the script that invokes the server searches. Startup scripts are easy to find for Adobe products, not so much for Apple's.
    bogiesan

    Cookman:
    I've got a harebrained idea: Take the machine offline from the server. Reboot. Open FCP. Do you get the message that things are missing? (like the server?) If so, re set the scratch disk, even if you set it to what it already was.<</div>
    Unplugging the ethernet merely results in five boxes that tell me the server cannot be found or doesn't exist. Restarting the computer didn't change anything. Resetting the scratch disk didn't change anything either but I didn't expect it to; this really is not a Scratch Drisk issue. The server was never actually designated as a scartch disk, it just had media on it that got imported. However, I replaced the media in the project and deleted all refrences to the external media AND why does the application keep asking for the server?
    Mees:
    this was a culprit specifically identified earlier as being responsible for Scratch Disc settings ... don't know if that helps any? ~/Library/Preferences/Final Cut Pro User Data/Final Cut Pro 6.0 Prefs<</div>
    I have not yet deleted this file, trying that next. Just wanted to say that searching the file's contents reveals no references to: connect, ethernet, server, name of the server, names of folders on the server. The IP address of the server is not in this file either.
    bogiesan

  • Admin console VS Startup Script

    Hi!
    I'm very confused about this subject. I understand that Admin console uses Node Manager to start/stop managed server, but i dont't understand why using Admin Console the Managed Server is started with JRockit and via startup script is started with Sun JDK.
    Thanks a lot
    Best regards

    Hi,
    When starting the managed servers from the admin console, you are indeed using the Node Manager. But in this scenario, the NM is using the properties defined in the startup properties for each of the managed servers, not the properties defined in the startup scripts. If you want Node Manager to use the startup scripts when starting the managed servers, you must change the value of the "StartScriptEnabled" parameter to "true" in the /wlserver/common/nodemanager/nodemanager.properties file.
    I hope this helps.
    Regards!
    Edited by: Radu Dobrinescu on Dec 14, 2010 1:23 AM

  • Group Policy - Computer Startup Scripts - Add/Set Default printer

    Good Morning.
    Let's say we have 2 offices, A and B, and only 1 user.  The user is using Roaming Profiles.  Each office has its own printer.
    What I am trying to do, is make a Startup script that is specific to the COMPUTER being logged into so when any user logs into that computer, they get the printer in that office defined and set as default.
    I am able to do this successfully with my script but ONLY if i have the script be on the USER side of GP (i.e. in the Logon script section)
    That is great that that is working however, when my user goes to Office B, they still get mapped to Office A's printer if I use that method.
    So I figured I could just modify my GP and run the same script from the STARTUP section of the computer, rather than the LOGON section of the user.  It does not work.
    Here is my script:
    Set WRFCUNetwork = CreateObject("Wscript.Network")
    PrinterPath = "\\fileserver\MAINTELLER"
    PrinterDriver = "PrinterDriver"
    WRFCUNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
    WRFCUNetwork.SetDefaultPrinter "\\fileserver\MAINTELLER"
    This is where I Have the script placed:
         Computer Configuration -> Windows Settings -> Scripts(Startup/Shutdown)
    Once i'm in there, I double click Startup, click Add, and select my script which is named:
         MainPrinterSetup.vbs
    I have this GP applied to ONE OU, and that OU has ONE computer in it (my test computer)
    I login with a brand new user called "testuser" (creative, huh?) and basically nothing happens
    except they log in and have some Microsoft Document Image Writer printer set as default (which by the way sure does slow the PC down to the point of it almost being broke if anyone actually tries to print to that by accident)
    No Main Teller Printer, no anything.
    The strangest part about this is, if i apply this script to the user LOGON scripts, it works fine, the printer is there, and is set as default. (but see above why that wont work for my situation)
    So obviously the script works fine, but I guess i'm missing something when it comes to applying GP's to Computers rather than Users.
    Can anyone shed some light as to why the script is not running (i'm guessing the script isn't even attempting to run, rather than failing, but i have no way to know that)
    Thank you in advance!!
    Derek Conlon
    Network Administrator
    WRFCU
    EDIT:  Here are the PC's info that i'm working on:
         Server:  Windows Server 2003 Standard Edition (where my GP's are created and managed with AD)
         Target PC:  Windows XP Professional SP3
    EDIT #2:  I manually navigated to the Script file after logging in and "opened" it and it added and set the default printer no problem.  the issue is definately with the script running at startup.

    I wanted to clarify a few things:
    1. While it is true that printer connections are usually per user, it is definitely possible to create "global printers".  There are a number of ways to do this, but two methods that come to mind are using:
    a. "Rundll32 printui.dll,PrintUIEntry" option with the "/ga" switch.  The "/ga" switch is the key here since it allows you to deploy printers "per machine" instead of "per user".  More information
    about this is available at:
    http://members.shaw.ca/bsanders/NetPrinterAllUsers.htm
    http://technet.microsoft.com/en-us/library/ee624057%28WS.10%29.aspx
    http://www.computerperformance.co.uk/Logon/logon_printer_computer.htm
    http://www.robvanderwoude.com/2kprintcontrol.php
    b. The Print Management console that is available in Windows 2003 R2 and higher can help you deploy printers "per machine" in addition to "per user".  More information about this is available at:
    http://www.czsolution.com/print-management/print-management/print-management-console.htm#DeployingPrintersByGroupPolicy
    http://technet.microsoft.com/en-us/library/cc753109%28WS.10%29.aspx
    2. As Guy mentioned, Group Policy Preferences can help set the default printer.  But there is another way to accomplish this.  The problem with the computer startup portion is that it runs before the user logs in.  And applying this script
    in the login script section would not work per computer unless you used loopback processing.  So another way to do this is to place a script that sets the default printer into the "All Users" startup folder.  Items in the "All Users"
    startup folder run for any user that logs into the computer, but it runs in the user's context.  So, this script would effectively set the default printer on a "per machine" basis.  The script method is a cruder way to approach the problem,
    but it will help get the job done.  Here are some resources on setting the default printer via script:
    http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script
    http://www.computerperformance.co.uk/ezine/ezine17.htm

  • Startup script to load shortcuts - in a Citrix environment

    Let me offer a sample of what I have and ask if anyone knows how to fill in the gaps.
    For starters, a listening script upon booting up InDesign:
    #target InDesign
    #targetengine session
    //collect the name of current user
    var userName = getUser();
    function getUser() {
    var myUser = ($.os.substring(0, 7)=="Windows")
      ? $.getenv("USERNAME")
      : $.getenv("USER");
    return myUser;
    // var startupScriptsFolder = "/z/Scripting/Startup scripts/";
    var startupScriptsFolder = "/Applications/Adobe InDesign CC/Scripts/startup scripts/";
    var startupScriptFiles = Folder(startupScriptsFolder).getFiles();
    for (var i = 0; i < startupScriptFiles.length; i++) {
        app.doScript(startupScriptFiles[i]);
    then the script itself:
    #target InDesign
    #targetengine session
    //get or create folder for script preferences
    var scriptPrefsFolderPath = "/Users/madmac55/Library/Preferences/Adobe InDesign/Version 9.0/en_US/InDesign Shortcut Sets/";
    if (Folder(scriptPrefsFolderPath).exists == false) {
            Folder(scriptPrefsFolderPath).create();
    var locationPrefsFilePath = scriptPrefsFolderPath + "/ MyShortcuts.indk";
    This hasn't worked for me and it's a hacked solution at best.  So I am wondering how to get it all to click.  In a Citrix environment (windows), Adobe puts the preferences in a hidden folder path ~/AppData/Roaming/   and this is where it's tough to find them — on the server(s) you land on.
    Because you land on an arbitrary server, you have to run the getUser statement first, then drill down inside.  I realize I have mixed paths of  Mac & PC, and I'm really writing abiout a PC environment, but paths are interchangeable.  It's the script that counts.

    Hey Mac,
    I'm not sure if this will work for you as I've only used it when making .bat files... but, in Windows, you can reference the folder directly by using the variable "%USERNAME%"
    C:\Users\%USERNAME%\AppData\Roaming\Adobe\InDesign\Version 5.0\Scripts\Scripts Panel\
    Hope it helps.

  • Missing STARTUP script for upgrade program

    Hi Experts,
    We are performing a upgrade from 4.7 to ERP6. From the documentation, it mentioned starting the upgrade program using the STARTUP script on the upgrade master. But I was unable to locate this STARTUP file on the upgrade master that is shipped to us.
    We are using SAP ERP 6.0 upgrade master (D51033520). May I know where can I get this STARTUP program?
    Thanks in advance,
    Tzyy Ming

    Hi Lee,
    You have to follow below command to run upgrade program:
    1) Go to upgrade directory
    2) Then run /<DVD mount directory>/PREPARE
    3) Then you can run PREPARE from here.
    Once PREPARE finishes. You can run upgrade assistant from upgrade directory:
    Run java -cp <upgrade directory>/ua/ua.jar UaServer
    When upgrade assistant server console shows you Ready
    Then run java -cp <UaGuiDir>\uagui.jar UaGui to start upgrade GUI.
    Thanks
    Sunny

  • I can't get Photoshop CS6 startup script to works ?

    Hi!
    I'm trying to get a script to execute each time photoshop cs6 is started. I've tried to put it in that folder ( Photoshop-CS6-Scripting-Guide.pdf page 10) C:\Program Files\Common Files\Adobe\Startup Scripts CS6\Adobe Photoshop but it doesn't start ... If I put it in there C:\Users\[USERNAME]\AppData\Roaming\Adobe\Bridge CS6\Startup Scripts it loads when I start BridgeCS6 but it fails as it's a script done for photoshop. So I try to put it in C:\Users\[USERNAME]\AppData\Roaming\Adobe\Photoshop CS6\Startup Scripts but didn't work as I was expecting ;o) .
    I don' think it matters but my OS is in french but photoshop is in english.
    So where is the proper place ?
    cheers

    Yes Startup Scripts is a Bridge thing.  If you open Bridge and use menu Edit>Preferences you will see Startup Scripts in the left pane if highlight that the right pane will contain a check box list of startup scripts you can enable.
    Photoshop has a script event manager. Script and action can be start automatically when an event occurs. They will not start if a a started event process has not finished nesting will not happen. So on an event like start application, new document, open document a script or action can be set to run.
    I never tried setting one up for start application but Photoshop ships with one named clean listener which could be useful. Find it in:
    presete\scripys\Event Scripts Only. And menu>File>Scripts>Scripts Event Manager

  • AIX Startup Scripts

    Dear All
    Can I have a IBM AIX DB Startup Scripts ?
    Regards
    Lakmal

    put
    Orastart:2:wait:/usr/local/bin/changedbstatus_ora start all FORCE> /dev/console 2>&1
    at the end of /etc/inittab
    and
    /usr/local/bin/changedbstatus_ora stop all FORCE
    in /etc/rc.shutdown
    where changedbstatus is similar to the following
    [haiti]/db_masters $ cat changedbstatus_ora
    #!/bin/sh
    # usage: changedbstatus_ora start|stop
    # This script is used to start or stop ORACLE
    # $1 = Start, Stop, or reset_logs
    # $2 = SID to start or stop (can be all)
    # $3 = FORCE Force a shutdown or startup
    # if $2 is not specified it defaults to all. this allows autostart/stop during
    # system startup/shutdown
    # Written by Graham Myers, Coda plc, (c) 2001
    # fn_determine_version
    # returns VERSION (7.3.4, 8.1.7, 9.2.0 etc)
    fn_determine_version() {
    set +x
    if [ -f ${ORACLE_HOME}/bin/sqldba ]
    then
    VERSION=`sqldba command=exit | \
    awk '/SQL\*DBA: (Release|Version)/ {split($3, V, ".") ; print V[1]}'`
    elif [ -f ${ORACLE_HOME}/bin/svrmgrl ]
    then
    VERSION=`$ORACLE_HOME/bin/svrmgrl command=exit | awk '
    /PL\/SQL (Release|Version)/ { print substr($3,1,5); exit }
    /Oracle7 Server (Release|Version)/ { print substr($4,1,5); exit }
    /Oracle8i Enterprise Edition (Release|Version)/ { print substr($5,1,5); exit }
    /Oracle8i (Release|Version)/ { print substr($3,1,5); exit }'`
    else
    VERSION=`$ORACLE_HOME/bin/sqlplus -? | awk '/SQL\*Plus: Release/ {print substr($3,1,5); exit }'`
    fi
    VERSION_MAJOR=`echo ${VERSION} | cut -d. -f1`
    # fn_determine_os - determine whioh operating system we're using, returns:
    # BITS - no of processor bits 32 or 64
    # ORATAB - set to correct path of oratab file
    fn_determine_os() {
    set +x
    ORATAB=/etc/oratab
    case `uname` in
    SunOS)
    BITS=`isainfo -kv | cut -d"-" -f 1`
    ORATAB=/var/opt/oracle/oratab;;
    HP-UX)
    BITS=`/bin/getconf KERNEL_BITS`;;
    AIX)
    BITS=`/usr/sbin/bootinfo -K`;;
    OSF1)
    BITS=64;;
    esac
    # fn_check_status - check instance status
    # Returns STATUS (1=running, 0=not running)
    fn_check_status() {
    set +x
    #Check to see if instance shutdown cleanly (or is still running)
    STATUS=0
    if [ ${VERSION_MAJOR} -ge 8 ]
    then
    [ "`ps -ef | egrep pmon_${ORACLE_SID} | grep -v grep`" != "" ] && STATUS=1
    else
    [ -f ${ORACLE_HOME}/dbs/sgadef${ORACLE_SID}.dbf -o \
    -f ${ORACLE_HOME}/dbs/sgadef${ORACLE_SID}.ora ] && STATUS=1
    fi
    # fn_cmd_file - Create a UNIX command script
    # inputs $1 command - begin create a new command file
    # begin_agent start an angent comamnd file
    # command actual comamnds to place in command file
    # start_sql run up the relevent SQL processor
    # stop_sql exit out of SQL processor
    # end finish off command file
    fn_cmd_file() {
    set +x
    case $1 in
    begin | begin_agent)
    CMD_FILE=/tmp/changedbstatus.tmp$$
    RDBMS_HOME=`grep oracle /etc/passwd | awk -F: '{print $6}'`
    # Make sure the correct verion of Oracle is defined at login
    if [ "$1" = "begin" ]
    then
    echo "Oracle_${VERSION}(${ORACLE_SID})" > ${RDBMS_HOME}/.rdbms_defaults
    else
    echo "Oracle_10.1.0(agent)" > ${RDBMS_HOME}/.rdbms_defaults
    fi
    echo "unset TWO_TASK" >> ${CMD_FILE};;
    start_sql)
    case "${VERSION}" in
    "7") SQL_COMMAND="sqldba";;
    "7.3.4"|"8.0.5") SQL_COMMAND="svrmgrl";;
    *) SQL_COMMAND="sqlplus /nolog";;
    esac
    echo "${SQL_COMMAND}<<EOF" >> ${CMD_FILE}
    echo "connect / as sysdba" >> ${CMD_FILE};;
    command)
    shift
    echo "$*" >> ${CMD_FILE};;
    end_sql)
    echo "EOF" >> ${CMD_FILE};;
    end)
    chmod 755 ${CMD_FILE};;
    esac
    # fn_execute_cmd_file
    # PLEASE NOTE the strange way of eching the session to the display rather than
    # using tee. For some reason agentctl does not "let go" of the session and
    # tee hangs. This is a documented "non-bug" for tnslsnr on 8i but nobody has
    # has reported it for agentctl for 9i
    # $1 should be a message to write to the screen prior to execution so the user
    # has an indication something is happening
    fn_execute_cmd_file() {
    set +x
    echo $1
    su - oracle -c ${CMD_FILE} > ${CMD_FILE}.log 2>&1
    RETURN_STATUS=$?
    cat ${CMD_FILE}.log
    # Scrap the defaults file after the command script has run
    rm ${RDBMS_HOME}/.rdbms_defaults ${CMD_FILE}
    # fn_reset_logs - rename existing log, create a new one, and purge old ones
    # if $1 is non blank then it is assumed to be embedded in another command
    # and so will not start a new command file (or execute it)
    fn_reset_logs() {
    set +x
    if [ "$1" = "" ]
    then
    fn_cmd_file begin
    fn_cmd_file command set +x
    fi
    if [ ${VERSION_MAJOR} -ge 9 ]
    then
    fn_cmd_file command "dmp_dest=\`grep background_dump_dest $PFILE|awk -F\"'\" '{print \$2}'\`"
    else
    fn_cmd_file command "dmp_dest=\`grep background_dump_dest $PFILE|awk '{print \$3}'\`"
    fi
    fn_cmd_file command "cd \${dmp_dest}"
    fn_cmd_file command "dmp=alert_\${ORACLE_SID}.log"
    fn_cmd_file command "new_dmp=\${dmp}.\`date +%y%m%d\`"
    fn_cmd_file command "if [ -f \${new_dmp}.Z ]"
    fn_cmd_file command "then"
    fn_cmd_file command " zcat \${dmp} >> \${new_dmp}"
    fn_cmd_file command " rm \${dmp} \${new_dmp}.Z"
    fn_cmd_file command "else"
    fn_cmd_file command " mv \${dmp} \${new_dmp}"
    fn_cmd_file command "fi"
    fn_cmd_file command "compress \${new_dmp}"
    fn_cmd_file command "find ./ -name "\${dmp}.*" -mtime +30 -print -exec rm {} \\\+"
    fn_cmd_file command "find ./ -name "/tmp/changdbstatus*" -mtime +2 -print -exec rm {} \\\+"
    if [ "$1" = "" ]
    then
    fn_cmd_file end
    fn_execute_cmd_file "reseting log files..."
    fi
    # fn_start_agent - Start the 10g intelligent agent
    # This is only done once and only if a 64-bit server
    fn_start_agent() {
    set +x
    fn_cmd_file begin_agent
    fn_cmd_file command emctl start agent
    fn_cmd_file end
    fn_execute_cmd_file "Starting Intelligent Agent..."
    # fn_stop_agent - Stop the 9i intelligent agent
    # This is only done once and only if 64-bit server
    fn_stop_agent() {
    set +x
    fn_cmd_file begin_agent
    fn_cmd_file command emctl stop agent
    fn_cmd_file end
    fn_execute_cmd_file "Stopping Intelligent Agent..."
    # fn_start_database - Start database
    fn_start_database() {
    set +x
    fn_cmd_file begin
    fn_cmd_file command set +x
    fn_reset_logs include
    fn_determine_listener
    [ "`ps -ef | egrep ${LISTENER_NAME} | grep -v grep`" = "" ] && fn_cmd_file command lsnrctl start ${LISTENER_NAME}
    fn_cmd_file start_sql
    fn_cmd_file command startup
    fn_cmd_file end_sql
    #We now use an Oracle 10g Enterprise manager which does not support Oracle 8i agents so don't start them
    # if [ ${VERSION_MAJOR} -lt 9 ]
    # then
    # # start the intelligent agent and data gatherer
    # fn_cmd_file command vppcntl -start
    # fn_cmd_file command lsnrctl dbsnmp_start
    # fi
    fn_cmd_file end
    fn_execute_cmd_file "Starting instance ${ORACLE_SID}..."
    # fn_stop_database - Stop database $1 passed as abort if required
    fn_stop_database() {
    set +x
    fn_cmd_file begin
    if [ "${ALL_DATABASES}" = "Y" ]
    then
    #We now use an Oracle 10g Enterprise manager which does not support Oracle 8i agents so they haven't been started
    # if [ ${VERSION_MAJOR} -lt 9 ]
    # then
    # # stop the data gatherer and agent
    # fn_cmd_file command vppcntl -stop
    # fn_cmd_file command lsnrctl dbsnmp_stop
    # fi
    fn_determine_listener
    [ "`ps -ef | egrep ${LISTENER_NAME} | grep -v grep`" != "" ] && fn_cmd_file command lsnrctl stop ${LISTENER_NAME}
    fi
    fn_cmd_file start_sql
    fn_cmd_file command shutdown $1
    fn_cmd_file end_sql
    fn_cmd_file end
    fn_execute_cmd_file "Stopping instance ${ORACLE_SID}..."
    # fn_determine_listener - work out listener name
    # For 8i it will be listener_817
    # For 9i it will be listener_<hostname> as we use MTS
    # on 9i and only need the listener for OEM.
    fn_determine_listener() {
    set +x
    LISTENER_NAME=`grep "SID_LIST_" ${TNS_ADMIN:-$ORACLE_HOME/network/admin}/listener.ora | \
    cut -d "_" -f 3- | cut -d "=" -f 1`
    (trap 'exit' 1 2 3
    set +x
    fn_determine_os
    ORIGINAL_ORACLE_HOME=${ORACLE_HOME}
    ORIGINAL_ORACLE_PATH=${ORACLE_PATH}
    ORIGINAL_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
    ORIGINAL_PATH=${PATH}
    if [ "$3" = "FORCE" ]
    then
    FORCE=Y
    else
    FORCE=N
    fi
    if [ "$2" = "all" -o "$2" = "" ]
    then
    FILTER="tee /dev/null"
    ALL_DATABASES=Y
    #if $2 is null then we are in system startup/shutdown - so force db start/stop
    # this will get around any rogue files maybe due to a previous crash
    [ "$2" = "" ] && FORCE=Y
    #if we are starting all databases then assume we are starting everthing fresh
    # so start the intelligent agent
    if [ \( "$1" = "start" -o "$1" = "START" \) -a "${BITS}" = "64" ]
    then
    fn_start_agent
    fi
    else
    FILTER="grep ^$2:" #Only apply filter if not all
    ALL_DATABASES=N
    fi
    grep -v "^#" ${ORATAB} | ${FILTER} | awk -F: '{print $1,$2,$3}' | \
    while read ORATAB_SID ORATAB_HOME ORATAB_START
    do
    ORACLE_SID=${ORATAB_SID} ;export ORACLE_SID
    ORACLE_HOME=${ORATAB_HOME} ;export ORACLE_HOME
    PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc ;export PATH
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ORACLE_HOME}/lib ;export LD_LIBRARY_PATH
    fn_determine_version #Work out which version of Oracle is required
    if [ ${VERSION_MAJOR} -ge 9 ]
    then
    PFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora
    else
    PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
    fi
    if [ -f ${PFILE} ]
    then
    fn_check_status #See if instance is already running
    case $1 in
    start | START )
    if [ ${STATUS} -eq 1 ]
    then
    if [ "${FORCE}" = "Y" ]
    then
    echo Instance ${ORACLE_SID} already running - forcing shutdown
    fn_stop_database abort
    else
    echo Instance ${ORACLE_SID} already running
    continue
    fi
    fi
    if [ "${ALL_DATABASES}" = "Y" -o \( "${ORATAB_START}" = "Y" -a "${ALL_DATABASES}" = "N" \) ]
    then
    fn_start_database
    if [ ${RETURN_STATUS} -eq 0 ]
    then
    echo "Instance ${ORACLE_SID} started."
    else
    echo "Instance ${ORACLE_SID} NOT started."
    fi
    else
    echo "Instance ${ORACLE_SID} NOT started."
    fi;;
    stop | STOP)
    if [ ${STATUS} -eq 0 ]
    then
    if [ "${FORCE}" = "Y" ]
    then
    echo Instance ${ORACLE_SID} already shutdown - forcing shutdown
    fn_stop_database abort
    else
    echo Instance ${ORACLE_SID} already shutdown
    continue
    fi
    else
    fn_stop_database IMMEDIATE
    if [ ${RETURN_STATUS} -eq 0 ]
    then
    echo "Instance ${ORACLE_SID} shutdown."
    else
    echo "Instance ${ORACLE_SID} NOT shutdown."
    fi
    fi;;
    reset_logs)
    fn_reset_logs;;
    esac
    else
    echo ""
    echo "Cant find init file for instance ${ORACLE_SID}."
    fi
    done
    #if we are shutting down eveything then close down the agents too
    if [ "${ALL_DATABASES}" = "Y" -a \( "$1" = "stop" -o "$1" = "STOP" \) -a ${BITS} = 64 ]
    then
    fn_stop_agent
    fi
    ORACLE_HOME=${ORIGINAL_ORACLE_HOME};export ORACLE_HOME
    ORACLE_SID=${ORIGINAL_ORACLE_PATH};export ORACLE_SID
    LD_LIBRARY_PATH=${ORIGINAL_LD_LIBRARY_PATH};export LD_LIBRARY_PATH
    PATH=${ORIGINAL_PATH};export PATH
    for VARIABLE in FILTER ORATAB_HOME ORATAB_SID ORATAB_START STATUS ORATAB \
    PFILE SQL_COMMAND VERSION RETURN_STATUS RDBMS_HOME \
    LISTENER_NAME FORCE ALL_DATABASES VERSION_MAJOR \
    BITS LISTENER
    do
    unset ${VARIABLE}
    done
    unset VARIABLE) 2>&1 | tee /tmp/changedbstatus_ora.log
    regards
    Graham

  • All versions of InDesign:  startup script?

    While I am working the other problem I am having with my script (see my addition to the forum on 2 September 2008), I thought I might query the forum for one more piece of information? The script I am working on I will want to run every time InDesign is opened. I looked at the Events chapter in the CS3 reference manual, and though it is a powerful tool, it seems to only address events after InDesign is up and running. Is there a way to make InDesign run a script automatically, right after opening up? Additionally, I will want to run this script in all three versions of InDesign. I'll bet that if I just name a script with a certain name and put it in the correct folder, the problem will be taken care of (I seem to remember the same mentioned at a seminar I attended), but I cannot find the documentation that tells me what the name is or where it (the script) should be stored.
    TIA!
    John

    Note from the original poster:
    It turns out that in CS3, the folder is called "Startup Scripts." The same name does not seem to work for CS, though I have not tried it yet for CS2.

  • How do I sound an alarm if a thread fails to start from the weblogic startup script?

    Here's the problem. I have a critical java program for my web app that
    is its own thread and is started by the weblogic startup script when
    the weblogic server is started. The constructor of this thread will
    throw exceptions and send out emergency emails to the Sys Ops people
    if it cant instantiate itself correctly. The only time that it wont be
    able to do that is if it cant read the email property from a config
    file to know where to send sys ops email to. In that situation what
    would be the best way to alert someone that the thread failed to
    start?

    [email protected] (Mike Lomage) wrote in message news:<[email protected]>...
    ... The only time that it wont be
    able to do that is if it cant read the email property from a config
    file to know where to send sys ops email to. In that situation what
    would be the best way to alert someone that the thread failed to
    start?My 2 cents worth:-
    1) Post a console message to the admin (thro' net send in NT).
    2) Hard code a default email address (easiest).
    drit
    Freelance Java Developer / Code Inspector
    http://www.geocities.com/doc_i_t/CodeInspectionService.html

  • Where to put javascript code?

    Hello,
    I am trying to set some columns in a list as "read-only" and is using the following code:
    <script type=”text/javascript”>
    function SetReadOnly()
    var elements=document.getElementById(’4_ctl00_ctl00_TextField’);
    elements.readOnly=true;
    _spBodyOnLoadFunctionNames.push(“SetReadOnly()”);
    </script>
    But I am not sure where to put the code in. Should I put it in the space in Content Editor Web Part,
    or through a link to a txt file, or in "Edit HTML"? I've tried them but none works.
    Thanks a lot!
    Patrick

    You can try this:
    1) Open your Sharepoint List. Go to List edit view.
    2) On right side of Ribbon you will find "Form Web Parts" option as shown in figure.
    3) Choose your List form which you want to edit.
    4) Now you can add web part in new window.
    5) Add Content Editor Web part.
    6) In content editor web part add the path of your "txt" file in which you have written your script, for eg.
    <!DOCTYPE html>
    <html>
    <body>
    <script type=”text/javascript”>
    function SetReadOnly()
    var elements=document.getElementById('4_ctl00_ctl00_TextField');
    elements.readOnly=true;
    _spBodyOnLoadFunctionNames.push("SetReadOnly()");
    </script>
    </body>
    </html>
    I haven't tried this method so I am not sure but hope it works...:D
    ***If my post is answer for your query please mark as answer***
    ***If my answer is helpful please vote***

  • Office 2010 setup thru computer startup script

    I am trying to install Office 2010 (sp2 seperate in the updates folder) thru group policy startup script and configured with OCT .msp file. Also try to start Access Runtime 2010 with SP2 update in the updates folder.
    In group policy set run scripts asynchronisely disabled and run scripts visible enabled otherwise i could not see what the system was doiing also not when configiguring OCT with full display. The gpo settings lets the screens show during install so the user
    can see what happens.
    There is another problem that rises however: I have made 2 batchfiles and both are starting as a computer startup script in seperate gpo's (that is in another post). First the Accessruntime is installing, after that Office 2010 is running. Both are installed
    after login but only one of the 2 have SP2 installed (7015) in this case Accessruntime has it. When i run only the Office 2010 install and not the Accesruntime 2010 then Office 2010 standard has also SP2 installed (version 7015). When running both only Runtime
    has this sp2 and Office has 4763 this is without sp2 i believe.
    In both folders (Office en Runtime) are the update files .msp in the updates folder of the installation, so thats ok.
    Why is only 1 of the 2 installing the SP2 when running both?
    A second thing is when restarting the system and before the login screen appears a message: Upgradepatch cannot be installed by Windows installer becasue the upgraded program does not excist of the upgradepatch is not suitable for this program?
    Here is part of the batchfile:
    IF EXIST "c:\program files\Microsoft Office\Office14\WINWORD.EXE" (goto mkfile) ELSE (goto DeployOffice)
    :mkfile
    ECHO Office 2010 is reeds geinstalleerd>c:\temp\office.txt
    goto end
    :DeployOffice
    call cscript \\sharename\office2010\Offscrub03.vbs ALL /bypass 1 /q /s /NoCancel
    start /wait %DeployServer%\setup.exe /adminfile %DeployServer%\officeconfig.msp
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
    Another batchfile
    start \\sharename\accessruntime2010\setup.exe /config \\share\accessruntime2010\config.xml
    REM echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
    freddie
    after installing both runtime and office both have SP2 in updates folder:
    runtime 4763
    Office 2010: 7015
    So in this example runtme is installed without the SP2. installing runtime alone gives with SP2...
    The message is gone. There was a other policy inherited from above that caused the message. The only problem now is that when installing both, runtime 2010 with SP2 files and Office 2010 with SP2 files, then one of the two don't get the Sp2 installed, why
    is that?

    > In the bat file, I have a line that records if the install completes
    > successfully or failed.  I don't have any other logging in my
    > script.  Are you referring to something like GPO logging? I know that
    > the script runs because when I am looking at one of the PCs, I can
    So it is NOT GP related but rather your script fails?!? Put some "echo
    %~n0 %date% %time%>>Log-File-Of-Your-Choice.txt" in it to check what's
    going on. And put ">>Log-File-Of-Your-Choice.txt 2>&1" at the end of
    critical commands to capture their output.
    > I ran the gpresult /h command which shows all User Configuration
    > policies, but NOTHING appears under the Computer Configuration section.
    Admin commandline? If not, you don't see computer settings :)
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))
    Martin,
    I still did not figure out why the installation script did not work for some of the PCs, even though the PCs have the same image.  For the ones that don't work, I will install manually.  Can you please look at the screenshots of the GPO
    settings I am using, and let me know if there is any settings that I need to remove or add?
      Thanks

Maybe you are looking for

  • Apple TV Gen 3? Video issues

    Recently on 11-29-2014 I purchased a brand new Apple TV from Target. I finally had some time to set it up today 12-4-14. I bought a pack of brand new HDMI cables and hooked the Apple TV up to the nice new LG 40" LED TV that I have in my room. I plugg

  • DW MX trouble with loading PDF files

    I'm using Dreamweaver MX on an XP Pro machine and have trouble loading pdf documents to my web pages. It cooperates intermittently. I'm using a virtual pdf printer to convert word documents to pdf, then saving them to my website folder, selecting the

  • PIRs not shown in MD04

    Hi Experts, I have created Planned Independent Requirements (PIR) to the material but which are not reflected in Stock Requirement List (MD04).  What could be the reasons? Best answers will be rewarded. Thanks & Regards, Surya 9000440032

  • C03 Error - 1.5 Months after activation date still...

    Hi, I ordered BT vision and broadband back at the start of April. Activation date was 21st April. Broadband worked straight away but I received the c03 error on my bt vision service. 9 Calls later still no further forward. Each call they helpline peo

  • How to simulate HOST command from DB Procedure

    Hi, I'm using Oracle 9.2 database on Win2000 PC. I need to start .bat file from a database procedure. More generaly how to simulate HOST command that I'm using from Forms6i. Thanks,