Stopping/Starting Portal via BAT file on Windows

In our landscape we have the ABAP and JAVA stack installed on separate servers for security reason.  We are trying to implement windows updates via SUS and need to automate the stopping and starting of SAP.  The bat file that was created works when stopping and starting the ABAP portion of SAP but on the Portal server it will take it down but when trying to start Portal, the J2ee Server will not start, but when I use the SAP MMC all servers starts up without any problem.  Below is the start up bat file, any assistance will be greatly appreciated:
REM start of script
PATH=%path%;G:\usr\sap\QBE\SYS\exe\uc\NTAMD64
SET ORACLE_SID=QBE
SET SAPDATA_HOME=K:\ORACLE\QBE
REM
REM
REM ***** starting Oracle Services *****
REM
net start OracleQBE102TNSListener
net start OracleServiceQBE
net start OracleQBE102iSQL*Plus
REM
REM ***** starting SAP services *****
REM
net start SAPOsCol
net start SAPQBE_00
net start SAPQBE_01
REM
REM ***** starting SAP Instances ******
REM
G:\usr\sap\QBE\SYS\exe\uc\NTAMD64\startsap.exe name=QBE nr=00 SAPDIAGHOST=SAPEPQA
G:\usr\sap\QBE\SYS\exe\uc\NTAMD64\startsap.exe name=QBE nr=01 SAPDIAGHOST=SAPEPQA
REM
REM end of script

I looked up some training material and in TADM10 - Unit4 - Starting and Stopping a SAP NetWeaver AS Java.. the following is stated:
Under Windows, the SAP system can also be started and stopped without a GUI by
calling a command by means of the executable files startsap.exe and stopsap.exe. This
can be done using a simple telnet access.
To start an instance of the SAP system, open a telnet connection and enter the
following command: startsap name=<SID> nr=<instance nr.>
SAPDIAHOST=<hostname>
To stop an instance of the SAP system, open a telnet connection and enter the
following command: stopsap name=<SID> nr=<instance nr.>
SAPDIAHOST=<hostname>
For the SAPDIAHOST parameter, enter the name of the host on which the instance is
to be started.
So the script is correct, its all according to SAP advice... very strange

Similar Messages

  • Run .bat file as windows service

    want to ran a .bat file as windows service kindly help me on this through step by step guide.

    Wrong forum. This one is for Forum Issues. So we could move it if you have a forum in mind.
    Thanks!
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Stopping/starting BO4 via scheduled script (SIA enough?)

    Hi,
    We are wishing to implement a backup stratgey for our new BO4 deployment running on 2 windows servers against Oracle 11 CMS database.
    Wish to have cold backups in addition to hot ones.
    In order to implement cold backups will need to bring the BOE services down via script.
    Just wondered as to best practice.
    1) Is it sufficient to simply stop the SIA via script and what would command be.  In old XIR2 we have net stop and net start server names.
    I'm assuiming fine to leave Tomcat up and running during this time - will be for up to 1 hr during night when nobody using system.
    Many Thanks
    Edited by: Philip O'Rourke on Jan 14, 2012 12:58 PM

    Create a file C:\Windows\reboot-script.bat and put the following command string in it:
    shutdown /r /f /d P:4:1
    /r  = reboot
    /f  = force running applications to close (this shuts down BOE and Tomcat)
    /d  P:4:1  = the reason for the reboot (P=Planned)
         the numbers are Major and Minor reasons for the reboot
         4:1 = Application:Maintenance
         4:2 = Application:Installation
    (The /d and it's following parameters are not really necessary but I put them in there so that my Wintel support team can see the reboot is planned and executed by me)
    With that one command string in your *.bat file, you can then use Task Scheduler to "Start a Program" at the specified time you need.
    CAUTION:  If you set this up and run it under your own ID, that can lead to inconsistent results.  It's really much better to run it as SYSTEM (your Windows Admin has to get involved) or a Service Account.  This is on the General tab of the Task Scheduler.

  • Starting CS4 from bat file

    I can successfully start Photoshop from a .bat file (.bat file has the line "START Photoshop") when I'm logged onto my Vista user account.  But when I switch to the guest account and the bat file continues to run in my normal user session, it is unable to launch Photoshop.  A Microsoft Windows error box reports: "Adobe Photoshop CS4 has stopped working".  I'm able to start Bridge or notepad with this method, that is, with the bat file running in my normal account while logged in to the guest account.  Seems you have to be logged on directly for PS to launch.  Any experience with this?

    On what operating system? windows xp professional
    What script ? Ms Dos script (.bat file)
    With what version of Oracle? Oracle 9i
    and why would you want to? Every month I need a job which when called will load a certain file from a predefined path to the target Oracle database using sql loader.
    I haave not worked with control files in the recent past and have a faded memory regarding this usage.
    All i remeber is calling sqlldr from cmd prompt specifying the ctl files and stuff......
    any other ideas are welcome..... thnkx!

  • Running Java Program via bat file

    Hi
    I have a bat file. I have compile the java files and the class files into the same folder.
    I am suppose to double click on the bat file and it is suppose to run (in the same manner as IDE)
    but it only appear the 1st line of the program. Whatever i type, it refuse to budge.
    What should i do to retify the problem?
    I have already set the classpath properly

    Hi
    I just realised that my program can only run halfway on the dos...
    This is my code sample
    try{
                pw = new PrintWriter("TS.log");           
                System.out.println ("hi");
            catch(IOException io){
                io.printStackTrace();
            try {
                StandAloneApplication = true;
                String[] a = new String[1];  
                System.out.println ("hi2");
                Settings settings = Settings.getInstance();
                StringTokenizer letterToken = new StringTokenizer(settings.get("letter"),",");
                Vector <String> v = new Vector<String>();
                while(letterToken.hasMoreTokens()){
                    v.add(letterToken.nextToken());
                String letter[] = v.toArray(new String[v.size()]);
                System.out.println ("hi3");
                DbConnection d = new DbConnection();
                String stocklist = d.getStockList();
                String mainFile ="";
                GenerateSLS sMain = new GenerateSLS("timeSales.sls");                                               
                String sessionID = d.createiFisSession();                      
                System.out.println ("hi4");
                for(int i=0;i<letter.length;i++){
                    System.out.println ("print");
                    mainFile = sMain.start("timeSalesGen"+letter[i]+".sls",d.getStockList(letter[i]+"%.SI"),sessionID);
                    a[0] = mainFile;       
                    staticArguments = a;       
                    Viewer viewerMain = new TSMainCapture();       
                    viewerMain.init();          
                    viewerMain.start();it stops printing after "hi4"
    btw, I have tried to run this on the bat file again.
    IDE side retest, re-compile and rerun, work well
    Pls help
    Thanks.
    Lots of appreciation

  • How do I reset the default file association for .bat files on Windows 8.1?

    Windows 8.1 allows the user to change the file association for .bat files. I made the mistake of using this facility to change the default file association for .bat files to Notepad++. Now when I attempt to run a .bat file, the script for the .bat
    comes up in Notepad++, instead of its being run as an executable file!  All my .bat files are now useless. I tried finding a way to change this back to the original executable setting, including deleting Notepad++ from my system, but nothing
    has worked. 
    There are discussions that I found on the Internet about this problem, and the solutions to which I was led have not worked either. Most of the solutions apply to Windows 7 or Vista, but not to Windows 8. There are a few solutions that purport to apply to Windows
    8 and 8.1, but they do not work for me.  
    (Disconcertingly, some of the solutions presented for the problem that apply to Vista or Windows 7 and are dated as early as 2009, so this problem has apparently been around for some time, but Microsoft still keeps .bat files on the Control Panel facility that
    enables the change to be made. I cannot see why, but there it remains.)
    Can someone please help me change this file association back to the original setting for Windows 8.1? Remember, most if now all the links that address this issue are focused on Windows 7. I need an answer that has been tried and proven to apply to Windows 8.1.
    Nothing I have tried works.

    Hi,
    For the issue, we can restore Default File Extension Type Associations through adding the registry entries.
    1. Download the .reg file from the following link.
    http://www.eightforums.com/attachments/tutorials/8025d1345781188-default-file-associations-restore-windows-8-bat.reg
    Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    2. Save the .reg file to your desktop.
    3. Double click on the downloaded .reg file to Merge it.
    4. If prompted, click on Run, Yes (UAC), Yes, and OK to approve the merge.
    5. Sign out and in, or restart the computer to apply.
    6. If you are logged in as a standard user and this still does not help, then have the administrator also merge the needed .reg file for the listed file extension or protocol below while logged into their administrator account.
    Hope this helps.
    Regards,
    Kelvin hsu
    TechNet Community Support

  • Setting Oracle environment variable using batch (.bat) file in windows

    Hi,
    Oracle 9i db
    Windows OS
    I am in process to create the database (Considered that Oracle9i software is already installed) by running one batch file which consist of all the scripts for the database creation.
    But i also want to set the environment variables at MyComputer(right click)>properties>advance>environment, permenently by running the batch (.bat) file
    ORACLE_HOME
    ORACLE_BASE
    ORACLE_SID
    So, how can it be done ?
    With Regards

    Hi,
    *@echo off*
    set ORACLE_SID=iprsdb
    set ORACLE_BASE=C:\oracle
    set ORACLE_HOME=C:\oracle\ora92     
    call C:\install_bkp\test_env_var.bat
    echo Test Successfull.
    Above mentioned is the code written in the batch (.bat) file
    In that i have also called another .bat file which test the env. variable values which is as below:
    c:\>test_env.bat
    ===================
    Testing oracle sid
    ===================
    iprsdb
    =====================
    Testing oracle base
    ===================
    C:\oracle
    =====================
    Testing oracle home
    =====================
    C:\oracle\ora92
    Test Successfull.
    But when i checked at MyComputer(right click)>properties>advance>environment variables
    there, I saw none of the entries from the above, why so ?
    how to set env. variables permanently using the DOS commands. ?
    With Regards

  • Printing solo PDFs via .BAT file

    Hi all,
    We have a current implementation of Oracle Documaker for our LOB. What we do is run a .BAT file that runs the GEN* brothers (gentnw32, gendaw32, and genptw32). This then uses the XML defined in the DATA segment of the fsisys INI file. This prints out multiple PDFs for us depending on the contents of the XML.
    We have a new requirement that states that we need to be able to print a solo PDF using an XML file that is found in a different directory, with a different file name, say invoice1085.xml. Is there a way to do this? I cannot edit the current setup of the workspace since the batch process needs to stay.
    We are using Documaker Studio Version 12.2.0.21451 Build Aug 8 2013. The workspace however was created with an older version (uses an MRL files rather than an ODBC connection)

    Hi,
    I need to pass the extract file name to the GEN Programs via JAVA. Also, my batch file only has the lines:
    SET BASEDIR=%cd%
    CD %BASEDIR%\DATA
    Echo Y|Del *.* >NUL
    cd..
    gendaw32 /ini=fsiuser.ini
    genptw32 /ini=fsiuser.ini
    pause
    del .\print\_*.pdf
    del .\print\.pdf
    pause
    :Exit
    Or
    echo
    gentnw32
    pause
    gendaw32
    pause
    genptw32
    pause
    I'm sorry. I'm not very familiar with creating .BAT files or executables. Would "set MYEXTRACT=%1" replace the "ExtrFile           = INPUT\extrfile.xml" line in my fsisys.ini file? Or will it only stick for the current run? Thanks a lot. I'll try experimenting with your suggestion.
    EDIT: I got it to work using your suggestion but instead of using "Extract = ~GETENV MYEXTRACT", I used "ExtrFile           = ~GETENV MYEXTRACT". Thanks a bunch!

  • Automatic start of particular excel file at window start up

    Hi,
    I created an excel file for reminders. That pop ups at system start up. It has a short cut in start up folder ( C:\Users\drsantoshsinghrathore\AppData\Roaming\Microsoft\Excel\XLSTART ). The problem is, that it starts up every time I start excel and show
    up in vba explorer window. I want it to open only once at system or window start up. Is there any other way, please ?
    regards.

    Hi,
    As far as I know, if we add the Excel file\template in
    Excel xlstart folder (C:\Users\user name\AppData\Local\Microsoft\Excel\XLStart.), it will automatically open the file\template  when you start Excel. Thus, we do not to add the short cut in the Excel start up folder.
    We could add the file to Windows startup folder and delete the file in Excel start up folder. And then, it'll open only once at system or window start up.
    Your personal startup folder should be C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.
    The all user startup folder should be C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Making bat file in Window Mobile - Oracle application command line

    I have Windows mobile 6.I have installed Cre-ME+, & command line.In the command line we need to type below command & execute to load oracle Mobile Application.
    Command is : \Windows\CrEme\bin\CrEme.exe -Of -classpath \Windows\CrEme\lib\AWTclasses.zip;\XONTMWA\lib\j4205328.zip oracle.apps.mwa.awt.client.StartGUI
    This is working fine.
    But proble is making bat/cmd file to excute this application, without type each & everytime.
    I know that window mobile won't support bat/cmd file extension. But there may be any other ways.
    Please tell me how can i create the bat/cmd file in windows mobile 6.
    Please anybody help me out from this issue.
    I am looking forward your reply.
    Thanks in advance.
    Regards;
    Piraba
    Edited by: user10702520 on Jan 6, 2012 5:06 AM

    We use a third party application (AppCenter) on our Motorola devices. It's a lock down tool that can present only specific application to the user, and can auto-launch the command line (<filename.lnk> in our scenario).
    -Vince

  • Dot BAT files in Windows 8.1

    How do you activate the dot Bat file for execution on the workspace and/or in the startup menu?
    Jim

    Hi Jim,
    Could you please explain a bit for the activate here refers to?
    If you mean to run the bat files, we may consider take use of group policy to run it at startup, or use the Scheduled Tasks, for more information, please check the articles below:
    Use Startup, Shutdown, Logon, and Logoff Scripts
    Batch Files – Basic Error Checking and Running as Scheduled Tasks
    If I have any misunderstandings, please feel free to let me know.
    Best regards
    Michael Shao
    TechNet Community Support

  • Can only launch sqlDev 3.0 via .bat file

    I just downloaded 3.0 and extracted to a new folder. (winXP) The older version worked fine. Whenever I launch sqldeveloper.exe, I get " UNable to create an instance of the Java Virtual Machine"
    However, I am able to successfully launch when executing the sqldeveloper.bat file. AM I missing a configuration step?

    Make sure you're pointing to a 1.6 JDK in \sqldeveloper\bin\sqldeveloper.conf or delete the entry to get prompted to browse for it on next startup:
    SetJavaHome C:\Archivos de programa\Java\jdk1.6.0_16Hope that helps,
    K.

  • Planning load utility via bat file - error

    I am using a bat file that uses the Planning load utility to make numerous updates to a single dimension on a test server. When I run the bat file i get an error that says the dimension is locked by another user. I am the only user with access to the test server. I've checked EAS and planning and nothing is locked. I've even shut down all hyperion services on the server and restarted them. It still says that the dimension is locked. How can I get this to unlock when I don't see where it is locked? This is a high priority situation! Any help is greatly appreciated!

    Thanks John - I think your scenario is what happened. Initially, when I ran the bat file, I got an error 'Java out of memory - java heap'. So I had to fix that and then I got the locked error. So you're saying that since it locked the dimension then erred, the lock was never able to be removed. I got it! Thanks so much! :) Jeri

  • How can I use an java based app that starts via an inf or bat file?

    I have java exe application that is started using a .bat file and a java exe application that is started using an inf file. Both the .bat and inf prevent the respective application from kicking off.  Is there a way to convert these file types so that they execute on  my MacBook?

    I didn't expect you to have your customer run the command. I would expect you to create the executable and install it. However, there wouldn't be any difference in what you are creating and the .jar file. Either way it is a faceless icon. For that matter, it is no different than a batch file on Windows. I'm not sure what they wouldn't understand with, "copy the Vocab.jar file to wherever you want and double-click it to run the program." In addition, you probably ought to point out that Java is not installed on Mac OS X Lion (10.7.x) and when they double-click the jar file (or whatever you send them), the system will ask if they want to install Java.
    What you really need to do is package up the app inside a Mac application package and provide the user with the application on a .dmg (disk image). Take a look here: http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Jar_Bundle r/Introduction/Introduction.html#//apple_ref/doc/uid/TP40000884
    I also found this which uses ANT to create the bundle: http://informagen.com/JarBundler/

  • Java class to connect Windows server and excecuting bat file

    Hi All,
    Could some please provide or let me know how to connect windows server and executing bat file in windows box.
    All i have in hand to connect is Host name,Username and Password.
    Basically i am SOA guys and facing difficult in building class to do.
    I want to use Java code in my integration project in order to achieve the above case.
    I am using Linux OS. And i want to run Java code in Linux Box and to connect to Windows server
    Thanks in advanace
    Regards,
    Tarak.
    Edited by: Tarak on Aug 8, 2012 4:08 PM
    Edited by: Tarak on Aug 11, 2012 9:08 PM

    I'm afraid few if any of us are going to know anything more about connecting to Windows Server than you do. All I can suggest is to check if its client interface is publicly documented and try reverse engineering it from that.

Maybe you are looking for

  • ITunes 6.0.1.3 and Genre changes

    I have read through a bunch of threads but did not see a response to the following (hence the new post). I just went through my libary in iTunes and changes genres across all of my music to what i felt was proper. Now, every time I play a song in iTu

  • Secure Link for iTunes store failed... Got anything?

    Every time I try to open up iTunes store, it wouldn't open. I ran the diagnostics report and it said the ( for first time ) that "Secure link for iTunes store failed". The second time I ran it, just to make sure, said that "secure link for iTunes sto

  • XML error for Invoice iN SNC

    Hi Gurus Need help for the error we are getting in XML when Invoice is posted in SNC 7 version Error :" Message Interface or senders party hasn't been provided" please let me know the cause of error Thanks Vishal

  • Incomplete Oracle BI Server Suite configuration

    Hi, experts, I have only installed the adminitration tool on a PC. on that PC, I grant the whole folder including the files to Power Users (a local user group). That I use one user in that group to login. I run the administration tool. I see this mes

  • IIS ARR 502.3 - Bad Gateway

    Hi, I deployed a Lync environment with 1 STD, 1 EDGE and 1 IIS ARR as reverse proxy. All is working fine except for the IIS ARR. I configured it following: http://technet.microsoft.com/en-us/library/gg429712.aspx I am receiving next error for all url