[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Export through cmd file

Posted on 2009-05-19
8
Medium Priority
?
1,020 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 2000 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

Technology Partners: 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 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
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 video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

649 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