In Oracle Multitenant the only way to connect to a PDB is by specifying a service.
However, there is a shortcut that you can use - TWO_TASK, which you will find documented elsewhere.
This allows you to specify the default service to be used - think of it as being appended silently to your username/password specification. I hope this helps.
Thanks Patrick - confirmed what I thought. I'm familiar with TWO_TASK from many years ago - thats actually a good tip and you could almost say TWO_TASK is the equivalent command of CONTAINER= it will serve the purpose we want it for.
that will be very helpfull , because using two task in the environment I will not have to modify any monitoring scripts that are connecting via OS authenticated user
You can connect a container session via ALTER SESSION SET CONTAINER=cont1
you can even check whether
SELECT SYS_CONTEXT('USERENV', 'CON_NAME') AS CUR_CONTAINER FROM DUAL;
But you have to be connected to do that - i want to be already connected to the right container straight from the command line.....