TNS-04414: File error when using dbca silent

When hurriedly using a set of silent database creation scripts on 11gR2 I stumbled several times across an error where dbca was failing after about 15s, and had not even started copying files. The log files in $ORACLE_BASE/cfgtoollogs/dbca/<my_db> all contained:

Copying database files
TNS-04414: File error
  caused by: TNS-04610: No literals left, reached end of NV pair

Various posts on the web were suggesting a problem in the tnsnames.ora file which was almost true:
In my haste, I had neglected to set the hostname properly. When you install an Oracle Enterprise Linux 7.x, the installer will put your fully qualified domain name in file
/etc/hostname
Thus the hostname command will return your server FQDN:

hostname
srvoel7onp04.easyteam.local

Well your Oracle listener set up will not like that because you will endup with a listener.ora entry looking like this:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = srvoel7onp04.easyteam.local)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

Once I corrected the hostname to remove the domain name,

hostname
srvoel7onp04

I reconfigured the listener and dbca ran fine. The good thing about OEL7.x is that you just need to edit the /etc/hostname file without having to reboot, unlike its older cousin OEL6.x where you had to reboot after editing /etc/sysconfig/network

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *