Force procopy

whwar9739

Member
Just wondering if there is a way to force procopy to copy a database and overwrite the destination if it exists? Looking at creating a script where I will be copying databases and would like to avoid having to have the user say yes to overwriting the database each time it shows up. Also not sure if this might belong under Database Admin, let me know and I will move the question there.

TIA,
 

Stefan

Well-Known Member
I think it is simply a matter of creating a text file with answers and redirecting it back to procopy. From proenv:

Code:
prodb test empty
procopy test test2
procopy test test2 < yes.txt

The yes.txt file simply contains a Y:

Code:
Y
 

whwar9739

Member
Well I was hoping for a simpler more elegant solution. I was hoping there might be an option for the procopy command that would be a force. Something similar to the unix command rm -f. It isn't the end of the world if there isn't I was just hoping that there was something I was missing. Also if it helps anyone I am running 10.2b on AIX.
 

Stefan

Well-Known Member
A more elegant solution just flew by on peg by Jeff Pilant:

Code:
prodb test empty
procopy test test2
echo y | procopy test test2

Not quite command line arguments, but at least the intermediate response file is not required.
 
Top