What is mounting really mean?? [message #131885] |
Tue, 09 August 2005 23:29  |
edcas
Messages: 38 Registered: July 2005
|
Member |
|
|
Hi, can any experts explain this to me... i'm getting confuse already...
When is this sentence mean "You can have an instance without a database"?
I thought when I issue a STARTUP command in sql*plus, the database will be open and ready to be assessed by the users. Then, how can i start an instance without open a database? What does it mean, and what are the reason behind?
Further, what do mounting a database mean? I'm getting confuse when i do more reading on this topic, especially this statement "A database can be mounted by any number of instances at the same time. If it is mounted by two more instances, this is a Oracle Parallel Server environment. An instance can mount any database, however at most one at a specific time. "
help!!!
[Updated on: Tue, 09 August 2005 23:30] Report message to a moderator
|
|
|
|
Re: What is mounting really mean?? [message #131906 is a reply to message #131885] |
Wed, 10 August 2005 00:44   |
 |
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
Oracle Instance is nothing but SGA+Background process.
SGA is system global area.
There are many oracle background processes.
So you can start an instance (with an initsid.ora or spfile.ora) even without a real database.
By starting the instance actually, you actually reserve the area in memory(that is associated to ORACLE_SID). And Oracle also identifies the location of control files,background dump location etc
through the initsid.ora(or spfile).
see session.
--
-- Check sid
--
oracle@mutation#echo $ORACLE_SID
mutation
--
-- Check for processes in OS level
-- There no oracle processes now
-- Lets start the instance
--
oracle@mutation#ps -ef | grep mutation | grep -v console | grep -v ssh
oracle@mutation#sqlplus "sys/sys as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Wed Aug 10 01:08:30 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
Enter value for gname:
> startup nomount
ORACLE instance started.
Total System Global Area 202868968 bytes
Fixed Size 731368 bytes
Variable Size 167772160 bytes
Database Buffers 33554432 bytes
Redo Buffers 811008 bytes
--
--lets check OS process again.
--You will see the Bgprocess are available now, as the instance is started
--
> !ps -ef | grep mutation | grep -v console | grep -v ssh
oracle 13358 1 0 01:08:36 ? 0:00 ora_ckpt_mutation
oracle 13356 1 0 01:08:36 ? 0:00 ora_lgwr_mutation
oracle 13367 13349 1 01:08:36 ? 0:00 oraclemutation (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 13352 1 1 01:08:35 ? 0:00 ora_pmon_mutation
oracle 13364 1 0 01:08:36 ? 0:00 ora_cjq0_mutation
oracle 13366 1 1 01:08:36 ? 0:00 ora_qmn0_mutation
oracle 13362 1 1 01:08:36 ? 0:00 ora_reco_mutation
oracle 13354 1 1 01:08:36 ? 0:00 ora_dbw0_mutation
oracle 13360 1 0 01:08:36 ? 0:00 ora_smon_mutation
--
-- a quick glance into the alert_sid.log file
-- Shows what exactly happened
--
> !tail -55 $ORACLE_BASE/admin/mutation/bdump/alert_mutation.log
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
SCN scheme 3
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 9.2.0.4.0.
System parameters with non-default values:
processes = 500
timed_statistics = TRUE
shared_pool_size = 117440512
large_pool_size = 16777216
java_pool_size = 0
control_files = /u01/app/oracle/oradata/mutation/control01.ctl, /u01/app/oracle/oradata/mutation/control02.ctl, /u01/app/oracle/oradata/mutation/control03.ctl
db_block_size = 16384
db_cache_size = 33554432
compatible = 9.2.0.0.0
log_archive_dest = /u01/app/oracle/product/9.2.0/dbs/arch2
log_archive_duplex_dest = /u01/app/oracle/product/9.2.0/scr/arch3
log_archive_dest_1 = LOCATION=/u01/app/oracle/product/9.2.0/scr/arch2
log_archive_dest_2 = LOCATION=/u01/app/oracle/product/9.2.0/scr/arch3
db_file_multiblock_read_count= 16
fast_start_mttr_target = 300
undo_management = AUTO
undo_tablespace = UNDOTBS1
undo_retention = 0
remote_login_passwordfile= EXCLUSIVE
db_domain =
instance_name = mutation
job_queue_processes = 10
hash_join_enabled = TRUE
background_dump_dest = /u01/app/oracle/admin/mutation/bdump
user_dump_dest = /u01/app/oracle/admin/mutation/udump
core_dump_dest = /u01/app/oracle/admin/mutation/cdump
sort_area_size = 524288
db_name = mutation
open_cursors = 300
star_transformation_enabled= FALSE
query_rewrite_enabled = FALSE
pga_aggregate_target = 25165824
aq_tm_processes = 1
PMON started with pid=2
DBW0 started with pid=3
LGWR started with pid=4
CKPT started with pid=5
SMON started with pid=6
RECO started with pid=7
CJQ0 started with pid=8
QMN0 started with pid=9
Wed Aug 10 01:09:39 2005
Restarting dead background process QMN0
QMN0 started with pid=9
Wed Aug 10 01:14:55 2005
Restarting dead background process QMN0
QMN0 started with pid=9
Now when you mount the database,
Oracle reads the control file.Many vital information are stored inside this control file. One such
Information is the location of all associated datafiles,redo log files and their status/integrity/its last
startup/shutdown information, datafile headers etc.
If oracle finds any problem with these information or datafiles, you cannot mount thedatabase.
If everything is ok, oracle identifies the datafiles and takes over the control.
at this point You cannot even query the database, until you mount the database.
By mounting, you prepare the database for normal operation,but still in restricted mode (only if
all integrity checks pass, database can be mounted).
> select name from v$database;
select name from v$database
*
ERROR at line 1:
ORA-01507: database not mounted
> alter database mount;
Database altered.
> select name from v$database;
NAME
---------
MUTATION
> !tail -16 $ORACLE_BASE/admin/mutation/bdump/alert_mutation.log
Wed Aug 10 01:14:55 2005
Restarting dead background process QMN0
QMN0 started with pid=9
Wed Aug 10 01:20:11 2005
Restarting dead background process QMN0
QMN0 started with pid=9
Wed Aug 10 01:23:03 2005
alter database mount
Wed Aug 10 01:23:07 2005
Successful mount of redo thread 1, with mount id 2133508983.
Wed Aug 10 01:23:07 2005
Database mounted in Exclusive Mode.
Completed: alter database mount
Wed Aug 10 01:26:13 2005
Restarting dead background process QMN0
QMN0 started with pid=10
By Opening the database, you make it public and available for everyone.
Now, the datafiles and redolog files are open for everyone.
But before doing this, oracle runs an integrity check.This check
ensures that the datafiles and redolog files have the same valid information as it before the
shutdown issued. If there was an abnormal shutdown, or datafile corruption, oracle will error.
You may need to do a recovery.
> !tail -35 $ORACLE_BASE/admin/mutation/bdump/alert_mutation.log
ORA-1100 signalled during: alter database mount...
Wed Aug 10 01:32:00 2005
alter database open
Wed Aug 10 01:32:00 2005
Warning: LOG_ARCHIVE_DUPLEX_DEST invalid
LOG_ARCHIVE_DUPLEX_DEST destination cannot be translated
LGWR: Error 16019 validating archivelog destination information
Wed Aug 10 01:32:00 2005
Errors in file /u01/app/oracle/admin/mutation/bdump/mutation_lgwr_13356.trc:
ORA-16019: cannot use LOG_ARCHIVE_DEST_1 with LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST
ORA-07286: sksagdi: cannot obtain device information.
SVR4 Error: 2: No such file or directory
Thread 1 opened at log sequence 91
Current log# 1 seq# 91 mem# 0: /u01/app/oracle/oradata/mutation/redo01.log
Successful open of redo thread 1.
Wed Aug 10 01:32:00 2005
SMON: enabling cache recovery
Wed Aug 10 01:32:01 2005
Undo Segment 1 Onlined
Undo Segment 2 Onlined
Undo Segment 3 Onlined
Undo Segment 4 Onlined
Undo Segment 5 Onlined
Undo Segment 6 Onlined
Undo Segment 7 Onlined
Undo Segment 8 Onlined
Undo Segment 9 Onlined
Undo Segment 10 Onlined
Successfully onlined Undo Tablespace 1.
Wed Aug 10 01:32:01 2005
SMON: enabling tx recovery
Wed Aug 10 01:32:01 2005
Database Characterset is WE8ISO8859P1
replication_dependency_tracking turned off (no async multimaster replication found)
Completed: alter database open
|----------------
| Open db reads all dbfiles,logfiles
| Makes it publicly available.
|--------------------|
|Mount db,
|reads control file
|identifies all db
|files
|
----------------|
startup
identifies init.ora
and control file
opens sga+bg process
|
|
|
Re: What is mounting really mean?? [message #131950 is a reply to message #131892] |
Wed, 10 August 2005 02:36   |
edcas
Messages: 38 Registered: July 2005
|
Member |
|
|
how do i specific the path for spfile? as i follow the steps in the doc, it can't work...
SQL> STARTUP spfile = C:\orahome\database\spfile.ora
SP2-0714: invalid combination of STARTUP options
|
|
|
Re: What is mounting really mean?? [message #131955 is a reply to message #131950] |
Wed, 10 August 2005 02:51   |
tarundua
Messages: 1080 Registered: June 2005 Location: India
|
Senior Member |
|
|
Where did u read this ? check the docs once again, whether it was pfile or spfile.
U need to specify the path of pfile for starting and then u can create a spfile from pfile.
--> SQL> STARTUP pfile = C:\orahome\database\init_mydb.ora
--> SQL> CREATE SPFILE='C:\orahome\database\spfile_mydb.ora' FROM pfile
regards,
tarun
|
|
|
|
Re: What is mounting really mean?? [message #131983 is a reply to message #131962] |
Wed, 10 August 2005 05:09   |
tarundua
Messages: 1080 Registered: June 2005 Location: India
|
Senior Member |
|
|
Check ur alert log file for detailed errors.
following are the details for ur errors:
Quote: | ORA-00371 not enough shared pool memory
Cause: The SHARED_POOL_SIZE initialization parameter is too small.
Action: Increase the parameter value.
|
Quote: | ORA-32006 string initialization parameter has been deprecated
Cause: A deprecated parameter was specified at startup.
Action: Consult Oracle documentation to find new parameters to use instead
|
so if PARALLEL_AUTOMATIC_TUNING parameter is set in ur pfile then remove it. And then try to start the instance.
regards,
tarun
|
|
|
Re: What is mounting really mean?? [message #132124 is a reply to message #131906] |
Wed, 10 August 2005 21:37   |
edcas
Messages: 38 Registered: July 2005
|
Member |
|
|
hi Mahesh,
Thanks for your clear explaination 
But there are something still bewilder me... like how can a database be mounted by any number of instances at the same time? Wasn’t that 1 instance is pointed to a database only? For example, I have created a database called A. In order to STARTUP the database, I have to start the instance first which is STARTUP NOMOUNT, follow by the database i.e. ALTER DATABASE MOUNT, then OPEN. In this scenerio, I only can see 1 to 1 basis.
Then, how are many instances pointed to 1 database work(see the attachment)?
-
Attachment: instance.JPG
(Size: 9.26KB, Downloaded 899 times)
[Updated on: Wed, 10 August 2005 21:49] Report message to a moderator
|
|
|
|
Re: What is mounting really mean?? [message #132364 is a reply to message #131983] |
Fri, 12 August 2005 03:44   |
edcas
Messages: 38 Registered: July 2005
|
Member |
|
|
hi Tarun,
as ur instruction, I've now removed the parameter parallel_automatic_tuning but now it giv me another error message.
SQL> STARTUP PFILE = c:\orahome\dbs\initdw.ora
ORA-01506: missing or illegal database name
so i add in my database name and try again...
SQL> STARTUP PFILE = c:\orahome\dbs\initdw.ora
ORA-00604: error occurred at recursive SQL level 1
ORA-04031: unable to allocate 4000 bytes of shared memory ("shared pool", "ALTER SESSION SET NLS_LANGUA...", "Typecheck heap", "seg:kggfaAllocSeg")
I suspect the attributes in the pfile is not similar to the one in my database. May i know, is pfile a generic file (do i have to configure myself properly before using it), or it will be updated base on the changes made in the database?
regards,
edcas
|
|
|
Re: What is mounting really mean?? [message #189508 is a reply to message #132364] |
Thu, 24 August 2006 23:20   |
amkotz
Messages: 72 Registered: May 2005 Location: Bangalore
|
Member |
|
|
Hello,
I also have the same problem.
SQL>startup pfile='d:\orant\dbs\initdw.ora';
ORACLE instance started.
Total System Global Area 114367248 bytes
Fixed Size 453392 bytes
Variable Size 62914560 bytes
Database Buffers 50331648 bytes
Redo Buffers 667648 bytes
ORA-01506: missing or illegal database name
when i say :
SQL>SHOW PARAMETER DB_NAME
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string
How to set the DB_NAME ?
It is already there in init.ora file.
|
|
|
Re: What is mounting really mean?? [message #189543 is a reply to message #189508] |
Fri, 25 August 2006 01:23   |
tarundua
Messages: 1080 Registered: June 2005 Location: India
|
Senior Member |
|
|
ORA-01506: missing or illegal database name
Cause: No db_name INIT.ORA aprameter was specified.
Action: The database name must be given in the db_name INIT.ORA parameter.
Are you sure that DB_NAME parameter has a value in init.ora file?
|
|
|
|
|
Re: What is mounting really mean?? [message #189610 is a reply to message #189548] |
Fri, 25 August 2006 04:14   |
sunil_v_mishra
Messages: 506 Registered: March 2005
|
Senior Member |
|
|
1. Startup nomount
This command is given at the time of database creation.
When we give this command the process occur is as below
• Read init.ora
• SGA is allocated
• Background process is started
• Database brought into memory
• Oracle instance is started.
2. Start mount
This is use at time of
Database recovery
Changing database mode to archive to noarchive and visa versa.
Renaming/Relocating system table spaces data files.
When we give this command the process occur is as below
• Read init.ora
• SGA is allocated
• Background process is started
• Reads controlfiles
• Database is brought into memory
• Oracle instant is started
3. Startup
It’s a normal start up command
When we give this command the process occur is as below
• Read init.ora
• SGA is allocated
• Background process is started
• Reads controlfiles
• Database is brought into memory
• Oracle instant is started
• User can connect to the database.
|
|
|
|