Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ksh script to export and import from one schema to another

 
Stella Harding
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone with any suggestions...they are all welcome. I'm just a beginner with Ksh scripting.

What I need to do is be able to put all these in one script:
1. gzexp schema_#1
2. truncate(drop) schema_#2
3. gzimp schema_#2

Does any of this make sense to anyone?

Thanks
-Stella
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34371
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stella,
Welcome to Javaranch! We do have a Linux/UNIX forum, so if this gets away from Oracle and too much into scripting, I'll move it there.

A korn shell script is basically just a sequence of commands. So you need to figure out how to run those commands at the command line (rather than from within Oracle.) I don't have my Oracle docs with me, but I imagine it is in there.

I would advise trying the commands one at a time at the command line. Once you have each one working, add it to a file. When you are done with the third one, you have a script! Just make sure the script has execute permission and you're done.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic