I have a zipped export file on the source machine and I want to import it into a database on different host.
All is done on the fly.
In this picture:
- "src_hst", is the source machine
- "trg_db", is the target database
- "trg_hst", is the target machine
- "trg_usr", is the user, on the target database, to be imported
- "gunzip", is the unzip command
- "imp", is the import command
- "net", is the network between source host and target host
Configuring the target and the source
First of all, you have to configure the source and target machine. To do this, please see "Configuring the target and the resource" of my previous post.
Now you can run the import.
The taget
[oracle@trg_hst]$ mknod /tmp/trg_usr.pipe p
[oracle@trg_hst]$ nohup imp system/manager \
> fromuser=src_usr touser=trg_usr \
> file=/tmp/trg_usr.pipe \
> log=/tmp/dpdump/trg_usr.YYYYMMDD.log \
> 2>&1 > /tmp/dpdump/trg_usr.YYYYMMDD.hohup &
Please, note that I used YYYYMMDD. In this case I have to use the current date. For example: 20160924
The source
nohup gunzip -c src_hst.dmp.gz | ssh oracle@trg_hst 'cat > /tmp/trg_usr.pipe' &
Nessun commento:
Posta un commento