DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

Why create between pfile and spfile works if shutdown database

By: rekha singh | 09 Feb 2010 1:31 pm

Why create between pfile and spfile works if shutdown database. 
Sometimes it may arises question that while database is shutdown then you can still connect to database as sysdba and now issue create spfile from pfile or create pfile from spfile and it works fine. But database is shutdown and then how oracle maintains where is spfile and pfile.

Comments

The answer is create pfile and spfile can only can done whenever you connect as sysdba. And if you connect as sysdba then a dedicated server is established which does that create operation.

By: rekha singh | 09 Feb 2010

Sometimes it may arises question that while database is shutdown then you can still connect to database as sysdba and now issue create spfile from pfile orcreate pfile from spfile and it works fine. But database is shutdown and then how oracle maintains where is spfile and pfile.

The answer is create pfile and spfile can only can done whenever you connect as sysdba. And if you connect as sysdba then a dedicated server is established which does that create operation.

You can easily find it. Suppose I am log on to my unix machine and invoke the status of process kaku. 
-bash-3.00$ ps -ef |grep kaku
oracle 27060 1 0 04:58:09 ? 0:07 oraclekaku (LOCAL=NO)
oracle 26970 1 0 04:54:43 ? 0:21 ora_ckpt_kaku
oracle 26974 1 0 04:54:43 ? 0:00 ora_reco_kaku
oracle 16423 16224 0 23:00:25 pts/3 0:00 grep kaku
oracle 27024 1 0 04:55:00 ? 0:08 oraclekaku (LOCAL=NO)
oracle 27028 1 0 04:55:15 ? 0:08 oraclekaku (LOCAL=NO)
oracle 26972 1 0 04:54:43 ? 0:04 ora_smon_kaku
oracle 26976 1 0 04:54:43 ? 0:21 ora_cjq0_kaku
oracle 26982 1 0 04:54:44 ? 0:00 ora_d000_kaku
oracle 27030 1 0 04:55:15 ? 0:37 oraclekaku (LOCAL=NO)
oracle 26964 1 0 04:54:43 ? 0:02 ora_mman_kaku
oracle 26994 1 0 04:54:49 ? 0:01 ora_arc1_kaku
oracle 27002 1 0 04:54:50 ? 0:00 ora_qmnc_kaku
oracle 27032 1 0 04:55:15 ? 0:10 oraclekaku (LOCAL=NO)
oracle 26968 1 0 04:54:43 ? 0:09 ora_lgwr_kaku
oracle 27022 1 0 04:55:00 ? 0:01 ora_q000_kaku
oracle 26980 1 0 04:54:44 ? 0:35 ora_mmnl_kaku
oracle 26984 1 0 04:54:44 ? 0:00 ora_s000_kaku
oracle 26962 1 0 04:54:43 ? 0:03 ora_psp0_kaku
oracle 26966 1 0 04:54:43 ? 0:06 ora_dbw0_kaku
oracle 26978 1 0 04:54:43 ? 0:07 ora_mmon_kaku
oracle 26960 1 0 04:54:43 ? 0:16 ora_pmon_kaku
oracle 26992 1 0 04:54:49 ? 0:01 ora_arc0_kaku
oracle 27040 1 0 04:55:52 ? 0:00 ora_q002_kaku

Now I connect as sysdba and see the status.
-bash-3.00$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 8 23:00:31 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> !ps -ef |grep kaku
oracle 27060 1 0 04:58:09 ? 0:07 oraclearkaku (LOCAL=NO)
oracle 26970 1 0 04:54:43 ? 0:21 ora_ckpt_kaku
oracle 26974 1 0 04:54:43 ? 0:00 ora_reco_kaku
oracle 16433 1 0 23:00:33 ? 0:00 ora_m001_kaku
oracle 16429 1 1 23:00:30 ? 0:00 ora_j000_kaku
oracle 27024 1 0 04:55:00 ? 0:08 oraclekaku (LOCAL=NO)
oracle 27028 1 0 04:55:15 ? 0:08 oraclekaku (LOCAL=NO)
oracle 26972 1 0 04:54:43 ? 0:04 ora_smon_kaku
oracle 26976 1 0 04:54:43 ? 0:21 ora_cjq0_kaku
oracle 26982 1 0 04:54:44 ? 0:00 ora_d000_kaku
oracle 27030 1 0 04:55:15 ? 0:37 oraclekaku (LOCAL=NO)
oracle 26964 1 0 04:54:43 ? 0:02 ora_mman_kaku
oracle 26994 1 0 04:54:49 ? 0:01 ora_arc1_kaku
oracle 27002 1 0 04:54:50 ? 0:00 ora_qmnc_kaku
oracle 27032 1 0 04:55:15 ? 0:10 oraclekaku (LOCAL=NO)
oracle 26968 1 0 04:54:43 ? 0:09 ora_lgwr_kaku
oracle 27022 1 0 04:55:00 ? 0:01 ora_q000_kaku
oracle 26980 1 0 04:54:44 ? 0:35 ora_mmnl_kaku
oracle 16431 16430 0 23:00:31 ? 0:00 oraclekaku (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 26984 1 0 04:54:44 ? 0:00 ora_s000_kaku
oracle 26962 1 0 04:54:43 ? 0:03 ora_psp0_kaku
oracle 16436 16434 0 23:00:34 pts/3 0:00 grep kaku
oracle 26966 1 0 04:54:43 ? 0:06 ora_dbw0_kaku
oracle 26978 1 0 04:54:43 ? 0:07 ora_mmon_kaku
oracle 26960 1 0 04:54:43 ? 0:16 ora_pmon_kaku
oracle 26992 1 0 04:54:49 ? 0:01 ora_arc0_kaku
oracle 27040 1 0 04:55:52 ? 0:00 ora_q002_kaku
oracle 16434 16430 0 23:00:34 pts/3 0:00 /usr/bin/bash -c ps -ef |grep kaku

Here you see a dedicated server is established as you connect as sysdba.
Now shutdown database and see the process status.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !ps -ef |grep kaku
oracle 16540 16430 0 23:04:37 pts/3 0:00 /usr/bin/bash -c ps -ef |grep kaku
oracle 16542 16540 0 23:04:37 pts/3 0:00 grep kaku
oracle 16431 16430 1 23:00:31 ? 0:01 oraclekaku (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))

We still see the dedicated server as we still connect to as sysdba.
Now exit from connecting as sysdba and observe the result.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ ps -ef |grep kaku
oracle 16544 16224 0 23:04:44 pts/3 0:00 grep kaku

Nothing here now.

By: rekha singh | 09 Feb 2010

Wow! that was an awesome explanation... I had never thought/come across this before.

By: | 05 Mar 2010

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move