Solved

Export through cmd file

Posted on 2009-05-19
8
1,009 Views
Last Modified: 2013-12-19
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
0
Comment
Question by:sachin_dba
  • 5
  • 3
8 Comments
 
LVL 16

Expert Comment

by:Peter Kwan
ID: 24429214
You should call like this:

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

Author Comment

by:sachin_dba
ID: 24429328
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.
0
 

Author Comment

by:sachin_dba
ID: 24429366
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.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 16

Expert Comment

by:Peter Kwan
ID: 24429493
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"
0
 

Author Comment

by:sachin_dba
ID: 24429958
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
0
 
LVL 16

Accepted Solution

by:
Peter Kwan earned 500 total points
ID: 24430003
You may start your batch by doing this (assume you are windows XP/2000 or above):

1. Start -> Run -> Type in "cmd" in the text box and click "OK"
2. In the command prompt, change the directory to where your batch file is in . ("cd your_directory" without quotes)
3. Type your batch file name (E.g. "export_db.bat", without quotes) and press "Enter".


0
 

Author Comment

by:sachin_dba
ID: 24430231
Finally its done. thanks mate.
0
 

Author Closing Comment

by:sachin_dba
ID: 31583378
its woring .. thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
run sql script from putty 4 67
create a nested synonym 4 28
Oracle - Query link database loop 8 41
Function to return one result based on data in first query 11 50
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question