Starting and stopping an oracle DB

STARTING DATABASE

  1. Start Listerner up
       
       # lsnrctl start
    
    1. Connect to sqlplus as sysdba
       SQL> connect sys as sysdba
    
    2. run command 'startup'
       SQL> startup
    
    3. Exit from sqlplus
       SQL> exit
    
    ### STARTING Enterprise Manager
    
    1. Login as oracle user
    
    2. run following command
       <div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">   
       <span style="color:#75715e"># emctl start dbconsole</span>
    
    <span style="color:#75715e">#### example</span>
    
    &lt;div class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;highlight&#34;</span>&gt;&lt;pre style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;</span>&gt;&lt;code class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;language-bash&#34;</span> data-lang<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bash&#34;</span>&gt;-bash-3.00$ emctl start dbconsole
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.2.0
    Copyright &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f92672&#34;</span>&gt;<span style="color:#f92672">(</span>&lt;/span&gt;c&lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f92672&#34;</span>&gt;<span style="color:#f92672">)</span>&lt;/span&gt; 1996, &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#ae81ff&#34;</span>&gt;2005&lt;/span&gt; Oracle Corporation.  All rights reserved.
    http://dbman.toon-net.local:5500/em/console/aboutApplication
    Starting Oracle Enterprise Manager 10g Database Control .............. started.
    
    ------------------------------------------------------------------
    
    Logs are generated in directory /db/oracle/102/dbman.toon-net.local_cava/sysman/log&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    <span style="color:#75715e">### Starting iSQL*Plus (http://dbman.toon-net.local:5560/isqlplus/)</span>
    
    1. Login as oracle
    
    2. run following command
       &lt;div class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;highlight&#34;</span>&gt;&lt;pre style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;</span>&gt;&lt;code class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;language-bash&#34;</span> data-lang<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bash&#34;</span>&gt;   
       &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#75715e&#34;</span>&gt;# isqlplusctl start&lt;/span&gt;
       
       &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    <span style="color:#75715e">#### example</span>
    
    &lt;div class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;highlight&#34;</span>&gt;&lt;pre style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;</span>&gt;&lt;code class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;language-bash&#34;</span> data-lang<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bash&#34;</span>&gt;-bash-3.00$ isqlplusctl start
    iSQL*Plus 10.2.0.2.0
    Copyright &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f92672&#34;</span>&gt;<span style="color:#f92672">(</span>&lt;/span&gt;c&lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f92672&#34;</span>&gt;<span style="color:#f92672">)</span>&lt;/span&gt; 2003, 2005, Oracle.  All Rights Reserved.
    Starting iSQL*Plus ...
    iSQL*Plus started.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    <span style="color:#75715e">### SHUTTING DOWN DATABASE</span>
    
    1. Connect to sqlplus as sysdba
       &lt;div class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;highlight&#34;</span>&gt;&lt;pre style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;</span>&gt;&lt;code class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;language-sql&#34;</span> data-lang<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;sql&#34;</span>&gt;   &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#66d9ef&#34;</span>&gt;connect&lt;/span&gt; sys &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#66d9ef&#34;</span>&gt;as&lt;/span&gt; sysdba
       &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    2. run command <span style="color:#e6db74">&#39;shutdown immediate&#39;</span>
       &lt;div class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;highlight&#34;</span>&gt;&lt;pre style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;</span>&gt;&lt;code class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;language-sql&#34;</span> data-lang<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;sql&#34;</span>&gt;   &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#66d9ef&#34;</span>&gt;SQL&lt;/span&gt;&lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f92672&#34;</span>&gt;&amp;gt;&lt;/span&gt; shutdown &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#66d9ef&#34;</span>&gt;immediate&lt;/span&gt;
       &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    3. Exit from sqlplus
       &lt;div class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;highlight&#34;</span>&gt;&lt;pre style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;</span>&gt;&lt;code class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;language-sql&#34;</span> data-lang<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;sql&#34;</span>&gt;   &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#66d9ef&#34;</span>&gt;SQL&lt;/span&gt;&lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f92672&#34;</span>&gt;&amp;gt;&lt;/span&gt; exit
       &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    <span style="color:#75715e">#### example</span>
    
    &lt;div class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;highlight&#34;</span>&gt;&lt;pre style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;</span>&gt;&lt;code class<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;language-bash&#34;</span> data-lang<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;bash&#34;</span>&gt;bash-3.00# su - oracle
    Sun Microsystems Inc.   SunOS 5.10      Generic January &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#ae81ff&#34;</span>&gt;2005&lt;/span&gt;
    -bash-3.00$ echo $ORACLE_SID
    orcl
    -bash-3.00$ sqlplus /nolog
    
    SQL*Plus: Release 10.2.0.2.0 - Production on Thu May &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#ae81ff&#34;</span>&gt;29&lt;/span&gt; 16:05:14 &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#ae81ff&#34;</span>&gt;2008&lt;/span&gt;
    
    Copyright &lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f92672&#34;</span>&gt;<span style="color:#f92672">(</span>&lt;/span&gt;c&lt;span style<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;color:#f92672&#34;</span>&gt;<span style="color:#f92672">)</span>&lt;/span&gt; 1982, 2005, Oracle.  All Rights Reserved.
    
    SQL&amp;gt; connect sys as sysdba
    Enter password:
    Connected.
    SQL&amp;gt; shutdown immediate
    
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL&amp;gt; SQL&amp;gt; exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</code></pre></div>
Share