Oracle
All UxOra articles related to Oracle database 11g/12c and SQL/PLSQL will be published under this category.
- Details
- Written by Michel VONGVILAY
- Category: DBA
When DBMS_STATS.GATHER_TABLE_STATS
collects statistics on a partitioned table, generally it does so at the partition and table (global) level (the default behavior can be modified by changing the GRANULARITY
parameter). This is done in two steps:
- First, partition level stats are gathered by scanning the partition(s) that have stale or empty stats,
- Then a full table scan is executed to gather the global statistics.
As more partitions are added to a given table, the longer the execution time for GATHER_TABLE_STATS
, due to the full table scan requited for global stats.
- Details
- Written by Michel VONGVILAY
- Category: DBA
The process of turning redo log files into archived redo log files is called archiving. It is only possible if the database is running in ARCHIVELOG
mode. Here are some advantages to be in ARCHIVELOG
mode:
- Recover a database
- Update a standby database
- Perform a hot backup
- Details
- Written by Michel VONGVILAY
- Category: DBA
In developpement, it can happen that you may want to shrink oracle datafiles after a huge delete (ie. drop user, drop big table, ...).
Here is a simple way to shrink datafiles using RESIZE
option, but it may not be the most efficient.
- Details
- Written by Michel VONGVILAY
- Category: DBA
The temporary tablespace can reach a huge size, sometimes because of a big batch operation.
You may want to reduce it to save some disk space. If so, this article will present you some ways to do it.
- Details
- Written by Michel VONGVILAY
- Category: DBA
Sometimes it may happen that you will not be able to drop an Oracle user. It happens when there are still opened sessions on it.
This article will show you how to kill all theses sessions in order to drop this user.