Create and verify a Windows service for an Oracle 19c (or later) database instance
Creating an Oracle Service on Windows with the ORADIM Utility
In modern Oracle environments, most cloud deployments (including Oracle Cloud Infrastructure) run Oracle Database on Linux and manage database lifecycle through the cloud console, REST APIs, and automation tools. On Windows, however, the database instance still runs inside one or more Windows services, and the ORADIM utility is the supported command-line tool for creating and managing those services for Oracle Database 19c and later.
Use ORADIM when you:
Install Oracle Database on a Windows server (on-premises or cloud-hosted VM) and want to create a new instance manually.
Need to add, modify, or delete the Windows service that starts the database instance.
Are working in a hybrid environment where some databases run in the cloud and others run as Windows services.
In fully managed cloud services (for example Autonomous Database), ORADIM is not used; those services manage instances automatically. In this lesson, we focus on Windows-based Oracle Database 19c+ where ORADIM is still the key utility.
Step-by-Step: Creating a New Oracle Service
The following procedure assumes you have already installed Oracle Database on a Windows server and want to create a service for a database such as COIN or ORCL.
Open Command Prompt with administrative privileges
From the Start menu, search for Command Prompt.
Right-click and choose Run as administrator.
Run the ORADIM command
General syntax for creating a new service in Oracle 19c+ on Windows:
The Windows service name will typically be OracleServiceCOIN.
The instance will start when the Windows service starts (because -startmode AUTO is used).
ORADIM writes diagnostic information to oradim-coin.log.
Verify the service
Open the Services console (services.msc).
Locate OracleServiceCOIN (or the name matching your SID).
Confirm that:
Status is Running (if you chose AUTO and the service started successfully).
Startup type matches Automatic or Manual based on your ORADIM command.
Start and stop the service
You can manage the service from the command prompt:
net start OracleServiceCOIN
net stop OracleServiceCOIN
Or you can use the Services console to start, stop, or restart the service.
ORADIM Syntax Reference (Windows)
The ORADIM syntax below summarizes the core options for creating an Oracle Database service on Windows. This form has been stable from Oracle 9i through 19c and remains relevant in current Windows deployments.
oradim – The Windows-only utility for creating and managing Oracle database services.
-new – Indicates you are creating a new service (as opposed to editing or deleting one).
-sid sid – Specifies the SID for the new instance (for example COIN or ORCL).
-srvc service – Specifies a custom Windows service name. You use either-sidor-srvc, but not both.
-intpwd password – Sets the internal/privileged password used when the service starts the instance (optional but recommended for security).
-maxusers integer – Reserves space for a maximum number of user processes; in modern systems this is less commonly used but still supported.
-startmode {auto | manual} – Controls whether the service starts automatically when Windows boots or must be started manually.
-pfile filespec – Points to the initialization parameter file (initSID.ora).
-spfile – Uses the server parameter file (spfileSID.ora) instead of a text pfile.
-timeout seconds – Limits how long ORADIM waits before timing out service creation.
-log <log_file> – Directs diagnostic output to the specified log file.
Administering an Oracle Instance with ORADIM
ORADIM is typically needed only when you:
Manually create or delete a database instance on Windows.
Change how the service starts (AUTO vs MANUAL).
Reset the internal password or change the parameter file used at startup.
To view ORADIM help and parameter descriptions:
oradim -?
oradim -h
oradim -help
ORADIM writes operational details to a log file named oradim.log in:
%ORACLE_HOME%\database
or in the directory specified by the registry parameter ORA_CWD. You should always check this log file to verify whether service creation or modification succeeded.
Typical ORA-12640 Issue on Windows
On Windows, Oracle Database commonly uses OS authentication via the setting:
SQLNET.AUTHENTICATION_SERVICES = (NTS)
If the database service starts as the built-in LocalSystem account and networking or authentication is misconfigured, you may see:
Modern approaches to resolving this problem include:
Run the service under a dedicated Windows user
Configure the OracleServiceSID service to use a domain or local user that:
Has the required “Log on as a service” right.
Has appropriate access to Oracle binaries, datafiles, and network locations.
Review sqlnet.ora
Ensure that SQLNET.AUTHENTICATION_SERVICES is set appropriately for your security model. For example, to allow OS authentication on Windows:
SQLNET.AUTHENTICATION_SERVICES = (NTS)
Only if you have a clear security design and do not require OS authentication would you consider:
SQLNET.AUTHENTICATION_SERVICES = (NONE)
Disabling OS authentication may simplify some configurations but should be evaluated carefully in regulated or enterprise environments.
Start the database explicitly after the service
Even when the service starts successfully, you can use SQL*Plus as SYSDBA to verify and start the instance:
sqlplus / as sysdba
STARTUP;
This is common in scripted or automated startup scenarios on Windows servers, including cloud-hosted Windows VMs.
Verifying Oracle Services in the Windows Console
After creating your service for the COIN database, verify its configuration using the Windows Services console:
Open the Services console
Click the Start button.
Type services.msc and press Enter.
The Services management console opens.
Locate Oracle services
Scroll down to the entries beginning with Oracle.
Find the service named OracleServiceCOIN (or your SID).
Confirm that:
Status is Running if you expect the instance to be up.
Startup type matches how you configured ORADIM (Automatic or Manual).
In hybrid environments, this step is useful for quickly verifying that your on-premises or Windows VM–based database is ready to serve connections alongside your cloud databases.
Create Oracle Service - Exercise
Now, go on to the exercise to create a service for your database, and open the services control panel on your own. Create Oracle Service - Exercise