-1

I have shell script for creating dump file of oracle 11g database. I want to run it through java code, I did find any working solutions on the web. Can anyone help me on this.

Script

expdp test/test@localhost:1521/ORCL DIRECTORY=orcl_full2 DUMPFILE=testDBUser.dmp LOGFILE=full_exp_TestDBUser.log FULL=YES

One solution I found mentioned below, but it did not work for me :

Run Oracle import Command from Java and see Console output

Community
  • 1
  • 1
Shamim Ahmad
  • 808
  • 3
  • 22
  • 40
  • 1) For better help sooner, post a [MCVE] or [Short, Self Contained, Correct Example](http://www.sscce.org/). 2) *"it did not work for me"* How did it fail? Be specific, we are not mind readers. 3) See also [When Runtime.exec() won't](http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html) for many good tips on creating and handling a process correctly. Then ignore it refers to `exec` and use a `ProcessBuilder` to create the process. Also break a `String arg` into `String[] args` to account for things like paths containing space characters. – Andrew Thompson Nov 16 '16 at 14:33
  • Got it. I will keep it in my mind next time onwards. – Shamim Ahmad Nov 17 '16 at 04:09
  • Will look more closely at the question, next time onwards. Of course, if you choose to [edit] the ***current*** question as suggested & notify me when it is.. – Andrew Thompson Nov 17 '16 at 04:11
  • Actually, I got the solution. I problem was, I was trying to run this program on windows platform considering that it will connect to remote Linux server and execute it in there. But when I executed the same program on Linux environment. Guess what, It worked. – Shamim Ahmad Nov 17 '16 at 04:19
  • Now you might write an answer below, or simply delete the question. – Andrew Thompson Nov 17 '16 at 04:33

1 Answers1

0

Solution : My problem was, I was trying to run this program on windows platform considering that it will connect to remote Linux server and execute it in there. But when I executed the same program on Linux environment.

Shamim Ahmad
  • 808
  • 3
  • 22
  • 40