Skip navigation

While login to ENTERPRISE MANAGMENT CONSOLE,  I find following messages which says ACCESSIBILITY MODE ----> DISABLED. As a result, I was not able to login to ENTERPRISE MANAGER MAIN PAGE which is mentioned at the bottom mentioned at SIXTH .

First : In order to ENABLE/ACCESSIBLE the ACCESSIBILITY MODE, Login to oracle user and then You need to go to WEB-INF directory. The FULL LOCATION for WEB-INF directory is mentioned below.

 

[oracle@storage ~]$ echo $ORACLE_HOME

/u01/app/oracle/product/11.2.0/db_1

[oracle@storage ~]$  cd $ORACLE_HOME/j2ee/OC4J_EM/applications/em/em/WEB-INF

 

OR You can directly go to WEB-INF in following way i.e. whichever is convenient for you.

[oracle@storage WEB-INF]$  cd /u01/app/oracle/product/11.2.0/db_1/j2ee/OC4J_EM/applications/em/em/WEB-INF

[oracle@storage WEB-INF]$

 

SECOND : LOOK FOR uix-config.xml

[oracle@storage WEB-INF]$  ls

config  deployment  lib  orion-web.xml.template  publicPages.lst  tlds  uix-config.xml  uix-config.xml.template  web.xml

[oracle@storage WEB-INF]$

 

THIRD : Edit uix-config.xml , and then convert INACCESSIBLE TO ACCESSIBLE and Save & Exit

[oracle@storage WEB-INF]$  vi uix-config.xml

 

 

 

<!-- An alternate configuration that disables accessibility features  -->

  <default-configuration>

   <accessibility-mode>inaccessible</accessibility-mode>

   <supported-locales>

 

 

 

FOURTH: STOP AND START ENTERPRISE MANAGER again

 

[oracle@storage WEB-INF]$ emctl stop dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0

Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.

http://storage:1158/em/console/aboutApplication

Stopping Oracle Enterprise Manager 11g Database Control ...

...  Stopped.

[oracle@storage WEB-INF]$ emctl start dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0

Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.

http://storage:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 11g Database Control ...... started.

------------------------------------------------------------------

Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/storage_orcl/sysman/log

[oracle@storage WEB-INF]$

 

FIFTH : LOGIN TO TO CONSOLE PAGE

http://storage:1158/em/console/aboutApplication

 

 

SIXTH : After loging, You will reached at the following page :-

 

As mentioned before that ORACLE DATABASE server consist of two components one is INSTANCE and another one is DATABASE.

Database consist of different file system and in this topics we will discuss about DATA FILE. So data file is are those file where you data’s get stored. For more clear, let’s say I am going to trigger INSERT query with some value on EXAMPLE table.

For example like this:

Insert into EXAMPLE ( 1, abc, def, 1024 )

So here 1, abc, def, 1024 are called DATA and where I am going to stored in a file called DATA FILE.

But the scenario many not be going like that there might be thousands of data file and inside that data file one data file may consist 2 GB of space. So, the question here is how you going to organize those number of DATA FILES and another question is how you going to organize those data inside the DATA FILE that what we will discussed in this topics.

Let me show you the list of data file first located in my pc. From the below screenshot you can see that there are different types of data files like EXAMPLE, SYSAUX,SYSTEM,UNDO, USERS  which we will discussed about this on next topic but in this topics how we going to discussed how this data files are going to managed. So here we going to learn how this data get organized.

So let’s start with simple example whenever you going to create table.  This is a DDL SQL statement. Say like I am going to create table named EXAMPLE.

CREATE TABLE EXAMPLE ( a number)

So here whenever you going to create a table example, oracle is going to create special storage unit and that storage unit is called SEGMENT. That means for any object that is going to consume some storage that means one SEGMENT storage must be created on that. So table EXAMPLE and this is table EXAMPLE segment.

 

 

Note: This segment will have an initial size which can be given at the time of create statement. In this case I haven’t gave any those parameter. If parameter in not given then ORACLE will going to take default parameter.

 

Let’s assume like 2 MB space will be allocate for data which is going to store at table EXAMPLE segment.

As I have mentioned above assuming 2 MB space is provided for SEGMENT. Again this segment contains multiple extents that means, you can assume like this 2 MB segment as two extent where 1 MB space is given on each extent. This means segment consist of extent. Note: There can be numerous extent but As per table EXAMPLE scenario it consist of TWO EXTENTS and inside extent the MEMORY ALLOCATION is contiguous but there is no information that each extent should not be / should be far away from each other.

 

 

 

Again inside extent it consist of number of BLOCKs.

 

Now let’s discuss how block is look like?

Firstly, It has space allocated inside the block which is called header or BLOCK HEADER. So header contains what kind of header inside it? Which mean if it is going to put table data, index data or plsql procedure.  So what types of data’s this block is going to stored? We put that in the header.

Secondly, If any activities going on right now inside the block. Let’s assume like this is table block and for that table let’s say i am triggering update. This means i am doing some sort of update activities / transaction.  So activities / transactions information.

Third, is Address which contains the location for where data is located?

TABLE DIRECTORY: There is some space allocated for table directory. For example if this is table block then it going to contains the name of the table whose data is going to store in this block

ROW DIRECTORY: Let’s assume in block C , we have some row like following. We have three rows. So what is the row address of the following three rows that is going to be stored under ROW DIRECTORY? Therefore ROW DIRECTORY contains the address of rows only.

1  abc def 1024

2  bbc bef 1025

3  abc def 1024

DATA BLOCK: Then we also have data block which contains the information about the data that going to be stored here.

Then I have some empty space those empty space is put for future updates or for updates task.

 

This three together the header, table directory and row directory is called BLOCK OVERHEAD. BLOCK OVERHEAD inside we store metadata about what things are going to store inside the block

 

Now if BLOCKS information is clear then lets got to above SEGMENT, EXTENT AND BLOCK figure again.

 

 

All the SEGMENT, EXTENT and BLOCKS, they are put together in a container and that container is called TABLESPACE. So tablespace is something which contains segments, extent and blocks.

 

 

Let’s take an another example

Assume like I have a table named T1, T2 then I have index named I1 and I2

So whenever I created table t1 I will give what is the tablespace that I am going to have for table named t1. Let’s assume like table space for t1 table is TA which means t1 is a part of TA

Let’s say T1 table segment named is S1

Similarly Table T2 is also part of TA tables pace, T2 table segment named is S2. Similarly index I1 segment and I2 segment. The segment is consist of number of extent and number of extents consists of number of blocks.

 

Then table space TA is associated with file called 1.dbf file. In my case file are like SYSAUX, USERDBF

 

 

 

  1. So from above figure what you are seeing is 1.dbf/user.dbf with .dbf format is physical file which is data file and the table space is actually a part of dbf. So below what we are seeing is LOGICAL STRUCTURE (tablespace à segment -à extent -à blocks) and PHSYCIAL STRUCTURE is a data file.

A parameter is key value pair. One of the parameter example is like db_block_size whose value is 8192 (8 kb)

 

so db_block_size is key

 

and 8192 is value

 

and another name example is db_name=orcl

 

 

A group of similar parameters are put together in file and that file is called Parameter file.

 

NOW LETS DISCUSS ABOUT PARAMETER FILE. The first parameter file is something related to network and that is

 

1. Tnsnames.ora=This is a network file so what tnsnames.ora suggest is that this file map the net

services name to connect discriptor. In simple word what is the alias name where we can connect to a database.

 

 

2. LISTENER.ORA=is the file which tell on which PORT LISTENER is going to run. By default LISTENER PORT IS 1521 but there

is feature where you can change the default parameter to 1523.

 

 

3. DATABASE PARAMETER FILE : ----> This is historically known as INIT.ORA. So init.ora / database parameter file

consist of parameter that required to start the database. In this lesson we going to concentrate mostly on this.

 

[oracle@storage dbs]$  cd /u01/app/oracle/product/11.2.0/db_1/dbs

[oracle@storage dbs]$ ls

hc_DBUA0.dat  hc_orcl.dat  init.ora  initorcl.ora  lkORCL  orapworcl  snapcf_orcl.f

[oracle@storage dbs]$

 

Here my init.ora name is initorcl.ora so what is ORCL. ORCL is oracle sid i.e. site identifier

 

WHAT IS SITE IDENTIFIER ? ORACLE_HOME IS WHERE U INSTALL ORACLE.

Site Identifier is a value. SITEIDENTIFIER + ORACLE HOME = UNIQUE KEY

 

SID + ORACLE HOME TOGETHER CREATES A UNIQUE KEY AND that UNIQUE KEY is attached to the SGA (SYSTEM GLOBAL AREA).

For whatever reason if you give wrong SID name then it give u an error saying ORACLE IS NOT AVAILABLE and the reason

for this is that whatever unique key you are generating that key is not able to attached to SGA. To startup database

you need INIT with SID i.e.INITORCL.ORA . In my case my SID name is ORCL so therefor i am seeing initorcl.ora

 

 

SO IF YOU LOOKING AT INITORCL.ORA YOU are going to seem some value like KEY VALUE PAIR.

 

CONTROL_FILES=''

DB_NAME=ORCL;

SESSION=20;

 

so essentially what this parameter suggest how the instance is configure ?

 

 

If you look at initorcl.ora file the you will see at least 10 to 15 parameter which are default parameter

but in real in order to start DATABASE you actually required three parameters.

 

1. CONTROL FILE

2. DB_BLOCK_SIZE

3. DATABASE NAME

 

ISO if you have above three parameters then all other parameters are either default or can be computed

based on above three parameters.

 

NOTE : UNDER YOU LOCAL SERVER YOU WILL SEE ONLY 10 TO 15 PARAMETER BUT IN YOUR PRODUCTION YOU MAY SEE LOTS OF VALUES WILL BE THERE.

 

DESC V$PARAMETER;

SELECT COUNT(*) FROM V$PARAMETER;

 

 

HOW TO CHECK PARAMETER ? LETS SAY YOU WANT TO CHECK SQL  TRACE PARAMETER.

 

SHOW PARAMETER SQL_TRACE; OUTPUT SHOWS SQL TRACE PARAMETER IS SET TO FALSE

 

SHOW PARAMETER SQL_TRACE; second option

 

NOW HOW TO MODIFY THE PARAMETER. There are two where you can modify parameter

 

first one going inside init.orra

second is use alter command

 

alter system set sql_trace= true scope=memory;

 

AGAIN CHECK THE VALUE OF SQL TRACE it will show true

 

SHOW PARAMETER SQL_TRACE;

 

LET'S UNDERSTAND THIS CLAUSE SCOPE=MEMORY

 

ONCE DB STARTED, THE DB STARTED WITH THE DEFAULT PARAMETER WHICH WAS SQL TRACE = FALSE

 

THEN WHEN I SAY SCOPE=MEMORY, THIS MEANS SQL TRACE VALUE WILL BE TRUE AS LONG AS REMAINS ON. AFTER SOMETIME

IF YOU SHUTDOWN AND MAKE DATABASE ON AND CHECK SQL TRACE PARAMETER THEN THE STATUS WILL SHOW BACK TO FALSE AGAIN.

 

 

 

DB STARTED ---FALSE

|

|

|

|----------TRUE

|

|

|

DB SHUTDOWN AND RESTART ----FALSE

 

 

THEN WHEN I SAY SCOPE=SPFILE, THIS MEANS SQL TRACE VALUE WILL BE FALSE AS LONG AS REMAINS ON. AFTER SOMETIME

IF YOU SHUTDOWN AND MAKE DATABASE ON AND CHECK SQL TRACE PARAMETER THEN THE STATUS WILL SHOW TRUE. SO HERE IN THIS CASE IN ORDER TO GET TRUE STATUS

YOU NEED TO SHUTDOWN AND RESTART DATABASE

 

 

 

DB STARTED ---FALSE

|

|

|

|----------FALSE

|

|

|

DB SHUTDOWN AND START ---TRUE

 

 

 

 

THEN WHEN I SAY SCOPE=BOTH, THIS MEANS SQL TRACE VALUE WILL BE TRUE RIGHT AWAY AS LONG AS REMAINS ON. AFTER SOMETIME

IF YOU SHUTDOWN AND MAKE DATABASE ON AND CHECK SQL TRACE PARAMETER THEN THE STATUS WILL SHOW TRUE. SO HERE IN THIS CASE IN ORDER TO GET TRUE STATUS

YOU DO NOT NEED TO SHUTDOWN OR RESTART THE DATABASE

 

 

DB STARTED ---TRUE

|

|

|

|----------TRUE

|

|

|

DB SHUTDOWN AND START ---TRUE

 

 

 

ANOTHER THING YOU CAN DO IS CREATE PFILE FROM SPFILE BY GIVING A COMMAND:

 

create PFILE from SPFILE;

 

 

ANOTHER THING IS WHAT IF DATABASE FILE GET CORRUPTED ?

 

As i have already told you that SPFILE is an binary file.

 

 

1. By using UNIX command STRINGS.

2. Alert log : WHEN DB get started all this NON DEFAULT PARAMETER VALUE are put in alert.log . You can take those value and create pfile say 2.ora