Computing.Net > Forums > Unix > Shell script for oracle export/imp

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Shell script for oracle export/imp

Reply to Message Icon

Name: sureshht
Date: June 5, 2007 at 07:01:17 Pacific
OS: AIX 5L
CPU/Ram: 4 CPU/8GB RAM
Product: P595
Comment:

Hi,

I need to write a script for export/import job in oracle. I should be able to give instance name as a parameter while performing export. I also be able to give par file as parameter.
Can anyone help me?

Thanks
Suresh

sureshht



Sponsored Link
Ads by Google

Response Number 1
Name: LukeChi
Date: June 7, 2007 at 12:36:03 Pacific
Reply:

#!/bin/ksh
# I assume that no other environment variables
# depend on ORACLE_SID
# I also assume that ORACLE_SID is used
# instead of TWO_TASKS
#
# Example: <programname> <instancename> <parfilename>

ORACLE_SID=$1
PARFILE=$2

exp <username>/<password> ... parfile=$PARFILE

Luke Chi


0

Response Number 2
Name: pops9131
Date: June 11, 2007 at 07:58:02 Pacific
Reply:

Try this in korn shell script:

exp userid/password@$Oracle_Instance parfile=$SQLFile_Dir/xport.par

xport.par:

FILE=(directory_where_to_put_output.dmp)
tables=(table_names_to_export)
filesize=2G
compress=n
direct=y
statistics=none
grants=y
rows=y

Thnx,
lesliem


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Shell script for oracle export/imp

shell script for sent e-mail www.computing.net/answers/unix/shell-script-for-sent-email/5000.html

shell script for string encryption www.computing.net/answers/unix/shell-script-for-string-encryption/7406.html

Unix shell script and Oracle data www.computing.net/answers/unix/unix-shell-script-and-oracle-data/5298.html