In Oracle, I am creating a database with a silent install using DBCA and a template. The template does not define local_listener.

<initParam name="local_listener" value=""/>

After the database is create, it has a value for local_listener = LISTENER_dbname. However, I don't want this parameter to have a value when it is created. How can I ensure that this parameter is created with a null value?

  • 2
    Why don't you want it to have a value? – Andrew Brennan Oct 25 '18 at 12:49

I tested specifying -initparams local_listener='' but the local_listener has been set anyways by specifying the empty string.

dbca -silent \
 -createDatabase \
 -templateName General_Purpose.dbc \
 -gdbName testdb \
 -sid testdb \
 -createAsContainerDatabase false \
 -SysPassword oracle \
 -SystemPassword oracle\
 -emConfiguration NONE \
 -datafileDestination /oradata \
 -storageType FS \
 -characterSet AL32UTF8 \
 -memoryPercentage 10 \
 -initparams local_listener=''

You might want to create a custom template referencing a .sql script with the command alter session set local_listener.

I'd only make that effort if in need to use it multiple times, though. If it is a one time thing, maybe you're better off setting local_listener manually.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.