Home » Start Oracle database in Windows safe mode
Start Oracle database in windows safe mode

Start Oracle database in Windows safe mode

How to start oracle database and backup it while windows in safe mode

by mn.sobieh

Operating system crashes are one of the issues that might face you especially if your server is using windows. This article explains how backup oracle database from windows safe mode. and by example, I will explain the steps to start oracle in windows safe mode and backup it up.

Unfortunately, If you try to start the Oracle database while your Windows OS was in safe mode, It will fail giving an error message

Error 1058: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

Start DB Service Error

Also, if you tried to use the command line by starting the instances or listener you will get the Listner error

TNS-12500 TNS: protocol adapter error.
 TNS-00530: Protocol adapter error


Enable Oracle Service.

Change the Oracle service status, This will enable you to start the oracle database in safe mode. In this example Oracle database instance is ORCL, and as a result, the service name is Oracle ServiceORCL.

You can use either Command line interface, execute the following command

sc config OracleServiceORCL start=auto

Or if you prefer using Windows graphical interface, then follow these steps to enable Oracle services in Windows services

Right-click on start windows then click on Computer Management.

In the right-side panel expand Service and Applications, then click  Service Link.

On the left side, make sure that the Oracle database and listener services are not disabled. To enable the services, double-click to open OracleServicesORCL properties then select manual from the startup type drop-down menu.

Repeat the process for the listener service.

Configure the service to run on windows safe mode.

add the following entries to the windows registry, allowing the Oracle services to run in Operating system safe mode.

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\OracleServiceORCL" /VE /T REG_SZ /F /D "Service"

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\OracleServiceORCL" /VE /T REG_SZ /F /D "Service"

Start oracle database

It’s essential to have your oracle database running to take a backup of the data you can start the service from the Computer management graphical interface. Just right-click on the service name then choose start.

or execute the following command from the Command prompt

net start OracleServiceORCL

To confirm that oracle is started. try to log in using sqlplus

sqlplus / as sysdba

Backup oracle database in safe mode:

To export the full database execute the following command

expdp directory=dump full=Y dumpfile=lastbackup_YYYYMMDD.dmp logfile=lastbackup_YYYYMMDD.log

This command used the database object directory named dump to save the database dump.

To create a directory using the following SQL statement.

SQL> CREATE DIRECTORY dump AS 'd:\dump_dir';

In Conclusion, If you were able to log in to your system in “Windows” safe mode, you will be able to back up the Oracle database from windows safe mode and recover your data from the database. follow the simple instruction mentioned earlier.


You may also like

Leave a Comment