Search code examples
dockeroracle11gplsqldeveloperrazorsql

RazorSQL and sqldevelopper not enable to connect to oracle DB on Mac with docker


This is my terminal


> nathanjobs@Air-de-Nathan ~ % docker exec -it competent_dirac sqlplus system/oracle@//localhost:1521/xe
> SQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 3 01:13:23 2021
> Version 19.3.0.0.0
>Copyright (c) 1982, 2019, Oracle. All rights reserved.
> ERROR: ORA-12514: TNS:listener does not currently know of service
> requested in connect descriptor
> Enter user-name:
system
Enter password:
Last Successful login time: Wed Feb 03 2021 01:10:26 +00:00
> Connected to: Oracle Database 19c Enterprise Edition Release
> 19.0.0.0.0 - Production Version 19.3.0.0.0
> SQL> show user
> USER is "SYSTEM" SQL>

I can make a connection to oracle with login: system and password: oracle but when I use razor or sqldeveloper I have this: screenshot

the same problem in Razor I need help please.


Solution

  • in your terminal tap 'docker-compose up -d' load the docker image and in the docker folder add this file
    version: '2.1'
    services:
    oracle:
    image: quay.io/maksymbilenko/oracle-12c
    container_name: oracle
    restart: unless-stopped
    ports:
    - 8089:8080
    - 1521:1521
    volumes:
    - $PWD/oracle:/u01/app/oracle
    environment:
    - DBCA_TOTAL_MEMORY=2048'

    save as docker-compose.yml