Sample Header Ad - 728x90

how to log in as SYS after starting containerized Oracle server

0 votes
1 answer
182 views
I am trying to start up an oracle database server locally. My goal is to have a schema with a user, what my application can use then. I am somewhat familiar with Oracle database, but I am a beginner with DBA things (previously DBAs created schema / user for me). So I used the "doctorkirk" image: https://registry.hub.docker.com/r/doctorkirk/oracle-19c I followed the instructions and I executed this command to get the image: sudo docker pull doctorkirk/oracle-19c then started up the image with this command: sudo docker run --name oracle-19c -e ORACLE_PDB=orcl -e ORACLE_PWD=password -v /opt/oracle/oradata:/opt/oracle/oradata -p 11521:1521 -p 15500:5500 doctorkirk/oracle-19c The output is this: cat: /sys/fs/cgroup/memory/memory.limit_in_bytes: No such file or directory cat: /sys/fs/cgroup/memory/memory.limit_in_bytes: No such file or directory /opt/oracle/runOracle.sh: line 102: [: -lt: unary operator expected ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: password LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-JAN-2025 12:25:50 Copyright (c) 1991, 2020, Oracle. All rights reserved. Starting /opt/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 19.0.0.0.0 - Production System parameter file is /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora Log messages written to /opt/oracle/diag/tnslsnr/95fe0518c5bb/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 15-JAN-2025 12:25:50 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora Listener Log File /opt/oracle/diag/tnslsnr/95fe0518c5bb/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) The listener supports no services The command completed successfully [WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards. CAUSE: a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. b.The password entered is a keyword that Oracle does not recommend to be used as password ACTION: Specify a strong password. If required refer Oracle documentation for guidelines. [WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards. CAUSE: a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. b.The password entered is a keyword that Oracle does not recommend to be used as password ACTION: Specify a strong password. If required refer Oracle documentation for guidelines. Prepare for db operation 10% complete Copying database files 40% complete Creating and starting Oracle instance 42% complete 46% complete 50% complete 54% complete 60% complete Completing Database Creation 66% complete 69% complete 70% complete Executing Post Configuration Actions 100% complete Database creation complete. For details check the logfiles at: /opt/oracle/cfgtoollogs/dbca/ORCLCDB. Database Information: Global Database Name:ORCLCDB System Identifier(SID):ORCLCDB Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details. SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 15 12:33:00 2025 Version 19.9.1.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.1.0.0 SQL> System altered. SQL> System altered. SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.1.0.0 The Oracle base remains unchanged with value /opt/oracle ######################### DATABASE IS READY TO USE! ######################### The following output is now a tail of the alert.log: 2025-01-15T12:33:00.200091+00:00 AQPC started with pid=43, OS id=2837 Starting background process CJQ0 2025-01-15T12:33:00.279886+00:00 CJQ0 started with pid=48, OS id=2849 Completed: ALTER DATABASE OPEN 2025-01-15T12:33:00.663094+00:00 ALTER SYSTEM SET control_files='/opt/oracle/oradata/ORCLCDB/control01.ctl' SCOPE=SPFILE; 2025-01-15T12:33:00.669302+00:00 ALTER SYSTEM SET local_listener='' SCOPE=BOTH; 2025-01-15T12:33:00.765152+00:00 QPI: opatch file present, opatch QPI: qopiprep.bat file present 2025-01-15T12:33:02.444120+00:00 Shared IO Pool defaulting to 128MB. Trying to get it from Buffer Cache for process 2811. 2025-01-15T12:33:02.505232+00:00 Resize operation completed for file# 3, old size 450560K, new size 460800K 2025-01-15T12:33:02.579912+00:00 =========================================================== Dumping current patch information =========================================================== Patch Id: 29585399 Patch Description: OCW RELEASE UPDATE 19.3.0.0.0 (29585399) Patch Apply Time: 2019-04-18T07:21:33Z Bugs Fixed: 3,27222128,27572040,27604329,27760043,27877830,28302580,28470673, 28621543,28642469,28699321,28710663,28755846,28772816,28785321,28800508, 28808652,28815557,28847541,28847572,28870496,28871040,28874416,28877252, ... 31781897,31792615,31796208,31796277,31816631,31820859,31833172,31867037, 31872230,31876368,31886547,31888148,31897786,31905033,31909295,31921267, 31927930,31935717,31952052,32007698,32010707,32050048,32069834,32089820, 32105135,32129659,32172777,32212635,32234161,32296941,32321765 =========================================================== 2025-01-15T12:37:18.357290+00:00 *********************************************************************** Fatal NI connect error 12537, connecting to: (ADDRESS=(PROTOCOL=tcp)(HOST=172.17.0.1)(PORT=55358)) VERSION INFORMATION: TNS for Linux: Version 19.0.0.0.0 - Production Oracle Bequeath NT Protocol Adapter for Linux: Version 19.0.0.0.0 - Production TCP/IP NT Protocol Adapter for Linux: Version 19.0.0.0.0 - Production Version 19.9.1.0.0 Time: 15-JAN-2025 12:37:18 Tracing not turned on. Tns error struct: ns main err code: 12537 TNS-12537: TNS:connection closed ns secondary err code: 12560 nt main err code: 507 TNS-00507: Connection closed nt secondary err code: 0 nt OS err code: 0 2025-01-15T12:37:18.362695+00:00 opiodr aborting process unknown ospid (3332) as a result of ORA-609 So to me it seems that the database is up and running, and the sys password is password. However, when I try to connect as sys (in order to create my schema) I have this error: ~/tools/instantclient_21_12$ ./sqlplus -S "sys/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=127.0.0.1)(Port=11521))(CONNECT_DATA=(SERVICE_NAME=orcl)))" ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor In sqldeveloper I have the same error. What is my mistake?
Asked by riskop (101 rep)
Jan 15, 2025, 03:44 PM
Last activity: Jul 13, 2025, 11:00 AM