Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to connect to Oracle XE 21c using Oracle Entity Framework Core 6.21.5

User_KC4ZXJan 6 2022

Hello,
Here is the connection string for my Net core app: "Data Source=localhost:1521/xe; Persist Security Info=True;User ID=user;Password=password;". With this connection string, I could connect to Oracle XE 11 with this application that uses Oracle EF core 6.21.5 and perform CRUD options
I uninstalled Oracle XE 11 and installed Oracle XE 21c. I was able to connect to XE 21c with SQL Developer with Hostname: localhost, Port: 1521, and SID: xe. However, I could not connect to XE 21c using the above connection string in my net core application. Here is the error message: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor OracleInternal.Network.NetworkException (0x000030E2).
I run "lsnrctl status" in command prompt and got this errror message: 'lsnrctl' is not recognized as an internal or external command. operable program or batch file. I connected Oracle XE 21c with SQL plus as sysdba, ran this sql "select name from v$pdbs;", and got this result: Name: PDB$SEED; XEPDB1. I also tried to replace xe with XEPDB1 in my connection string, but it did not work. I ran "lsnrctl status" in sql plus and got this error message: SP2-0734: unknown command beginning "lsnrctl st..." - rest of line ignored.
Does anyone know what I need to do in order to connect to Oracle XE 21c with my Net Core app? One of my options is reinstalling Oracle XE 21 c, but I hope this will not be the solution.
Thanks in advance for your help.
oracleXE.PNG

This post has been answered by User_KC4ZX on Jan 11 2022
Jump to Answer
Comments
Post Details
Added on Jan 6 2022
1 comment
807 views