2023. 12. 16. 02:41 오라클
PIPE 이용하여 export 하는 script (화일 용량 클때)
#!/bin/ksh
#set -x
#
########################################################
# Create export dump file as unix pipe.
#
# Be sure to test thoroughly before using.
# Change the directory structures and names to match
# your system.
#
# Author: M. Finn
########################################################
if [ -p /tmp/EXPORT/export.dmp ]; then
true
else
/etc/mknod /tmp/EXPORT/export.dmp p
fi
#
########################################################
# CHANGE THE DIRECTORY PATH TO WHERE YOU CREATED PIPE.
########################################################
#
compress </tmp/EXPORT/export.dmp >/tmp/EXPORT/export`date '+%m%d%y'`.dmp.Z &
#
########################################################
# CHANGE THE DIRECTORY TO WHERE YOUR PARFILE EXISTS.
# CHANGE THE DIRECTORY TO WHERE YOUR COMPRESSED EXPORT
# FILE IS TO BE CREATED.
########################################################
#
exp FILE=/tmp/EXPORT/export.dmp PARFILE=/tmp/EXPORT/test.par 2>
/tmp/EXPORT/export`date '+%m%d%y'`.log