• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • Last Modified:

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?
0
pablouruguay
Asked:
pablouruguay
  • 6
  • 5
  • 4
  • +2
4 Solutions
 
slightwv (䄆 Netminder) Commented:
What are you typing the second time?

That is the correct syntax.

Confirm the entry system/pass123@cm.
0
 
Geert GruwezOracle dbaCommented:
from the command line, make a line like below to test the password
sqlplus system/correctpassword@cm

until it doesn't give an error anymore
copy that system/correctpassword after the exp and it should work
0
 
pablouruguayAuthor Commented:
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
0
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!

 
Geert GruwezOracle dbaCommented:
you didn't add the password


sqlplus system/PASSWORD@cm
0
 
pablouruguayAuthor Commented:
yes i do
and have the same error.

ORA-01017: invalid username/password; logon denied

but if i typed its work
0
 
Geert GruwezOracle dbaCommented:
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
0
 
pablouruguayAuthor Commented:
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
0
 
slightwv (䄆 Netminder) Commented:
Either the password you are trying is not correct or the 'cm' entry in your tnsnames.ora file isn't pointing to the database you think it is.

Starting in 11g passwords are case sensitive.  Maybe this is the problem?

I suppose it might be a character set issue but I've never seen this with a password.
0
 
pablouruguayAuthor Commented:
no. all is ok. but nothing work automatically y dont know how but doesnt work
0
 
slightwv (䄆 Netminder) Commented:
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.
0
 
Geert GruwezOracle dbaCommented:
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
0
 
pablouruguayAuthor Commented:
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?
0
 
slightwv (䄆 Netminder) Commented:
>>mm i think this is the problem because i have this.

I don't think that is your problem.

What Geert Gruwez was wanting to see is if you had something in your environment that is overriding the command line.

From what you posted, you don't.

Please confirm what I mentioned above.

It failed when you tried system/password@cm but when you actually connected, you just used system without the '@cm'.  This is not the same thing.
0
 
pablouruguayAuthor Commented:
mm when i removed @cm its work perfect.
0
 
slightwv (䄆 Netminder) Commented:
>>mm when i removed @cm its work perfect.

See what I posted above?  removing the '@cm' likely isn't connecting to the database you think you are connecting to.  It is two completely different things..............

without the '@cm' it is doing a local connection.  With it, a network connection.

Check the entry CM in your tnsnames.ora file.  Confirm all the variables to make sure the HOST, PORT and SERVICE is correct.
0
 
dbmullenCommented:
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.
0
 
Steve WalesSenior Database AdministratorCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 6
  • 5
  • 4
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now