'Can only log in via service name in SQL developer [Oracle DB]

So I dl and installed Oracle Db 21c, the latest version. I connect to it via SQL developer using the default system account. The SID was XE when I connected using SQL developer, when I tried to make a new user I encounter an error. After searching it seems I had to alter my session to a plugable database so I alter my session to XEPDB1 and was able to successfully create the user.

Now I can connect to the DB with that user but if I use the SID of XE it says invalid login information but if I switch to service name and put XEPDB1 it works. However I have a program that populate it with the data I need but the program only takes SID for the connection. So do I find the SID I should be using to log into the new account I created?

Tried using XEPDB1 as SID but that doesn't work. I expect to be able to connect to this new user I created with an SID instead of the service name.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source