Solved

Export through cmd file

Posted on 2009-05-19
8
1,015 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

695 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