Link to home
Start Free TrialLog in
Avatar of Pablo Allietti
Pablo AlliettiFlag for Uruguay

asked on

Oracle EXP automatic

Hi all i have this command line.

D:\app\Base\product\11.2.0\dbhome_2\BIN\exp system/pass123@cm consistent=y file=d:\backups\cm.dmp full=y

but always i need to type the password and the username because i have this error


EXP-00056: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon denied

if i type the username and password all work great is possible to d othis automagically?
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

What are you typing the second time?

That is the correct syntax.

Confirm the entry system/pass123@cm.
SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium 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
Avatar of Pablo Allietti

ASKER

i do this and nothing. if i put the username in a line doesnt have access but if i type its work like i attach below


D:\backups>D:\app\Base\product\11.2.0\dbhome_2\BIN\sqlplus system@cm

SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 18 09:53:42 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name: system
Enter password:

Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
you didn't add the password


sqlplus system/PASSWORD@cm
yes i do
and have the same error.

ORA-01017: invalid username/password; logon denied

but if i typed its work
you don't have to give me the password
but from what i see here ... there is no password

D:\app\Base\product\11.2.0\dbhome_2\BIN\sqlplus system@cm

above line with password should looke like
D:\app\Base\product\11.2.0\dbhome_2\BIN\sqlplus system/password@cm
i use this line and have the same error 01017. in the word password change for my password but nothing


D:\app\Base\product\11.2.0\dbhome_2\BIN\sqlplus system/password@cm
SOLUTION
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
no. all is ok. but nothing work automatically y dont know how but doesnt work
I use password on the command line all the time and have for years.

Not sure why it isn't working for you.

What you posted in http:#a39867064 isn't the same thing twice.

The first provides the alias for the cm database.  The second one, the one that 'connects', doesn't.

So, this tells me that the CM database has a different password for SYSTEM than the one that actually connects.
at the command line check following output

set local
set ora
set tns

it should display if you have settings for oracle
> set local
local = ???
would connect to you to an oracle database on the local machine

> set ora
oracle_home = ???
oracle_sid = ???
these parameter would indicate which database on the local machine

> set tns
tns_admin = ???
this could reroute you to a different database
mm i think this is the problem because i have this.

D:\backups>set local
LOCALAPPDATA=C:\Users\01534AdminPA\AppData

D:\backups>set ora
Environment variable ora not defined

D:\backups>set tns


How to set ora and tns?
SOLUTION
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
mm when i removed @cm its work perfect.
ASKER CERTIFIED SOLUTION
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
D:\app\Base\product\11.2.0\dbhome_2\BIN\exp system/pass123@cm consistent=y file=d:\backups\cm.dmp full=y

translation....
look in the BIN directory for "exp"
look at this:
D:\app\Base\product\11.2.0\dbhome_2\BIN\exp help=y

you'll see all of the options available to "the export utility"
that takes parameters where the first is always username/password
in your case, system/pass123 and database name of CM

you can put everything into a "parfile"
create a file called CM.par
put this in it:
system/pass123@cm
consistent=y
file=d:\backups\cm.dmp
full=y

then, your command line could look like this one of these:
D:\app\Base\product\11.2.0\dbhome_2\BIN\exp parfile=cm.par
or
D:\app\Base\product\11.2.0\dbhome_2\BIN\exp parfile=d:\cm.par
or
D:\app\Base\product\11.2.0\dbhome_2\BIN\exp parfile=d:\some\dir\for\par\file\cm.par

you get the idea.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.