Pergunta

I am connected to remote Oracle server from my local machine & dropped all the table in one of the db schema. Now I need to import a dmp file located in the same remote machine from my machine. How can I achieve that?

Note - RDC to the server its not an option.

I can't use impdp as that utility is not available in my local machine.

Please help

Foi útil?

Solução

I achieved this by SSH. I configured a SSH server on the Oracle DB machine then from my local machine ran impdp command via ssh using paramiko client.

......................................................................................

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(server, username=username, password=password)
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command('<impdp command here>')
err = ssh_stderr.read()
print "err", err, len(err)
ssh.close()
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top