Link to home
Start Free TrialLog in
Avatar of sachin_dba
sachin_dbaFlag for India

asked on

Export through cmd file

I need to export Oracle database from client, where I dont have right to edit tnsname.ora where I have tns entry to use 9i client's exp.exe.

So I write a cmd file

@echo off
setlocal
c:
cd %TEMP%
set TNS_ADMIN=c:\program Files\toAD.861.EN
call "W:\ORA01.920.EN.001\bin\exp.exe

But here it is starting export in interactive more, and asking of username.

Can I use my parfile ?

call "W:\ORA01.920.EN.001\bin\exp.exe parfile=C:\Bakup_Databases\nova_test.par"

is not working, any workaround.

Sachin
Avatar of Peter Kwan
Peter Kwan
Flag of Hong Kong image

You should call like this:

call "W:\ORA01.920.EN.001\bin\exp.exe" parfile=C:\Bakup_Databases\nova_test.par
Avatar of sachin_dba

ASKER

call "W:\ORA01.920.EN.001\bin\exp.exe" opening command window like:

Export: Release 9.2.0.1.0 - Production on Wed May 20 09:34:39 2009

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Username:

But with parameter file

call "W:\ORA01.920.EN.001\bin\exp.exe" parfile=C:\Bakup_Databases\nova_test.par

command window opens and disappered in 1 sec, and no log file even

Par file is very simple

user/pass@DBname table=HIERARCHIES_FLAT file=c:\program Files\toAD.861.EN\test_nova.dmp log=c:\program Files\toAD.861.EN\test_nova_imp.log

and we can connect with user/pass@DBname while prompting at username.
got some link from google

http://www.lazydba.com/oracle/0__116055.html

Here's how we do it (this assumes that Oracle is installed and
configured on two separate machines).

Export:
dump_bart.cmd:
exp parfile=exp_bart.prf
exp_bart.prf:
userid=system/*****@cmgt.iecokc.com
file=D:\backup\exp_iec_bart.dmp
compress=y
log=exp_iec_bart.log
consistent=y
statistics=none
owner=iec_bart
direct=y


but not able to relate here.
You should do like this in your parfile:

userid=user/pass@DBname table=HIERARCHIES_FLAT file="c:\program Files\toAD.861.EN\test_nova.dmp" log="c:\program Files\toAD.861.EN\test_nova_imp.log"
thanks, for your help but still not able to start export. command window disappered in a flash with some text.. can we stop the window with some sleep .. or any other workaround?

Sachin
ASKER CERTIFIED SOLUTION
Avatar of Peter Kwan
Peter Kwan
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Finally its done. thanks mate.
its woring .. thanks