Database Administration (MOSC)

MOSC Banner

sqlldr and "at"+dot escaping in username

edited Jun 14, 2020 5:06AM in Database Administration (MOSC) 7 commentsAnswered

Hi,

trying to load some data with sql loader and the specific characters such as '.' and '@'

username: USER01@GLOBAL.DOMAIN.COM
tablaname: MY_TABLE

issue:
sqlldr /@DBNAME data=dat.csv control=control.ctl log=load_data2.log bad=load_data_badfile2.csv


cat control.ctl

OPTIONS (

  SKIP=1,

  ROWS=1000,

  PARALLEL=true,

  DIRECT=true,

  SKIP_INDEX_MAINTENANCE=true

)

LOAD DATA

APPEND

INTO  TABLE  "\"USER01@GLOBAL.DOMAIN.COM\".\"MY_TABLE\""

        FIELDS TERMINATED BY ","

        OPTIONALLY ENCLOSED BY '"'

        TRAILING NULLCOLS

  (

    ID,

    NAME,

    DESCRIPTION CHAR(4000) "substr(:DESCRIPTION, 0, 50)",

    STARTDATE   DATE       "dd-mon-yy" "DECODE(:STARTDATE,'#','31-12-99')"

  )

so I've got:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center