{"id":3304,"date":"2025-05-03T11:19:52","date_gmt":"2025-05-03T11:19:52","guid":{"rendered":"https:\/\/w3buddy.com\/?p=3304"},"modified":"2026-01-15T12:44:23","modified_gmt":"2026-01-15T07:14:23","slug":"oracle-db-startup-steps-on-linux","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/oracle-db-startup-steps-on-linux\/","title":{"rendered":"Oracle DB Startup Steps on Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Starting an Oracle database manually requires a good understanding of your Oracle environment. You need at least two essential details:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Oracle Home (ORACLE_HOME)<\/strong><\/li>\n\n\n\n<li><strong>Oracle SID (ORACLE_SID)<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In this guide, we\u2019ll walk through <strong>various methods to start an Oracle database on Linux<\/strong>, covering different startup states and how to switch between them. Though we focus on Linux, the SQL commands remain the same on Windows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd04 Oracle Database Instance Lifecycle<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An Oracle instance transitions through the following four states:<\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>State<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><strong>IDLE<\/strong><\/td><td>No instance or processes are running.<\/td><\/tr><tr><td><strong>NOMOUNT<\/strong><\/td><td>Oracle instance is started with memory and background processes.<\/td><\/tr><tr><td><strong>MOUNT<\/strong><\/td><td>Control files are read, database structure is recognized but not open.<\/td><\/tr><tr><td><strong>OPEN<\/strong><\/td><td>Database is open and accessible for user operations.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You typically start from <strong>IDLE<\/strong> and move to the required state.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcd8 Required Files by Startup State<\/h2>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Startup State<\/th><th>Required Files<\/th><\/tr><\/thead><tbody><tr><td>NOMOUNT<\/td><td>Parameter File (SPFILE or PFILE)<\/td><\/tr><tr><td>MOUNT<\/td><td>Control Files<\/td><\/tr><tr><td>OPEN<\/td><td>Data Files + Redo Log Files<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Note: Temporary data files are not required at startup \u2014 Oracle recreates them if missing.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\udded Section A: Starting Oracle to NOMOUNT<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In NOMOUNT, Oracle only requires a parameter file to allocate memory and start background processes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 Environment Variables<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure these are set:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">$ echo $ORACLE_HOME\n\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\n\n$ echo $ORACLE_SID\nORCL<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\ude80 Commands<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. Start with default SPFILE<\/h4>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> startup nomount;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2. Start with specific PFILE<\/h4>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> startup nomount pfile='\/tmp\/initORCL.ora';<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3. Force start (useful when SPFILE is missing, done via RMAN)<\/h4>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">RMAN> startup force nomount;\n-- or\nRMAN> startup nomount force;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\ud83d\udd0d Check status<\/h4>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> select instance_name, status from v$instance;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\udded Section B: Mounting the Oracle Database<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In MOUNT state, Oracle uses <strong>control files<\/strong> to locate data and redo logs but doesn\u2019t open the files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. From IDLE to MOUNT<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> startup mount;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Using PFILE explicitly<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> startup mount pfile='\/tmp\/initORCL.ora';<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. From NOMOUNT to MOUNT<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> alter database mount;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\ud83d\udd0d Verify<\/h4>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">SQL> select instance_name, status from v$instance;\nSQL> select name, open_mode from v$database;<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u26a0 For RAC databases, <strong>ALTER DATABASE MOUNT<\/strong> affects only the current instance.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\udded Section C: Opening the Oracle Database<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Opening means full access \u2014 users can read\/write depending on mode.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 Modes of OPEN<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>READ WRITE<\/strong> (default)<\/li>\n\n\n\n<li><strong>READ ONLY<\/strong><\/li>\n\n\n\n<li><strong>RESTRICTED SESSION<\/strong><\/li>\n\n\n\n<li><strong>RESETLOGS<\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">1. From IDLE to OPEN<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">All below are equivalent:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> startup;\nSQL> startup open;\nSQL> startup open read write;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Check status<\/h4>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> select name, open_mode from v$database;<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">If database is a standby, it opens in <strong>READ ONLY<\/strong> by default.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">2. Open in RESTRICTED mode<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> startup restrict;\n-- To disable later:\nSQL> alter system disable restricted session;\n-- To re-enable:\nSQL> alter system enable restricted session;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. Open in READ ONLY mode<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> startup open read only;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To confirm:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> select name, open_mode from v$database;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. From MOUNT to OPEN<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> alter database open;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To force <strong>resetlogs<\/strong> after recovery:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> alter database open resetlogs;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To open in <strong>READ ONLY<\/strong> from MOUNT:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> alter database open read only;<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u2757 You can&#8217;t switch directly between <strong>READ ONLY<\/strong> and <strong>READ WRITE<\/strong>. You must restart the database.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udded Section D: Startup with Scripts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Using <strong>dbstart<\/strong> for Batch or Automated Startup<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle provides the <strong>dbstart <\/strong>utility to start databases automatically, which is especially useful during server reboots or for scripted automation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Typical steps:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Edit<strong> <\/strong>oratab using <strong>vi \/etc\/oratab<\/strong><br>Locate your database entry and change the last field to <code>Y<\/code> to enable auto-start.<br>Example: <strong>ORCL:\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1:Y<\/strong><\/li>\n\n\n\n<li>Run the dbstart command: <strong>$ $ORACLE_HOME\/bin\/dbstart $ORACLE_HOME<\/strong><\/li>\n\n\n\n<li><em>(Optional)<\/em>Automate with system startup:\n<ul class=\"wp-block-list\">\n<li>Add the <strong>dbstart <\/strong>command to system startup scripts like <strong>\/etc\/rc.local<\/strong> (for older Linux versions) or create a custom systemd service on modern systems.<\/li>\n\n\n\n<li>Alternatively, set up a <strong>cron <\/strong>job with <strong>@reboot<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddf1 Working with Pluggable Databases (PDBs)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Since Oracle 12c, databases can use <strong>Multitenant Architecture<\/strong>. You have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CDB<\/strong> \u2013 Container Database (main host)<\/li>\n\n\n\n<li><strong>PDB<\/strong> \u2013 Pluggable Databases (guests)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">PDBs are in <strong>MOUNT<\/strong> state by default. You can open them individually:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> alter pluggable database all open;\n-- or specific one\nSQL> alter pluggable database pdb_name open;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To persist this behavior after restart:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SQL> alter pluggable database pdb_name save state;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\udde9 Summary<\/h2>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Transition<\/th><th>Command Example<\/th><\/tr><\/thead><tbody><tr><td>IDLE \u2192 NOMOUNT<\/td><td>startup nomount;<\/td><\/tr><tr><td>NOMOUNT \u2192 MOUNT<\/td><td>alter database mount;<\/td><\/tr><tr><td>MOUNT \u2192 OPEN<\/td><td>alter database open;<\/td><\/tr><tr><td>OPEN (Restricted)<\/td><td>startup restrict;<\/td><\/tr><tr><td>OPEN (Read Only)<\/td><td>startup open read only;<\/td><\/tr><tr><td>OPEN (Resetlogs)<\/td><td>alter database open resetlogs;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Final Notes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always ensure <strong>environment variables<\/strong> are set.<\/li>\n\n\n\n<li>Prefer <strong>SPFILE<\/strong> over PFILE for consistency.<\/li>\n\n\n\n<li>Use <strong>dbstart<\/strong> for automating startup.<\/li>\n\n\n\n<li>Handle <strong>RAC and PDBs<\/strong> with extra care \u2014 they have unique behaviors.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Starting an Oracle database manually requires a good understanding of your Oracle environment. You need at least two essential details: In this guide, we\u2019ll walk through various methods to start an Oracle database on Linux, covering different startup states and how to switch between them. Though we focus on Linux, the SQL commands remain the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1225],"tags":[],"class_list":["post-3304","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/3304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=3304"}],"version-history":[{"count":1,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/3304\/revisions"}],"predecessor-version":[{"id":3306,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/3304\/revisions\/3306"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=3304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=3304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=3304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}