Starting/Stopping 9iAS Infrastructures with batch files
I created the following two batch files to start and stop my iAS Infrastructure. I found that if I used the services settings of automatic, all did not go well.
start.bat:
@ECHO OFF
cls
ECHO About to start the listener
net start Oracle9ias_InfraTNSListener
ECHO About to start the database
net start OracleServiceIASDB
ECHO About to start the OID monitor
e:\ora9iasinfra\bin\oidmon start
ECHO About to start the OID server
e:\ora9iasinfra\bin\oidctl server=oidldapd configset=0 instance=1 start
ECHO About to start the website
net start Oracle9ias_infraEMWebsite
ECHO About to start opmn and OC4j
e:\ora9iasinfra\dcm\bin\dcmctl start -ct ohs
e:\ora9iasinfra\dcm\bin\dcmctl start -co OC4J_DAS
stop.bat:
@echo off
cls
ECHO About to stop the website
net stop Oracle9ias_infraEMWebsite
ECHO About to stop opmn and OC4j
e:\ora9iasinfra\dcm\bin\dcmctl shutdown
ECHO About to stop the OID server
e:\ora9iasinfra\bin\oidctl server=oidldapd configset=0 instance=1 stop
ECHO About to stop the OID monitor
e:\ora9iasinfra\bin\oidmon stop
ECHO About to stop the database
net stop OracleServiceIASDB
ECHO About to stop the listener
net stop Oracle9ias_InfraTNSListener
When I execute the batch files sometimes they work and sometimes they don't, for example after starting, occasionally the Apache process has not been created, and sometimes processes won't stop.
However if I enter each command seperatly all works OK. Can anyone suggest a reason for this, maybe ordering is significant or a time delay may be required between certain actions?. Also after starting the website manager the process managers for both the infra and ias instances are started (I have installed both the iAS and the Infrastucture on the same machine - this all works fine when started as a series of individual commands but not when through batch files).
Also If I try to use:
SQLPLUS /NOLOG
SQL>CONNECT sys/password@iasdb as sysdba
SQL>Start
I also get an 'unable to create a dedicated server' error. I can start/stop the database through the enterprise manager in either standalone or management server configuration without any errors. Can anyone shed any light on this?. I have set both TNS_ADMIN and ORACLE_SID correctly.
Terry Bennett
Thanks, I had read that and it was very informative. I did however solve my problem using a few other threads that have been posted about the runtime.runtime().exec commands. Thanks for you help.
Similar Messages
-
Starting and stopping 9ias Infrastructure and Application Server
I have Oracle9ias R2 Infrastucture and Application running on one machine (bad idea - I know) on Windows 2000. I had to restart the system and of course all the different instances from Infrastructure and Application Server started in the wrong order and now nothing operates at all. (It was fine yesterday - really, it was).
Could someone please give me a rough guideline on how to start these services, or instances in the right order.
Much obliged
WilliamSir,
Can you help me to do the installation of 9ias rel. 2.
I installaed 9ias infrastructure on separate m/c.
But unable to do single sign-on on 9ias server side.
How to configure it for web applicaions?
regards -
Restore Prefs files with batch file CS5
I'm running PS CS5 under Windows XP and ran into a "Refine Edge" problem where I couldn't get a functioning cursor. Checking around I came up with the solution of deleting & resetting my prefs file, which solved the problem. However restoring my prefs was time consuming and I thought there should be a better way where I could keep a backup prefs file & perform the restore with a batch file. So if anyone is interested here is the procedure and sample batch file I set up.
First in Win XP the prefs file(s) are buried in:
C:\ Documents and Settings\User Name\Application Data\Adobe\Adobe Photoshop CS5\Adobe Photoshop CS5 Settings\
and there were three prefs files that were affected when I deleted with the startup Ctrl/Alt/Shift procedure.
They were:
Adobe Photoshop CS5 Prefs.psp
Palette.psp
Color Settings.csf
I made copies of each with an extension of .org (to signify original) - so there were three duplicate files in the directory. There would be my backup files and are named:
Adobe Photoshop CS5 Prefs.org
Palette.org
Color Settings.org
Then I created a batch file named RestorePrefs.bat in the same directory as follows:
Copy C:\Documents" "and" "Settings\User" "Name\Application" "Data\Adobe\Adobe" "Photoshop" "CS5\Adobe" "Photoshop" "CS5" "Settings\Adobe" "Photoshop" "CS5" "Prefs.org *.psp
Copy C:\Documents" "and" "Settings\User" "Name\Application" "Data\Adobe\Adobe" "Photoshop" "CS5\Adobe" "Photoshop" "CS5" "Settings\Actions" "Palette.org *.psp
Copy C:\Documents" "and" "Settings\User" "Name\Application" "Data\Adobe\Adobe" "Photoshop" "CS5\Adobe" "Photoshop" "CS5" "Settings\Color" "Settings.org *.csf
The batch file copies the org (backup) files to the prefs files.
Note There are no spaces in batch file. These are linked with quotes.
Then create an icon on the desktop that runs the batch file in the prefs directory.
To check if its working properly prior to and without changing the prefs files, edit the batch file from *.psp & *.csf to *.XXX - run it - then check the directory for three new files with the XXX extension. If running OK, delete the XXX files and change the batch file back as above & your set to go.
Burt StuttmanThere are more files then the three that you noted that can can become corrupt in your user id Photoshop Preferences. Some preference files are not static some files are updated when you make changes to you Photoshop environment like edit action make brushes, patterns, define shapes etc. Some preference files are updated every time you close down Photoshop. I find it best to back up your whole user id Adobe Applications version Preference tree when the application is working well as a backup in case thing go sour. Its really not a complex or time consuming process. It actually a very simple easy process you can do in windows file explorer right panel.
Step one make your backup. Highlight the preference folder right click click copy. Then right click and click on paste "Folder name Copy" is the name of the copy and is your Backup.
Should Photoshop mess up. Close Photoshop. In file explorer do step 2 recover.
Step 2 Highlight the preference folder right click click on rename add a suffix Rotten "Folder name Rotten". Highlight the preference folder "Folder name Copy" rename to "Folder name"
Do step one create a new backup.
Start Photoshop If all is well and you do not need to recover newer thing from "Folder name Rotten" delete "Folder name Rotten" after a few daye. and your more sure everything is A OK. -
How to combine offscrub vb script with batch file
Hello all,
I am trying to upgrade from Office 2010 to Office 2013, but Office 2013 does not completely remove all of Office 2010 and Visio 2010, so I want to use the offscrub vb script from this article (
http://blogs.technet.com/b/odsupport/archive/2011/04/08/how-to-obtain-and-use-offscrub-to-automate-the-uninstallation-of-office-products.aspx) to first remove office 2010, Visio2010, and Project. I already extracted the offscrub vb script. How can I combine
the offscrub vb script with a batch file I created to silently install office 2013, so that after offscrub is finished running, the office2013 install would begin? I would like to apply the file via GPO. Or if there is away that one file calls the other.
I would appreciate any help you can provide.
Thank youYes - that is not GP Software Distribution. It is a very flakey method as you are finding out. I highly recommend posting in the Office 2013 administration forum for assistance. There are many 'gotchas".
The problems will come as a result of needing to remove 2010. If 2010 is a trial version or an expired license you will have many issues. Also the build of the MSP needs to be manged correctly.
I would add the uninstall script to the MSP package and make it a dependency or try and build an MSI to run the uninstall script using Software Distribution or run it independently and be sure you get a reboot before you attempt to do the install.
The Admins in Office 2013 forum will have many bits of experience that you will not likely find here or not find as readily.
Good luck.
¯\_(ツ)_/¯ -
Start/stop user programs with laptop-mode
Hi,
i am trying to place some scripts in /etc/laptop-mode/*start[stop] to kill and start some programs when on battery or ac.
I tried with the following script, but the process is just a zombie and dropbox will not appear: any ideas?
#!/bin/bash
case "$1" in
start)
su pschw -c
/opt/dropbox/dropbox &
stop)
killall dropbox
echo failed!
esacHi,
i am trying to place some scripts in /etc/laptop-mode/*start[stop] to kill and start some programs when on battery or ac.
I tried with the following script, but the process is just a zombie and dropbox will not appear: any ideas?
#!/bin/bash
case "$1" in
start)
su pschw -c
/opt/dropbox/dropbox &
stop)
killall dropbox
echo failed!
esac -
Brain freeze with batch file and jar
My batch file located in the startup folder.
@ECHO ON
Set Path =C:\Program Files\My-App\jre\bin
cd C:\Program Files\My-App
javaw -cp C:\Program Files\My-App\Startup.jar; SrvcUtilTest
EXITthe error I get is "Could Not Find Main Class. Program will exit"
If I take the Set Path line out it works fine, but my customers will not have the JRE installed on their systems,so I set the path to the jre included with my app..
What am I missing or forgeting to do.
What am I missingNevermind, fixed it.
Moved the jar into the startup folder, added a manifest file and changed this line
javaw -cp C:\Program Files\My-App\Startup.jar; SrvcUtilTest
to
javaw -jar Startup.jar
Works now -
Need help with batch file for javac.exe and java.exe
I have this in my batch file:
c:\jdk1.3.1_05\bin\javac
What symbol do I need to be able to run this from cprompt with any file following itThanks could remember that for nothing
-
Start/Stop Web Modules with JMX
Does anyone know if there is a possibility in OC4J to start/stop/reload web applications via JMX?
When I navigate with the System MBean Browser to a WebModule MBean, e.g. oc4j:j2eeType=WebModule,name=defaultWebApp,J2EEApplication=default,J2EEServer=standalone , the stateManageable attribute says false, and there are no start() and stop() operations available.
Is there any other way to do that, besides starting and stopping the parent J2EEApplication MBean, perhaps with some non-JSR77 MBean?
Best regards,
VolkerDoes anyone know if there is a possibility in OC4J to start/stop/reload web applications via JMX?
When I navigate with the System MBean Browser to a WebModule MBean, e.g. oc4j:j2eeType=WebModule,name=defaultWebApp,J2EEApplication=default,J2EEServer=standalone , the stateManageable attribute says false, and there are no start() and stop() operations available.
Is there any other way to do that, besides starting and stopping the parent J2EEApplication MBean, perhaps with some non-JSR77 MBean?
Best regards,
Volker -
Start/stop trace between removing trace files
Hi,
I have the following problem.
I put some Oracle session on trace (I use sys.dbms_support.start_trace_in_session). Then I make some test. I close the trace (I use sys.dbms_support.stop_trace_in_session). I analyze the trace files (tkprof) and I make some tuning.
Then I'd like to remove the trace files (*.trc) and start the trace again for checking if the tuning was efficient.
It seems not possible. Event if I start the trace again I can't see and trc files.
In order to solve the problem I must to bounce the application I want to trace (so that the Oracle sessions start again).
Any hint?
Thanks, MaxIn that case, you will need to parse the trace file to identify the start and stop of the trace. Below is an example from a 10gR2 trace. Notice the line starting with the *** that contains the date. It comes between the stop of the trace and the start of another trace. You cannot use this line alone to signify the start of a trace as similar lines are emitted in the trace file when there are long delays between writes to the file.
=====================
PARSING IN CURSOR #2 len=55 dep=0 uid=0 oct=42 lid=0 tim=330900979 hv=2217940283 ad='2fdd5ef8'
alter session set events '10046 trace name context off'
END OF STMT
PARSE #2:c=0,e=52,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=330900976
BINDS #2:
EXEC #2:c=0,e=85,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=330901247
*** 2007-02-20 11:55:55.026
=====================
PARSING IN CURSOR #4 len=69 dep=0 uid=0 oct=42 lid=0 tim=386816222 hv=3164292706 ad='2fdd6980'
alter session set events '10046 trace name context forever, level 12'
END OF STMT
EXEC #4:c=0,e=60,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=386816218
WAIT #4: nam='SQL*Net message to client' ela= 2 driver id=1111838976 #bytes=1 p3=0 obj#=258 tim=386816593
WAIT #4: nam='SQL*Net message from client' ela= 105 driver id=1111838976 #bytes=1 p3=0 obj#=258 tim=386816748
===================== -
Start stop while loop with tab control
I want to be able to start and stop a while loop by entering and leaving a tab. I am using an event structure to do so but it doesn't seem elegant or the right way to do this. The only way I was able to get it to kind of work is by unchecking the lock front panel box in the event structure. I have attached a sample vi of what I have so far.
Solved!
Go to Solution.
Attachments:
Loop test.vi 16 KBThe problem is that you can't even stop the program by hitting the stop button until you leave the tab, which is not a friendly user interface.
Event structures should just handle basic user events. Any given event case should not take a long time to run. While you are in the diagnostics tab, your code is stuck in that while loop. Although fixing the lock front panel allows you to do other things, the LabVIEW is just queuing up all of those other UI events (like Stop button value change) and can't handle them until the inner while loop stops and allows the outer while loop to iterate again.
You should have a parallel while loop to handle the waveform graph. You can use notifiers or queues or an action engine FGV (see Ben's Action Engine Nugget) to pass the starting or stopping of the waveform graph update to the parallel while loop. -
Starting / stopping FLV's with buttons
Basically all I want to do is have a flv play, then stop...2
buttons come up and depending on which you click on, plays the
associated video. Kind of like a choice thing. Video plays ->
make choice 1 or 2, plays video 1 or 2.
Shoved the video in the timeline on the main layer.
Created a new layer. Put the text button on the last frame
that the video plays on.
Opened Actionscript on the keyframe of the button.
Added in
stop();
mybutton.onPress = function() {
gotoAndPlay(710);
710 is the frame on which i had the other video start, on a
seperate layer might I add.
However the result is .... movie plays .... briefly see
button flash....next video plays without me clicking the button :(
How do I go about making this happen?
Thanks,
- GoOsEonPress is not a function in as3. Also, you need to add the
script to a frame on the timeline. you need to add an event
listener to your button that calls upon a function to execute your
code.
mybutton.addEventListener(MouseEvent.CLICK, doSomething);
function doSomething(e:MouseEvent):void{
gotoAndPlay(710);
}; -
Strange......problem with batch file in java
hi,
my problem is that i have created one bat file and i want to run that file in java but it is not running properly. the problem is .......
i have created one bat file named "file1.bat" & content of this file is as follows :-
[ ag > b.txt]
(and content of file "ag" is "aaaaaaa" )
now i am trying to run this bat file in java and want to read this b.txt in which i have redirected the content of file "ag".
for that i have written the code like this:-file name is "runbf.java"
import java.awt.*;
import java.lang.Runtime;
import java.io.*;
public class DriveVol
public static void main(String args[]) throws IOException
int volumn;
Runtime r = Runtime.getRuntime();
r.exec("ss.bat");
FileInputStream fp;
fp = new FileInputStream("b.txt");
flush();
do
volumn = fp.read();
System.out.print((char)volumn);
}while(volumn != -1);
fp.close();
when i am running this programme first it is not displaying the content of b.txt. but when u run this prog twice then only it 'll give the correct ans. what i mean is, i'll explain that stepwise.
1. as per my prog. -- r.exec("aa.bat") -- this line 'll execute first. so content of ag 'll redirect to file "b.txt"
2. now i am trying to read the file "b.txt" using FIleInputStream...
3. but first time it is giving some garbbage value.when i give --c:jdk1.3\bin>java runbf
4. but the very next moment when again i run that file - c:jdk1.3\bin>java runbf
it 'll give the correct value.
5. again when i change the content of file ag(suppose "bbbbbbb"). & try to run "runbf.java" like this-
-- c:jdk1.3\bin>java runbf --
6. then it 'll display the value "aaaaaa". now when again i run that file
it 'll give the correct value "bbbbbb"
7. so every time i have to run that "runbf.java" twice for printing the correct
value of file "b.txt"
so what i think is that, it is not refreshing the data of file "b.txt". after executing this line
r.exec("aa.bat");
so is there any method to refresh the data of file "b.txt"??????
i think u 'll try to understand my problem...
so please help me to get the ans.......
thx.........pls can anyone hlp............
-
Start, stop, restart WebLogic with WLST
Hi,
does Oracle have any example WLST scipts to start/restart WebLogic server? Please point me to them, 'cos I haven't found any.
Thanks in advance.Hi,
http://download.oracle.com/docs/cd/E13222_01/wls/docs90/config_scripting/manage_servers.html#start_managed_server
You can record all that you doing in admin console and automatically you will get .py script for that operations.
Regards -
Batch / script file to start /stop sap server
Hi,
I would like to start/stop SAP server using batch file (in windows). I need this, whenever we have to shutdown the server and restart of the server, so that SAP will automatically shutdown and restart using batch files while server restart cases? If anyone knows, please let me know. Thanks,
Regards,
Sundar.target of the 700 sapstartsrv improvement was to deliver identical functionality on all SAP platforms. As the DCOM programing model is only available on Windows platforms sapstartsrv.exe was enhanced by the WEB-Service interface and is available now on Unix too.
The DCOM SAPControl interface of sapstartsrv.exe is still existing, but only on Windows. Here you can use VB Script or any other programming language able to handle DCOM objects to write your own programs / scripts to interact with the SAPControl.
sapcontrol.exe is a command line program available since 700 which enables you control over nearly all functions of the sapstart service.
Even it has the same name as the DCOM interface it' something completly different.
regards
Peter
PS: sapcontrol syntax
usage: sapcontrol [
-prot GSOAP_HTTP| http using gsoap build in sockets (default)
NI_HTTP| http using SAP NI sockets (prefer Unix domain sockets)
NI_HTTPS| https using SAP NI sockets (prefer Unix domain sockets)
WINHTTP| http using Windows winhttp
WINHTTPS| https using Windows winhttp
PIPE Windows named pipes
[-user <user> <password>] OS user and password for Webservice authentication
[-repeat <N> <D>] Repeat Webmethod call <N> times (-1=forever) with <D> sec delay
-format list| List output format (default)
script Script output format
[-host <hostname>] Host to connect to (default: localhost)
-nr <instance nr.> SAP Instance number to connect to
-function <Webmethod> [parameter list]
Webmethods: Start
Stop [softtimeout sec]
Shutdown
RestartInstance [softtimeout sec]
StopService
StartService <SID>
RestartService
ParameterValue [<parameter>]
GetStartProfile
GetTraceFile
GetAlertTree
GetAlerts
GetEnvironment
GetVersionInfo
GetQueueStatistic
GetProcessList
GetInstanceProperties
ListDeveloperTraces
ReadDeveloperTrace <filename> <filesize>
ListLogFiles
ReadLogFile <filename> [<filter> [<language> [<maxentries> [<cookie>]]]]
AnalyseLogFiles [<severity 0-2>] [<maxentries>] [<starttime YYYY MM DD HH:MM:SS> <endtime YYYY MM DD HH:MM:S
S>]
OSExecute <command> <async> <timeout> <protocolfile>
SendSignal <pid> <signal>
GetSystemInstanceList
StartSystem [ALL|SCS|DIALOG|ABAP|J2EE|LEVEL <level> [<waittimeout sec>]]
StopSystem [ALL|SCS|DIALOG|ABAP|J2EE|LEVEL <level> [[<waittimeout sec>] [softtimeout sec]]]
RestartSystem [ALL|SCS|DIALOG|ABAP|J2EE|LEVEL <level> [[<waittimeout sec>] [softtimeout sec]]]
AccessCheck <function>
ABAPReadSyslog
ABAPReadRawSyslog
ABAPGetWPTable
J2EEControlProcess <processname> <function>
J2EEGetProcessList
J2EEGetThreadList
J2EEGetSessionList
J2EEGetCacheStatistic
J2EEGetApplicationAliasList
J2EEGetVMGCHistory
J2EEGetVMHeapInfo
StartWait <timeout sec> <delay sec>
StopWait <timeout sec> <delay sec>
WaitforStarted <timeout sec> <delay sec>
WaitforStopped <timeout sec> <delay sec>
Exitcode: 0: Last Webmethod call successfull
1: Last Webmethod call failed, invalid parameter
2: StartWait, StopWait, WaitforStarted, WaitforStopped timed out
3: GetProcessList succeeded, all processes running correctly
4: GetProcessList succeeded, all processes stopped
Security: Trusted connects without user and password check are possible through
Unix domain socket or Windows named pipes. Protected webmethods like
Start or Stop require a trusted connection or OS user and password
authentication. -
Hi All,
Can we create a batch file to start and stop the services. I need to start all the services like shared, essbase, eas, planning, webanlysis and financial reporting, and at also need to stop them using windows batch file.(Using windows 2003 server....service pack 1). Any help would be appreciated.
ThanksHi,
The simplest script would be something like this. Save it as a .bat file, set all your services to manual and then set up a scheduled task to run this script when the computer starts.
Gee
:: Startup Script for Hyperion Services ::
date/t >> startup.log
time/t >> startup.log
echo "Starting Hyperion Services" >> startup.log
net start "Hyperion S9 OpenLDAP" >> startup.log
net start "Hyperion S9 Shared Services" >> startup.log
:: Insert pause of 5 seconds to ensure HSS has finished starting
ping localhost -n 6 >nul
net start "Hyperion S9 BI+ Analytic Services 9.3.1 - Essbase" >> startup.log
net start "Hyperion S9 Administration Services ATS5" >> startup.log
net start "HyperionRMIRegistry" >> startup.log
net start "Hyperion S9 Planning" >> startup.log
net start "Hyperion S9 Provider Services ATS5" >> startup.log
net start "Hyperion S9 Apache 2.0" >> startup.log
net start "Hyperion S9 BI+ 9.3 Core Services 1" >> startup.log
:: Insert pause of 10 seconds to ensure Core has finished starting
ping localhost -n 11 >nul
net start "Hyperion S9 BI+ 9.3 Workspace" >> startup.log
net start "Hyperion S9 BI+ 9.3 Financial Reporting Java RMI Registry" >> startup.log
net start "Hyperion S9 BI+ 9.3 Financial Reporting Print Server" >> startup.log
net start "Hyperion S9 BI+ 9.3 Financial Reporting Report Server" >> startup.log
net start "Hyperion S9 BI+ 9.3 Financial Reporting Scheduler Server" >> startup.log
net start "Hyperion S9 BI+ 9.3 Financial Reporting Web application" >> startup.log
net start "Hyperion S9 BI+ 9.3 Web Analysis" >> startup.log
date/t >> startup.log
time/t >> startup.log
echo "Finished Starting Hyperion Services" >> startup.log
echo "###################################################################" >> startup.log
Maybe you are looking for
-
I have Itunes on my PC with close to 1000 songs. The songs were also on my Ipod. I connected my Ipad2 and blew away all of my music. Can the music be retrieved and if so how can i do it? tks
-
HR_MAINTAIN_MASTERDATA
hi, can you plz explain me how to use this function module in detail. any code snipet wil be of great help. is it possible to generate a PERNR for a new hire using this function module? regards, Balaji
-
How long b4 Apple does something about WiFi not workin on BRAND NEW macbook
I've got a brand new Macbook Pro and I feel very stupid about buying it, as I can't use WiFi in 9 out of 10 places I go. Never had this problem with my G4 and all the other people who go to these same WiFi hosposts don't seem to have a problem. Hones
-
Unable to open newly installed free standing Lightroom not part of CC
I have an Adobe CC photography membership and I've installed PS and LR on two computers from the membership. I also purchased a version of Lightroom 6 (not part of the membership) to install on a third computer for which I received a serial number. H
-
Will ios 7 be coming out today after the event or sept. 18?
Please help