Keep getting "Connected to an idle instance" in 18c when trying to connect to database I installed  Oracle Database 18c yesterday and then installed Oracle Application Express v20.1. Everything was perfect and I was able to work on Apex too. 

Then I shutdown the computer and today I cannot connect to the database. Yesterday when I connected to the database I got Connected, but now I keep getting Connected to an idle instance. When I issued the command startup I got the following errors:


ORA-00838: Specified value of MEMORY_TARGET is too small, needs to be at least 3256M
ORA-01078: failure in processing system parameters



Environment : Windows 10 Pro x64, 8GB RAM, AMD R5 1600 Processor, Installed on Samsung PM961 256GB NVMe
If the environemnt variables ORACLE_SID, ORACLE_HOME and ORACLE_BASE are set, then you should be able to connect to an IDLE INSTANCE with SQLPlus. 

C:\&gt; sqlplus sys@&lt;SID&gt; as sysdba


When connected you then create a editable PFILE copy of the instances current SPFILE (run time configuration). Before that be sure to copy the current editable PFILE to some safe locaiton. If you don't have an SPFILE then skip to step 5.


  Notice:
  Please replace the &lt;SID&gt; placeholder I used in my commands with the SID of your actual Oracle instance, and of course the paths to the local SPFILE and PFILE should reflect your actual paths of your installation.


Configuring Oracle Memory Settings


Save the initial PFILE that is created after a setup

C:\&gt; COPY C:\Oracle\admin\&lt;SID&gt;\pfile\init&lt;SID&gt;.ORA C:\Oracle\admin\&lt;SID&gt;\pfile\init&lt;SID&gt;_backup.ORA 

Save any current PFILE that may be laying around

C:\&gt; COPY C:\Oracle\admin\&lt;SID&gt;\pfile\pfile_&lt;SID&gt;.ORA C:\Oracle\admin\&lt;SID&gt;\pfile\pfile_&lt;SID&gt;_backup.ORA 

Log into idle instance

C:\&gt; sqlplus sys@&lt;SID&gt; as sysdba

Create a PFILE (modifiable configuration file) from current SPFILE (run-time configuration file)

SQL&gt; CREATE PFILE = 'C:\Oracle\admin\&lt;SID&gt;\pfile\pfile_&lt;SID&gt;.ORA' from SPFILE = 'C:\Oracle\admin\&lt;SID&gt;\pfile\spfile_&lt;SID&gt;.ORA';

Shutdown the idle instance

SQL&gt; SHUTDOWN IMMEDIATE

In an editor open your current PFILE C:\Oracle\admin\\pfile\pfile_.ORA or the INIT_.ORA file and locate these parameters:

*.memory_max_target=0
*.memory_target=0


These parameters are set when using Automatic Memory Management. If these are both set to 0 (like above) then you are using Automatic Shared Memory Management. You will have to set the following parameters instead:

*.sga_max_size=0
*.sga_target=0


Either of these value pairs should be set. If not, then modify the memory_max_target and memory_target parameters to something like 4G. Save the configuration file and...
Start the Oracle instance using the freshly created PFILE.

C:\&gt; sqlplus sys@&lt;SID&gt; as sysdba
SQL&gt; STARTUP PFILE='C:\Oracle\admin\&lt;SID&gt;\pfile\pfile_&lt;SID&gt;.ORA';

When instance is running, create the run-time configuration file.

SQL&gt; CREATE SPFILE='C:\Oracle\admin\&lt;SID&gt;\pfile\spfile_&lt;SID&gt;.ORA' FROM PFILE='C:\Oracle\admin\&lt;SID&gt;\pfile\pfile_&lt;SID&gt;.ORA';

When the SPFILE has been created shutdown the instance.

SQL&gt; SHUTDOWN IMMEDIATE

Restart the instance which should use the freshly create SPFILE (run-time configuration).

C:\&gt; sqlplus sys@&lt;SID&gt; as sysdba
SQL&gt; STARTUP 



And you should be on your way.