18c XE–running locally

There’s already a few blog posts out there, showing people (easily) getting their 18c XE instance downloaded, installed and running, so I won’t rehash that here.

For the majority of people, I’d imagine they’ll have their XE instance running on a small box and connecting to it from “afar”, namely, their own PC or an application server or similar.

But for those of you, especially in these early stages of release, who like me, want to just jump right into our VM’s and the like, and connect to the XE instance directly, there’s perhaps one thing we omitted as part of the automated install that might catch you out.

The default tnsnames.ora will look something like:


XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

LISTENER_XE =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

The service of “XE” and its associated tnsnames.ora entry gives you connectivity into the container database. But we haven’t created a tnsnames.ora entry for the pluggable database which is probably what you’ll be using most of the time.

So a quick cut-paste of the existing entry will do the trick for you.


XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

LISTENER_XE =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


XEPDB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XEPDB1)
    )
  )

Of course, if you’re connecting via EZconnect or similar, you don’t explicitly need a tnsnames.ora entry, but many people prefer it.

Enjoy XE!

Got some thoughts? Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: