0% found this document useful (0 votes)
161 views

Database Survival Guide 2

The document provides troubleshooting steps for various Oracle database problems, beginning with using tools like Oerr and Google to diagnose errors, then examining the execution plan of slow queries using EXPLAIN PLAN and tools like SQL*Plus and Enterprise Manager. It also discusses gathering trace files to view DML statements from Java applications, and configuring optimal memory settings for the SGA and PGA based on the server memory size and workload type.

Uploaded by

ovidiu0702
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views

Database Survival Guide 2

The document provides troubleshooting steps for various Oracle database problems, beginning with using tools like Oerr and Google to diagnose errors, then examining the execution plan of slow queries using EXPLAIN PLAN and tools like SQL*Plus and Enterprise Manager. It also discusses gathering trace files to view DML statements from Java applications, and configuring optimal memory settings for the SGA and PGA based on the server memory size and workload type.

Uploaded by

ovidiu0702
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

5 Troubleshoot various problems

If your test fails and you see an error in alert.log, the problem might be caused by a bug in the engine itself. Here is a way to go deep into a problem
5.1 Go deep with an oracle error
Here is an example extracted from SF ticket 174496. The original situation is an asm diskgroup in engine 10GR2. An upgrade to 11.2.0.4.4 is done
but after the upgrade, when trying to include the existing diskgroup in the configuration, the message below is printed :
5.1.1 Sample error
SQL> ALTER DISKGROUP ALL MOUNT
NOTE: Diskgroups listed in ASM_DISKGROUPS are data1
ORA-15032: not all alterations performed
ORA-15036: disk '/dev/zvol/rdsk/array/basempbparis' is truncated
ERROR: ALTER DISKGROUP ALL MOUNT
5.1.2 Oerr command
The first step is to get answer from the oerr tool :
oracle11@archi5> oerr ora 15032
15032, 00000, "not all alterations performed"
// *Cause: At least one ALTER DISKGROUP action failed.
// *Action: Check the other messages issued along with this summary error.
oracle11@archi5> oerr ora 15036
15036, 00000, "disk '%s' is truncated"
// *Cause: The size of the disk, as reported by the operating system, was smaller than the size of the
disk // as recorded in the disk header block on the disk.
// *Action: Check if the system configuration has changed.
This tool explains in detail the error but it does not give the solution. I have not changed my diskgroup why would it have been truncated ?
5.1.3 Google
Google might give a solution. Here, it is the case. Somebody faced the same problem before and was kind enough to explain it in his blog :
https://oraclehandson.wordpress.com/2010/04/13/changing-the-disk-size-in-asm/. Unfortunately, this is not always like that !
5.1.4 My Oracle support site
My opinion is that an Oracle support login is mandatory for you. Because if I connect to it and post the following string in the search engine :
ORA-15036: disk is truncated
I get at once two knowledge base articles that explain in detail how to fix the issue. I am sure this solution is not dangerous because it is proposed
by Oracle company engineers. The two knowledge articles are :
- ASM disk group mount fails with ORA-15036: disk <name> is truncated (Doc ID 1077175).
- How To Obtain The Raw Device Size in Solaris To Diagnostic & Fix The ORA-15036 ("Disk <Disk Name> I Is Truncated") In ASM 10gR2 (10.2).
(Doc ID 1486324.1)
The new release of Oracle does no compute size of asm device the same manner as the old one is the root cause of this issue.
5.1.5 Adrci again
If your problem placed the engine in a faulty situation, it will create an incident and a problem. There is a fast way to know if your tests produced
incident or errors : To illustrate that, I have created artificially an incident : (as oracle user at unix prompt)
adrci
adrci> show incident
ADR Home = /ldata/oracle/diag/rdbms/thunder/thunder:
*************************************************************************
INCIDENT_ID PROBLEM_KEY CREATE_TIME
128194 ORA 700 [kgerev1] 2016-03-04 11:32:11.864000 +01:00
adrci> show problem
ADR Home = /ldata/oracle/diag/rdbms/thunder/thunder:
************************************************************************
PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME
3 ORA 700 [kgerev1] 128194 2016-03-04 11:32:11.864000 +01:00
5.2 Another example .
When doing an installation, I faced a problem with listener installation, I got :
PRCT-1011 : Failed to run "srvctl". Detailed error: #@=result[0]: version={12.1.0.2.0}
This error does not speak very much. Oerr gives no clue. And google is vague. But My Oracle support gave me the solution :
I realized I had to restart install because I was not careful enough with warnings about missing packages. It was package SUNWeu8os missing.
5.3 Execution plan of a slow request.
Sometimes, the request goes through correctly but it last for many seconds. You have to wonder if it can be speed up. At the database level, the
tool that gives the answer is the command explain plan.
5.3.1 A simple case influence of an index.
I illustrate that with a simple case. I have a huge table with an index on it. I will do the same query with 2 situations:
- The index is ok
- The index has been disabled
My table is source5. It has an index on column line named LINE_IDX.
The request is : select count(*) from source5 where line=1;
5.3.2 With sqlplus
Here the index is o.k. the important is the cost and the time :
SQL> explain plan for select count(*) from source5 where line=1;
Explained.
SET LINESIZE 130
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------
Plan hash value: 3418924228
------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
-------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 13 | 133 (1)| 00:00:02
| 1 | SORT AGGREGATE | | 1 | 13 | |
|* 2 | INDEX RANGE SCAN|LINE_IDX|62256 | 790K| 133 (1)| 00:00:02
-------------------------------------------------------------------------
Predicate Information (identified by operation id):
When I disable the index, the query duration will jump from 2secs to 2 minutes
! alter index line_idx unusable;
To get the plan :
explain plan for select count(*) from source5 where line=1;
Explained.
ensuite pour afficher le plan :
SET LINESIZE 130
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
PLAN_TABLE_OUTPUT
Plan hash value: 2301655728
------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
------------------------------------------------------------------------
| 0 |SELECT STATEMENT | | 1 | 13 | 14645 (1)| 00:02:56
| 1 | SORT AGGREGATE | | 1 | 13 | |
|* 2 |TABLE ACCESS FULL | SOURCE5 | 62256 | 790K | 14645 (1)| 00:02:56
-------------------------------------------------------------------------
Predicate Information (identified by operation id): PLAN_TABLE_OUTPUT
5.3.3 With database control
From the performance page, I click on a particular sql request and I chose to display its plan . Then, I chose table format, and I get the display
below :
5.3.4 With enterprise manager database express
See video below : https://drive.google.com/a/eservglobal.com/file/d/0B6Rt2fV3N-dcOXo3aWFWRmpDVWM/view?usp=sharing
5.4 Get the DML being run by java
You are often blocked in your investigation with problems on composites because it is hard to get the command really issued by the java program.
Here is an attempt to extract what is really done in the databae when a composite is fired. I will take the example of an actor creation.
5.4.1 Setup
In the GUI of CC_ADMIN, I chose to create actor batch2.
(as oracle user connected as sysdba to the database)
alter system set timed_statistics = true;
alter system set statistics_level=all;
alter system set sql_trace=true;
(clean up trace files as oracle user at the unix prompt)
oracle11@zonebase> pwd
/ldata/oracle/diag/rdbms/thunder/thunder/trace
oracle11@zonebase> rm -rf * Now perform the query you want to analyze.
5.4.2 Gather results
First copy all trace files to another location: mkdir /ldata/tracebatch2 cp * /ldata/tracebatch2
then run tkprof as oracle user at unix prompt : for i in `ls *trc` ; do tkprof $i $i.txt done A set of text file are produced.
5.5 Oracle memory in Solaris
As a general rule the SGA is the area where shared memory of buffer and computed execution plans are. The PGA is the area which give memory
to server processes interacting with the database. Since we are OLTP ( Online transaction Processing), the advised ration is 60% SGA, 40% PGA.
We had many problem with automatic memory management, that is why we have disabled it. So to be short, let’s suppose you have a server with
16GO memory. You will give Oracle 75%. That is 12G.
So the SGA will be 0.6*12=7Go The PGA will be 0,4*12=5go
This is a maximum and on testbeds, you will have also good result with lower configurations. This configuration gives better results on site because
after some hours of activity, the buffer cache of the database is filled with thousands of blocks that are the most commonly used and there is very
few disk read activity. The term is read buffer cache hit. It is around 99.5%
On a testbed, since tables involved have few rows, the figure below should be o.k. (minimum) :
SGA=2Go RAM PGA=1Go RAM.
I will explain below how to change memory settings. There is a hidden parameter that has to be managed for the operation to succeed. Solaris has
an upper limit to the shared memory allocated to a user (in our case oracle). This limit is stored in /etc/project file. It can also be checked with the
command prctl $$ In the example below the limit is set to around 2Giga. I will increase it to 5giga to avoid problems at startup of the instance.
5.5.1 Increasing sga and pga
SQL> show parameter pga_aggregate_target;
pga_aggregate_target big integer 100M
SQL> show parameter sga;
sga_max_size big integer 800M
sga_target big integer 800M
SQL> alter system set sga_max_size=2G scope=spfile;
SQL> alter system set sga_target=2G scope=spfile;
SQL> alter system set pga_aggregate_target=1G scope=spfile;
SQL> shutdown immediate
Database closed. Database dismounted. ORACLE instance shut down.
SQL> exit
oracle11@archi5> prctl $$
process: 23046: -ksh
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
process.max-port-events
privileged 65.5K - deny -
system 2.15G max deny -
process.max-msg-messages
-memory
system 16.0EB max deny -
project.max-port-ids
privileged 8.19K - deny -
system 65.5K max deny -
project.max-shm-memory
privileged 1.86GB - deny -
system 16.0EB max deny -
project.max-shm-ids
oracle11@archi5> exit
root11@archi5# diff /etc/project /etc/project.new
< user.oracle:100::::process.max-sem-nsems=(priv,256,deny);project.max-sem-ids=(priv,100,deny);project.max-shm-ids=(priv,100,deny);project.max-
shm-memory=(priv,2000000000,deny)
> user.oracle:100::::process.max-sem-nsems=(priv,256,deny);project.max-sem-ids=(priv,100,deny);project.max-shm-ids=(priv,100,deny);project.max-
shm-memory=(priv,5000000000,deny)
root11@archi5# cp /etc/project.new /etc/project
root11@archi5# su - oracle
oracle11@archi5> prctl $$
process: 24261: -ksh
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
process.max-port-events
privileged 65.5K - deny -
system 2.15G max deny -
project.max-shm-memory
privileged 4.66GB - deny -
system 16.0EB max deny -
SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2252576 bytes Variable Size 687866080 bytes
Database Buffers 1442840576 bytes Redo Buffers 4927488 bytes
Database mounted. Database opened.
SQL> show parameter pga_aggregate_target;
pga_aggregate_target big integer 1G
SQL> show parameter sga;
sga_max_size big integer 2G sga_target big integer 2G
5.5.2 View buffer occupation
Here is how to know if your database buffer cache is really occupied by blocks :
COLUMN OBJECT_NAME FORMAT A40
COLUMN NUMBER_OF_BLOCKS FORMAT 999,999,999,999
SELECT o.OBJECT_NAME, COUNT(*) NUMBER_OF_BLOCKS FROM DBA_OBJECTS o, V$BH bh
WHERE o.DATA_OBJECT_ID = bh.OBJD AND o.OWNER != 'SYS' GROUP BY o.OBJECT_NAME ORDER BY COUNT(*);
SOURCE4 46,080 SOURCE3 79,415 SOURCE2 125,640 SOURCE1 316,894
We can compare the time of a query if all table is in buffer cache and if nothing is in buffer cache:
Here are two displays of same command but the difference is that in the second picture all the rows have been placed into buffer cache.
oracle11@archi5> time echo "update source1 set line=line+1;" | sqlplus esg/esg
34167722 rows updated. real 17m36.62s
I redo it so all buffer are in memory :
oracle11@archi5> time echo "update source1 set line=line+1;" | sqlplus esg/esg
34167722 rows updated. real 10m55.29s
The duration is 62 % of initial situation ! The conclusion is never stop a database !
5.6 What to do if :
5.6.1 My database is stuck
5.6.1.1 Reason 1: the server ran out of memory
I launch command top or as lsav : /opt/ESG/bin/CKS_Top. I launch also database control.
Here is a display where the problem is present. In that case, it is useless to try to find an error in a test, the error is the system itself !
5.6.1.2 Reason 2 : another zone is busying the server
Since the testbeds are multi zones, they can slow each other. For example I have launched many provisonning scripts on a database, There is a
jboss in the global zone, and a weblogic server is starting on a third zone. In that situation, the fourth zone will probably have delay in the answers.
The good command to show that is to issue in the global zone : Root# prstat –Z
It is shown below. You can have the same behaviour on a vm, if your antivirus plus music plus a video are run at the same time of your test
5.6.1.3 Reason 3 : a session is provoking huge io
Tis can be seen with command in the global zone : Root# iostat –xndz 4
If the column busy is near 100% and you see that huge io are read or written, you will have troubles with individual tests.
To go further with system monitoring, it is helpful to install package FRMAisar. Here is its user guide :
https://esurf.eservglobal.com/dbfm_send/26744
The basic rule is that your system has a bottleneck and only one. It can be the cpu, the memory, the disk or the network. It is useless to add 4 new
cpus if your disk is the bottleneck. The package FRMAisar will help you to find your bottleneck.
5.6.1.4 The syndrom of the long transaction after restart
The situation is the following. Somebody decided for example a dml such as :
Update voucher set voucherid=voucherid+1;
The voucher table has 35 million rows.
This transaction can last for 30 minutes.
But after 20 minutes, losing patience, the user as decided to bounce the database. He will have double punishment because the transaction will be
rolled back and he will have to wait another 20 minutes for the rollback to finish.
5.6.2 I see ORA32004—when I start the database.
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
This problem is minor. With different release, Oracle manages the parameter differently. The decide all the time to accept old syntax but issue a
warning to advice the user to chose the new syntax. Example in 10G2, to configure the behaviour of the engine related to commit, the parameter
was : commit_write = "batch,nowait"
But in 11G2, the two parameter name have changed, so you see in alert.log :
Deprecated system parameters with specified values: commit_write
In 11GR, the new names are : commit_wait = "nowait" commit_logging = "batch" But your system will function in any case !
5.6.3 I suspect my database to be corrupted
In case of corruption, there will be always a message (or many !) in the alert.log. You will probably have also incident in adrci repository. But you
can double check there is no corruption with rman. I have chosen to check for corruption in my SYSTEM tablespace.
oracle11@archi5> rman target /
RMAN> report schema;
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 800 SYSTEM *** +DATA1/thunder/datafile/system.261.856530393
2 5100 SYSAUX *** +DATA1/thunder/datafile/sysaux.262.856530409
3 890 UNDOTBS *** +DATA1/thunder/datafile/undotbs.263.856530421
RMAN> validate datafile 1;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=590 device type=DISK
channel ORA_DISK_1: starting validation of datafile
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1 OK 0 33199 102400 274619676
File Name: +DATA1/thunder/datafile/system.261.856530393
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 49708
Index 0 16219
Other 0 3274
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
including current control file for validation
including current SPFILE in backup set
channel ORA_DISK_1: validation complete, elapsed time: 00:00:04
List of Control File and SPFILE
===============================
File Type Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE OK 0 2
Control File OK 0 854
Another solution : RMAN> list failure;
using target database control file instead of recovery catalog
Database Role: PRIMARY no failures found that match specification
5.6.4 My file system is full of old logs
Here are some places where you can find huge logs :
- Go to directory of alert.log and remove all files. - Go to directory of listener logs(same)
- Go to directory of listener traces (same). - Go to directory of asm logs
- Go to directory of admin sever logs and remove all files
5.6.5 My datafiles are huge because I ran load traffic for many days, I want to reduce them. Follow chapter 8.1
The explanation is when a database is modified by adding rows, updating rows, deleting tables and so on…, the engine does not try to recover the
exact situation as before. This can be done on live site with the command : Alter table shrink space
But on a testbed, there is a faster method, it is to export a schema drop it and reimport it.
This can be done with the whole database also. By doing that, the table are recreated with minimal storage occupation.

6 SQL tips

6.1 Show only the first n rows of a huge table


Here is an example with SOA INFRA. We want to retrieve the oldest instances of the table composite_instance. The query below will retrieve the 5
oldest instances.
select created_time from ( select * from composite_instance order by created_time ) where rownum<=5;

6.2 Monitor progress of a long transaction


When an operation is long, it is more comfortable to get the ratio that has already been done. It can be done by querying the view
v$SESSION_LONGOPS.
I have taken the example of a rman backup that has been launched on 4 channels. The command will run for 80 minutes. This is shown with
column TIME_REMAINING of the aggregate input. ( 4394/60=73 minutes= 1h13 minutes).
As oracle user at rman prompt
RMAN> backup database plus archivelog;
Starting backup at 07-MAR-16 09:40:21
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=394 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=103 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=7 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=106 device type=DISK
set linesize 300
col opname format a30
select username,opname,sofar,totalwork,round(sofar*100/totalwork) as "UPTONOW" ,TIME_REMAINING from
v$session_longops where sofar<totalwork;
USERNAME OPNAME SOFAR TOTALWORK UPTONOW TIME_REMAINING
------------------------------ ------------------------------ ---------- ---------- ----------
SYS RMAN: aggregate input 2556762 25439895 10 4394
SYS RMAN: full datafile backup 787266 4337602 18 2625
SYS RMAN: full datafile backup 566974 4322302 13 3855
SYS RMAN: full datafile backup 695252 4302616 16 3009
SYS RMAN: full datafile backup 1155448 12476416 9 5702

6.3 Create quickly a table


Most of the time, you need to quickly create a table to monitor engine performance or simulate a particular situation. Here are two methods :
Method 1: create table pmbtab tablespace data_tbs1
as select rownum as id,'eservglobal as usual' as col from dual connect by level <2e5;
Method 2: create table esg.source1 as select * from source$;

6.4 Get database activity


oracle>sqlplus / as sysdba
create or replace function scndiff
return DBMS_DEBUG_VC2COLL
pipelined
is
begin
declare
v_scn1 number;
v_scn2 number;
v_i number;
v_diffscn number;
begin
for v_i in 1..1000000
loop
pipe row (to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS' ));
select current_scn into v_scn1 from v$database;
dbms_lock.sleep(30);
select current_scn into v_scn2 from v$database;
v_diffscn := v_scn2 - v_scn1;
pipe row ('scn progress = ' || v_diffscn );
end loop;
end;
end;
select * from table(scndiff());
30-MAR-2016 10:40:17
scn progress = 838
30-MAR-2016 10:40:47
scn progress = 945

6.5 Insert rows in a table in one line


i=0 oracle11@archi5> while : ; do
echo " insert into testesg values ( $i ) ; " | sqlplus -s esg/esg
i=$(($i + 1)) done
1 row created.

6.6 Kill a session


Most of the time you want to do a change in the database and you cannot because a session is connected.
Here is how to kill it : oracle> orastat –u gives ou the list of the session that are in the database
oracle11@ing11> orastat -u
Sid SERIAL# user pid Host Current or Last Sql Lockwait STATUS tty Program Hit
----- ---------- ---------- ------ ---------- --------------------- -------- --------
1 53439 29398 ing11 ACTIVE UNKNOWN oracle@ing11 (VKTM) 0
11 32351 SYS 1234 ing11 select name as pdbNa INACTIVE unknown JDBC Thin Client 5268732
119 9657 29402 ing11 update container$ se ACTIVE UNKNOWN oracle@ing11 (GEN0) 0
….
250 27919 29618 ing11 select 1 from "SYS". ACTIVE UNKNOWN oracle@ing11 (Q004) 201
251 65439 29652 ing11 select location_name ACTIVE UNKNOWN oracle@ing11 (Q008) 413
253 58057 THUNDER 13824 basecloud SELECT DECODE('A','A INACTIVE pts/1 sqlp 268742
256 13842 32395 ing11 *select obj# from obj ACTIVE UNKNOWN oracle@ing11 (W006) 31817
258 41081 30946 ing11 update seg$ set type ACTIVE UNKNOWN oracle@ing11 (W002) 17076
27 1014 SYS 1234 ing11 SELECT 1, status, INACTIVE unknown JDBC Thin Client 5268732
3 3409 29418 ing11 ACTIVE UNKNOWN oracle@ing11 (LGWR) 0
355 62033 29523 ing11 update seg$ set type ACTIVE UNKNOWN oracle@ing11 (W001) 50

with the 2 left columns you have the serial number and the sid here is is 253 and 58057
then (sqlplus / as sysdba ) alter system kill session ‘253,58057’; and the session is killed
We improved this command to place it in a script that drops the user PAYMO after having killed eventual remaining sessions:
Declare /home/oracle/bin as your sql repository, then :
oracle11@archi5> cat dropuser.sql
@killsession PAYMO; @tokill;
drop user PAYMO cascade;
oracle11@archi5> cat killsession.sql
spool '/home/oracle/bin/tokill.sql';
SET ECHO OFF SET FEEDBACK OFF SET VERIFY OFF SET HEADING OFF
set linesize 300
select 'alter system kill session ''' || sid || ',' || serial# || ''' immediate ; ' from v$session where
USERNAME='PAYMO';
spool off
oracle11@archi5>
cd /home/oracle/bin
cat dropuser.sql | sqlplus / as sysdba

6.7 I want to know tablespace occupation of a user


select count(*),TABLESPACE_NAME from dba_segments where owner='PAYMOBILE' group by tablespace_name;
45 DATA_TBS1
141 INDEX_TBS1 Here PAYMOBILE user has datas in INDEX_TBS1 and DATA_TBS1
6.8 I want to purge awr snapshots
If your database is slow, it might be you have many awr history. Here is a fast way which is to recreate the awr snapshot repository :
oracle> sqlplus / as sysdba
SYS@paymob33 AS SYSDBA> @?/rdbms/admin/catnoawr.sql
SYS@paymob33 AS SYSDBA> @?/rdbms/admin/catawrtb.sql

6.9 I want to shrink my virtual box vm that is a Solaris 10 guest inside a Windows host
The procedure below must be executed after having being prepared because it goes deep into the system. It is :
https://esurf.eservglobal.com/dbfm_send/46154 It will shrink your VM a the smallest compacted size.

7 Client install for paymobile 3.3


8 Advanced features available

8.1 Export and import of a schema or more


If you want to do an export of a schema look at chapter 11 of : https://esurf.eservglobal.com/dbfm_send/46131
If you want to export the full database look at the whole document. This feature works even between Sparc and X86.

8.2 Purge weblogic


8.2.1 11GR2 situation
When you do paymobile traffic, the log of your activity is not purged automatically, you have to define a purge policy. By default, it is one day (but
you can keep more, I suggest 4 days on a testbed). The package is there :
http://if.eservglobal.fr/DT/pltf/si/packages/isoat/1.2/ALL/ESGisoat.1.2.ALL.ALL.8829.fpkg.gz
8.2.2 12C situation
In 12C, you need the new package : http://if.eservglobal.fr/DT/pltf/si/packages/isoat/1.3/ALL/ESGisoat.1.3.ALL.ALL.8845.fpkg.gz

8.3 Additional tools


8.3.1 ESGiotls
The package Esgiotls gives unix scripts that allow to get different informations on the database from the Unix prompt as Oracle user.
The package is there : http://if.eservglobal.fr/DT/pltf/si/packages/iotls/2.0/ALL/FRMAiotls.2.0.ALL.ALL.8246.fpkg.gz
The user guide is there : https://esurf.eservglobal.com/node/7899
Here I query the tablespace status : oracle11@archi5> orastat -d
Tablespace Data File Size (Mb) Used (Mb) Free (Mb) Max Free Seg. % Used
--------------- --------------------------------------------- ---------- ---------- ---------- ------------- ------
SYSTEM +DATA1/thunder/datafile/system.261.856530393 800 640 159 159 80
DATA_TBS1 +DATA1/thunder/datafile/data_tbs1.273.8565313 26724 21414 5309 2247 80
INDEX_TBS1 +DATA1/thunder/datafile/index_tbs1.275.856611 100 92 7 4 92
SYSAUX +DATA1/thunder/datafile/sysaux.262.856530409 5200 4904 295 294 94
DEV1_SOAINFRA +DATA1/thunder/datafile/dev1_soainfra.267.875 300 231 68 68 77
USERSTBS +DATA1/thunder/datafile/userstbs.265.85653043 20 19 19
DATA_TBS1 +DATA1/thunder/datafile/data_tbs1.266.8565311 32768 18446 14321 627 56
DATA_TBS1 +DATA1/thunder/datafile/data_tbs1.270.8565312 27024 22331 4692 2358 83
DEV1_MDS +DATA1/thunder/datafile/dev1_mds.280.87535041 200 169 30 29 85
UNDOTBS +DATA1/thunder/datafile/undotbs.263.856530421 890 27 862 442 3
STPK_TBS +DATA1/thunder/datafile/stpk_tbs.269.85653122 500 499 499
DATA_TBS2 +DATA1/thunder/datafile/data_tbs2.281.9055254 32768 32703 64 63 ###
DATA_TBS1 +DATA1/thunder/datafile/data_tbs1.271.8565312 27024 22601 4422 1983 84
DATA_TBS1 +DATA1/thunder/datafile/data_tbs1.272.8565312 26824 22107 4716 1905 82
INDEX_TBS1 +DATA1/thunder/datafile/index_tbs1.276.856611 100 81 18 17 81
DEV1_ORABAM +DATA1/thunder/datafile/dev1_orabam.278.87535 200 15 184 184 7
DEV1_IAS_ORASDP +DATA1/thunder/datafile/dev1_ias_orasdpm.279. 300 5 294 294 2
DATA_TBS2 +DATA1/thunder/datafile/data_tbs2.282.9055334 16900 15360 1539 1027 91
INDEX_TBS1 +DATA1/thunder/datafile/index_tbs1.277.856611 100 99 99
Temp data file display
Tablespace Data File Size (Mb) Used (Mb) Free (Mb) Max Free Seg. % Used
--------------- --------------------------------------------- ---------- ---------- ---------- ------------- ------
TEMPTBS +DATA1/thunder/tempfile/temptbs.264.856530427 98 640 159 159 ###
TEMP_TBS1 +DATA1/thunder/tempfile/temp_tbs1.268.8565312 1124 4904 295 294 ###
DEV1_IAS_TEMP +DATA1/thunder/tempfile/dev1_ias_temp.274.875 100 27 862 442 27
Print segment (if any), that wouldn't extend due to a lack of physical disk space
If orastat –d is slow, here is to workaround :
select round(USER_BYTES/1024/1024) as "size in MB",TABLESPACE_NAME from dba_data_files order by
TABLESPACE_NAME; Here I query the sessions connected :
oracle11@archi5> orastat -u
Sid SERIAL# user pid Host Current or Last Sql Lockwait STATUS tty Program Hit
----- ---------- ---------- ------ ---------- --------------------- -------- -------- ---------- --------------------
1 1 8820 archi5 ACTIVE UNKNOWN oracle@archi5 (DIA0) 0
101 1099 10151 archi5 select 1 from aq$_sc ACTIVE UNKNOWN oracle@archi5 (QMNC) 8
102 7 DEV_SOAINF 1234 archi4 *call edn_dequeue_oao ACTIVE unknown JDBC Thin Client 111340
103 9 10193 archi5 select job, nvl2(las ACTIVE UNKNOWN oracle@archi5 (CJQ0) 91907
106 39751 DEV9_MDS 1234 archi9 SELECT MAX(TXN_CN) F INACTIVE unknown JDBC Thin Client 111340
195 1 8802 archi5 ACTIVE UNKNOWN oracle@archi5 (PMON) 0
196 1 8822 archi5 ACTIVE UNKNOWN oracle@archi5 (DBW0) 0
197 1 8834 archi5 select file# from fi ACTIVE UNKNOWN oracle@archi5 (MMNL) 0
199 41 DEV9_SOAIN 1234 archi9 *call edn_dequeue_oao ACTIVE unknown JDBC Thin Client 111340
2 1 8830 archi5 ACTIVE UNKNOWN oracle@archi5 (ASMB) 0
200 9 DEV9_SOAIN 1234 archi9 *call edn_dequeue_bus ACTIVE unknown JDBC Thin Client 111340
202 3 DEV_SOAINF 1234 archi4 *call edn_dequeue_bus ACTIVE unknown JDBC Thin Client 111340
204 44845 DEV9_ORASD 1234 archi9 SELECT DRIVER_NAME, INACTIVE unknown JDBC Thin Client 98162
292 3 DEV_SOAINF 1234 archi4 *call edn_dequeue_bus ACTIVE unknown JDBC Thin Client 111340
293 1 8803 archi5 ACTIVE UNKNOWN oracle@archi5 (PSP0) 0
294 1 8823 archi5 ACTIVE UNKNOWN oracle@archi5 (LGWR) 0
295 5 10203 archi5 select 1 from sys.aq ACTIVE UNKNOWN oracle@archi5 (Q000) 183
296 62095 DEV9_SOAIN 1234 archi9 *SELECT CONTAINER_ID, INACTIVE unknown JDBC Thin Client 96204
297 1171 13461 archi5 ACTIVE UNKNOWN oracle@archi5 (O000) 5168
3 3445 DEV_MDS 1234 archi4 SELECT MAX(TXN_CN) F INACTIVE unknown JDBC Thin Client 111340
8.3.2 Other ESG packages
8.3.2.1 backup
The backup package allows to perform incremental online backups. Its location is :
http://if.eservglobal.fr/DT/pltf/si/packages/irmds/2.0/ALL/FRMAirmds.2.0.ALL.ALL.6015.fpkg.gz
http://if.eservglobal.fr/DT/pltf/si/packages/irmds/2.0/ALL/FRMAp2280.ALL.ALL.8493.fpkg.gz
The user guide is : https://esurf.eservglobal.com/dbfm_send/28256
8.4 Other features used in ESG but out of scope here
8.4.1 Disaster recovery Center.
If you are interested, read : https://esurf.eservglobal.com/dbfm_send/46126
8.4.2 Real application cluster ( or RAC one node)
If you are interested, follow : https://esurf.eservglobal.com/node/7324
8.4.3 Encryption
If you are interested, follow : https://esurf.eservglobal.com/dbfm_send//44007 https://esurf.eservglobal.com/dbfm_send//44008
8.5 How to open a ticket in case of a fault ?
Apply for an account at My Oracle support Web site https://support.oracle.com/
9 Some practicals studies
9.1 Paymobile 3.3 study with 12C and database statistics 9.2 Change memory settings of our application servers
10 Conclusion
My Oracle Support MOS (ex Metalink) : https://support.oracle.com/
Oracle documentation : https://docs.oracle.com/en/database/database.html
Oracle software download : http://www.oracle.com/technetwork/indexes/downloads/index.html#database
Oracle community forum : https://community.oracle.com/community/support
ESG Oracle database home page : https://esurf.eservglobal.com/node/7325
Like the super gui ? Install Cloud Control : https://esurf.eservglobal.com/dbfm_send/45135

You might also like