5

In windows xp, I start sqlloader.exe to load data onto Oracle. This works great, until my password contains an @-sign, that is also used by sqlloader parameters to determine the database to connect to: sqlldr.exe userid/password@database control=ctrlfile.ctl

How can I make sqlldr.exe accept a password like p@ssword?

I tried with single/double quotes: sqlldr.exe "user/p@ssword"@database without success. I tried to skip the whole user/password, to type it in on the console, without success.

Even google couldn't help me (though it brought me on thsi great website).

Edo de Roo
  • 51
  • 1
  • 2

3 Answers3

6

It will fail using parfile as well. You just need to escape the password with \" as follows: username/\"p@ssword\"@database

not sure why nobody posted this solution before.

Cheers, Bernardo

bernardo
  • 61
  • 1
  • 2
0

Have you tried it with a parameter file? I think that would allow you to have whatever kind of password you want. From Oracle's site:

PARFILE = path_ file_name

Tells SQLLoader to read command-line parameter values from a text file. This text file is referred to as a parameter file, and contains keyword/value pairs. Usually, the keyword/value pairs are separated by line breaks. Use of the PARFILE parameter can save a lot of typing if you need to perform the same load several times, because you won't need to retype all the command-line parameters each time. There is no default extension for parameter files.*

MJB
  • 7,639
  • 2
  • 31
  • 41
0

If you are executing from a command line like CMD then you have to encapsulate the password portion with " and because of CMD interpretation, you will have to escape the double quotes too.

user/\"p@ssw0rd\"

If you are putting the userid parameter in a PARFILE then you need to encapsulate the password with double quotes but do not escape the double quotes.

user/"p@ssw0rd"

I just ran into this.

akuma6099
  • 121
  • 1
  • 6