Problem running batch file or OS command on XE database

Hello, I´m trying to do the following, run a OS command from the database, especifically a 10g XE database and Windows XP sp3, since the database itself does not provide a Host command I did a C program and compiled it into a dll and then running an external procedure as a database Library. if I try something simple like creating a txt file it works just fine.
the problem is when I try to run an export.
when trying this:
exp username/password file=file.dmp log=log.log owner=user
I get this error
ERROR: ORA-12560: TNS:protocol adapter error
so, looking into that error over the internet someone suggested to put the @db , so I tried the following
exp username/password@DB file=file.dmp log=log.log owner=user
which I got from the TNSnames file, but then when I run the export on the database with a procedure it just hangs, checking the session it has the event "HS message to agent".
any ideas why I'm getting that error? and what can I do to resolve it?
thanks in advance
Edited by: ceschamo on 16-Sep-2011 15:38

ok, lsnrctl status
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 19-SEP-2011 9:16:25
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (EXTPROC_FOR_XE KEY =)))
LISTENER STATUS
alias LISTENER
TNSLSNR version for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 19-SEP-2011 7:04:07
Activity Time 0 days 2 hr. 12 min. 18 sec.
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameters C: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ server \ network \ admin \ listener.ora
Listener log C: \ oraclexe \ app \ oracle \ product \ 10.2.0 \ server \ network \ log \ listener.log
Receiving Endpoints Summary ...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \ \. \ Pipe \ EXTPROC_FOR_XEipc)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = ComputerName.Domain) (PORT = 1521)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 127.0.0.1) (PORT = 8080)) (Presentation = HTTP) (Session = RAW))
Services Summary ...
The service "CLRExtProc" has 1 instance (s).
The instance "CLRExtProc" with status UNKNOWN, has 1 handler (s) for this service ...
The service "PLSExtProc" has 1 instance (s).
The instance "PLSExtProc" with status UNKNOWN, has 1 handler (s) for this service ...
The service "XEXDB" has 1 instance (s).
The instance "x" with status READY, has 1 handler (s) for this service ...
The service "XE_XPT" has 1 instance (s).
The instance "x" with status READY, has 1 handler (s) for this service ...
Service "xe" has 1 instance (s).
The instance "x" with status READY, has 1 handler (s) for this service ...
The command completed successfully
And lsnrctl service
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 19-SEP-2011 9:18:01
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC_FOR_XE)))
Services Summary ...
The service "CLRExtProc" has 1 instance (s).
The instance "CLRExtProc" with status UNKNOWN, has 1 handler (s) for this service ...
Manager (s):
"DEDICATED" established: 0 refused: 0
LOCAL SERVER
The service "PLSExtProc" has 1 instance (s).
The instance "PLSExtProc" with status UNKNOWN, has 1 handler (s) for this service ...
Manager (s):
"DEDICATED" established: 1 refused: 0
LOCAL SERVER
The service "XEXDB" has 1 instance (s).
The instance "x" with status READY, has 1 handler (s) for this service ...
Manager (s):
"D000" established: 0 refused: 0 current: 0 max: 1002 state: ready
Pid: ComputerName, <machine: dispatcher 2672>
(ADDRESS = (PROTOCOL = tcp) (HOST =ComputerName.Domain) (PORT = 49177))
The service "XE_XPT" has 1 instance (s).
The instance "x" with status READY, has 1 handler (s) for this service ...
Manager (s):
"DEDICATED" established: 104 refused: 0 state: ready
LOCAL SERVER
Service "xe" has 1 instance (s).
The instance "x" with status READY, has 1 handler (s) for this service ...
Manager (s):
"DEDICATED" established: 104 refused: 0 state: ready
LOCAL SERVER
The command completed successfully

Similar Messages

  • Using JSP to run batch file - command launches excel but doesn't open file

    I have written a jsp on a server which runs a batch file. Every command line in the batch works fine except the following:
    CALL "C:\Program Files\Microsoft Office\Office\Excel.exe" C:\Temp\spreadsheet.xls
    I can see that a command prompt has been opened and an instance of Excel has been created, but it does not open the file.
    I tried running the batch file on its own. It worked fine. I tried putting the java code in the jsp into a java class, that worked okay too. I think it might be to do with the fact that the client is trying lauch the application through the web, but it's missing some information such as paths.
    I am totally running out of ideas.. please help

    I guess if I know JSP stands for Java Server Pages..
    I would most probably know it runs on servers.Yes, you might, but if you were assuming that the path you gave would always lead to an executable running on the client you'd have a problem. It's worth asking.
    I must admit it's probably not the best idea, but if
    you can give me some advice on that, that would be
    greatJSPs shouldn't have code in them that doesn't pertain to view. I'd wrap something like a system call or Runtime.exec in a Java Bean that you can test off-line without the JSP. Then have the JSP instantiate an instance, invoke its method, and display the value that's returned.
    You've read this, of course:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Everyone who uses Runtime.exec should.
    %

  • Unable to run a Batch File Operating System Command

    Using XI 3.0, I am unable to run a Batch File Operating System Command After Message Processing.
    My Batch file:
    gpg -se -r BOA3RSKY --armor --passphrase-fd 0 %1 < C:\Progra~1\GNU\GnuPG\gpgin
    My Command Line (ID scenario)
    exec "cmd.exe /c C:\Progra~1\GNU\GnuPG\boagpg.bat %F"
    If I execute
    exec "cmd.exe /c type C:\Progra~1\GNU\GnuPG\boagpg.bat >xis.txt"
    It displays the contents of boagpg.bat file in xis.txt.
    I just don't understand why when I run the batch file, I would expect an %F.asc encrypted file in the same directory as the %F unencrypted file.
    Any ideas?
    or will I need Basis to create commands that will allow me to run GPG from XI Command Line?

    Check this links if its helpful
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/c7423347dc488097ab705f7185c88f/frameset.htm
    /people/sap.user72/blog/2004/01/30/command-line-help-utility
    Check this thread a similar problem
    Process Integration (PI) & SOA Middleware
    Note 841704 - XI File & JDBC Adapter: Operating system command
    http://service.sap.com/sap/support/notes/841704
    Try to see the below links
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    OS Command on FTP
    OS command line script - Need help
    FTP - Run OS Command before file processing
    Note: reward points if solution found helpfull
    Regards
    Chandrakanth.k

  • Can't run Batch files or Devnev (visual studio) - is not recognized .. command

    Getting the famous error :
    ... is not recognized as an internal or external command`*
    When & Where :
    not sure about the total range of the problem,
    Here I can't run batch files and "devneve.exe"
    sample Batch could be :
    @echo off   
    clr
    'clr' is not recognized ...
    **Here are the keynotes:**
     1. I run it as an admin (cmd)
     2. The Path variable seems to have anything needed, Powershell's path is also there sys32..v1
     3. I'm going into the current directory of devnev.exe ...
     4. ran also "devnev.exe"
     5. I don't have 2 cmd s in a known folder
     6. the autorun registries for command prompt were deleted
     7. the cmd extensions were disabled and re-enabled
     8. Avast IS 9 is running,
     9. The system seems to be fine
     10. all .Net frameworks are installed
     11. for a test jetAudio or ILDasm could be executed from the cmd
    Win 8.1 Pro , CPU i7, VS 2013 upd2

    thanks,
    this was one of the silliest problems I've ever encountered, my bad fault,
    the file is DevEnv not DevNev...!
    but about the clr, don't know from when I added them to my batches, but I'm sure the scripts were working correctly a time ago, maybe by a mistake I changed them, I thought it is the most known command, but I was wrong, there is a long time gap between me
    and DOS.

  • [Solved] Problem getting Batch Files to run as Admin in Win 8.1

    I'm trying to control certain Services with batch files to have them stop automatically at start.  However, with certain services, stopping requires run as admin.  My user account has admin privileges.
    For example, a batch file with this command will stop with a command prompt requiring Y/N to confirm the stop.
    NET STOP "Audiosrv"
    I can create a shortcut and set it to run as admin and it will stop the service without issue when it's clicked.  However, if I put the shortcut in the Windows startup folder, so the script runs automatically at boot it seems to ignore the shortcuts.
    I've tried the RunAs command below in a batch file, but it doesn't stop the service.
    runas /user:jaguar\Admin NET STOP "Audiosrv"
    Thanks for your help.

    Hello Peter, that works great.   I found I can add multiple arguments by separating them with a semi colon and I could hide the powershell window with the command at the end.
    My last question is if there's an additional command that will hide or minimize the command line window when the script runs?
    powershell.exe "Start-Process powershell -ArgumentList 'stop-service audiosrv; stop-service AudioEndpointBuilder; stop-service MMCSS' -Verb RunAs" -windowstyle hidden

  • HOST IN 10g to run batch file on application server

    Hi,
    I am trying to deploy a form from 6i to 9i. the form use Host builtin to run batch file on machine. this works fine when i run form on client server environment. but when i run the same form after compiling in 9i and run on 3 tier model and try to run batch file from form it give me error that
    'ftp' is not recognized as an internal or external command,
    operable program or batch file.
    any suggestion?

    It could be because the Host session doesn't have any environment variables set i.e. there is no PATH variable, so it simply doesn't know where to look to find the 'ftp' executable. You could try supplying the explicit path of the ftp executable and see if that works. (This was a problem I had running Host commands on a Unix application server.)
    James

  • Error running batch files from java source file???

    Dear Friends,
    hi,
    this is with response to a doubt i had earlier ,
    i want to run batch files from the java source file ,i tried using this code (here batrun is the batch file name that contains commands to run other java files)
    try
    String [] command = {"c:\\vishal\\finalmain\\batrun"};
    Runtime.getRuntime().exec(command);
    catch(Exception e)
    but i got the following error.
    java.io.IOException: CreateProcess: gnagarrun error= 2
    plz. help me, i tried all combination w/o success,
    in anticipation(if possible give the code after testing)
    Vishal.

    hello there,
    i solved the prob. by using
    cmd /c start filename ,but i need to pass parameters ie
    cmd /c start java "c:/vishal/runfile a b" where a and b are the parameters. but it is not accepting this in Runtime.getRuntime.exec(),
    any solutions ?????????
    regards,
    Vishal

  • Running batch files thraugh java by passing parameters

    Hi
    I want to run a batch file by passing some parameters.
    Eg: copy.bat "D:\live\hoe.txt" "D:\test"
    while doing this from command prompt its working and i have written some java code for running this batch file.
    String live="D:\\live\\how.txt";
    String test="D:\\test";
    String bat="D:\\copy.bat";
    String[] command = new String[3];
    command[0] = bat;
    command[1] = live;
    command[2] = test;
    try {
    Runtime.getRuntime().exec(command);
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    but this time its not copying the file;
    Please help.

    Just another cross poster.
    [http://www.java-forums.org/new-java/15005-running-batch-files-thraugh-java-passing-parameters.html]
    db

  • Running batch file error

    I have already tried to find some solution on Java Essential forum, not much success there. I hope someone might suggest something here.
    Design: one big file, split into chunks, recombined according to some order, feeded to some exe file, and finally compilation of results.
    Problem: I can run that smoothly with jdk, however, when I use Java beans I am running into troubles. I can split the file, create an order, recombine the files, but when I try to feed it to an exe file(through a batch file) i get this error:
    endfile record was detected in a READ statement (UNIT = 3). Error occurs at _MAIN__. A dubplicate file name exists or the file cannot be foundThe main method is something like this:
            s.split_ftn07() ;
            s.Define_Order() ;
            for (int i = 1 ; i < 11 ; i ++)
                s.re_combine(i) ;
                s.run_Fastran(i) ;
            s.ass_Result() ;my batch file:
    @echo off
    cd
    "C:\JBoss\jboss-4.0.5.GA\bin\Fastran\FASTRAN.EXE"
    ren FTN04 FTN04i
    :finishand my method that runs the batch file: (as soon as it pass the exec(), it opens the cmd.exe windows and displays the error message).
    public void run_Fastran(int x)
           try
               File ftn07_i = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn07_" + x) ;
               File ftn07 = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn07") ;
               ftn07_i.renameTo(ftn07) ;
               String path = "";
               path = "cmd /c start C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\FCall.bat";
               Runtime rt = Runtime.getRuntime();
               Process proc = rt.exec(path);
               String nameNew = "C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\FTN04-" + x + "-p12";//change p12 with the crack path input by user.
               File file = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\FTN04i");
               while (file.exists()==false)//until FTNO4i come into existence
                // File with new name
               File file2 = new File(nameNew);
                // Rename file
               file.renameTo(file2);
               File ftn07Back = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn07") ;
               File ftn07_iBack = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn07_" + x) ;
               ftn07Back.renameTo(ftn07_iBack) ;
               File ftn07_i_del = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn07_" + x) ;
               ftn07_i_del.delete() ;
           catch(Exception e)
               e.printStackTrace();
        }I am tired to figure out whats going on? Need some help here, will be greatly appreciated. Thanks

    Thanks to all, I really appreciate all the pains which all of you have taken in resolving my problem.
    It wasn't Java problem, rather batch file problem. I was only changing the directory, and was not providing for the exe file to run.
    @echo off
    cd  "C:\JBoss\jboss-4.0.5.GA\bin\Fastran"
    "C:\JBoss\jboss-4.0.5.GA\bin\Fastran\FASTRAN.EXE"
    ren FTN04 FTN04i
    EXIT
    :finishNow it is working fine.
    I did check the access permissions, no problem with that I guess. The problem was with the path. The batch file couldnt go pass bin directory, and I noticed that only today ;(. At any rate, I changed that and now it is all smooth and dandy.
    Once again, thanks a lot.

  • Can't run batch file in Windows 2008 R2

    Trying to run batch file (manually first) with powershell commands.
    Powershell commands work fine thru powershell but the batch file will not execute manually.
    I am trying to run as administrator.
    Is there a permission  or policy I may be missing?
    Thanks
    Dave
    Dave Kozlowski

    Hi,
    Some bat type command can't run in the powershell environment, you must confirm you have choiced the correct lunch tools.
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Execute batch file having gmake command

    Hi,  I am executing batch file having gmake command in it, when i run batch file directly it works correctly,
    but when i try to execute it from LabVIEW using system Exec.vi  
    i got following error,  
    process_easy: DuplicateHandle(In) failed (e=6)
    process_easy() failed to launch process (e=6)  
    Thanks in advance

    What OS?
    How are you calling it in LV?
    What is in the batch file?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Unable to run batch file through BO XI 3.1 server

    IHi,
    I am unable to run batch file (.bat) from BO XI CMC. the batch file is running fine through command prompt but fails at server. Error msg is "Running this type of program is disabled by your administrator".
    Can you help?
    Thanks in advance,
    Avijit

    Have your administrator enabled the running of that type of program in the CMC?
    Sincerely,
    Ted Ueda

  • PDQ - run batch file on user current folder...

    Hi,
    I'm running batch file:
    cd %USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files\
    but it's not opening the current logged on user
    how to deploy it on current logged on user?
    thanks,,,
    This topic first appeared in the Spiceworks Community

    This is not working for me in Windows 8.  I have a shortcut to an EXE file located in"C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup".  If I set the shortcut to run as administrator (screenshot attached) then it does
    not run at all on startup.  If I uncheckmark "Run as Administrator" then it starts fine (but does not have enough privileges to do what it needs to do).  In Windows 7 this was not an issue since the current user was a local administrator and did
    not need to elevate its privileges further.
    Any ideas how I can work around this problem?  Thanks!
    Ugh... it won't let me attach a screenshot until my "account is verified", whatever that means.

  • How to run batch file from oracle forms 9i

    Hi everyone.
    i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
    i have made a batch file which run the sql loader and transfer my data to database.
    How to run batch file from oracle forms 9i.
    when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
    here is my code
    Begin
    HOST('C:\temp\batchfile.bat');
    message('done');
    end;
    Thanks in advance
    regards
    sajid

    this is my log file, when i run manually.
    SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: file_to_upload.ctl
    There are 2 data files:
    Data File: sk.csv
    Bad File: sk.bad
    Discard File: none specified
    (Allow all discards)
    Data File: sk1.csv
    Bad File: sk1.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table KHAN, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    SR FIRST * , O(") CHARACTER
    DATES NEXT * , O(") CHARACTER
    AGENT NEXT * , O(") CHARACTER
    COUNTRY NEXT * , O(") CHARACTER
    TRANSACTIONS NEXT * , O(") CHARACTER
    PKR NEXT * , O(") CHARACTER
    USD NEXT * , O(") CHARACTER
    BANK NEXT * , O(") CHARACTER
    Table KHAN:
    11088 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 132096 bytes(64 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 11088
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Thu Jul 01 23:27:53 2010
    Run ended on Thu Jul 01 23:27:54 2010
    Elapsed time was: 00:00:00.63
    CPU time was: 00:00:00.17

  • Unable to run batch files in my EP server

    Hi,
       I'am unable to run batch files(go.bat and configtool.bat) on my EP server.Anbody please give me a solution.
    With Regards
    Pradeep.B

    If your EP Server is on non-windows based environment then you cannot use go.bat & configtool.bat or else you can. If you are trying to execute these on unix based machines then you have to use go.sh & configtool.sh files.
    Pradeep

Maybe you are looking for