Compact blob Oracle data, compacting tables with BLOB objects

BLOBs tables with different tablespaces in the remainder of the table, have a somewhat different treatment.

We will prepare a test environment:

We create two tablespaces with:

Source   
CREATE SMALLFILE TABLESPACE "TS_PFIRMA_DATOS" LOGGING DATAFILE  '/u01/app/oracle/oradata/PRUEBA/TS_PFIRMA_DATOS.dbf' SIZE 10M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
CREATE SMALLFILE TABLESPACE "TS_PFIRMA_BLOB" LOGGING DATAFILE '/u01/app/oracle/oradata/PRUEBA/TS_PFIRMA_BLOB.dbf' SIZE 10M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

Continue reading

Oracle listener service update

Analyzing the log listener, by default “listener.log” in may see messages such as:

Source   
23-FEB-2012 08:17:56 * service_update * BD01 * 0
23-FEB-2012 08:19:08 * service_update * BD02 * 0
23-FEB-2012 08:27:56 * service_update * BD01 * 0
23-FEB-2012 08:29:08 * service_update * BD02 * 0
23-FEB-2012 08:37:56 * service_update * BD01 * 0
23-FEB-2012 08:39:08 * service_update * BD02 * 0
23-FEB-2012 08:47:56 * service_update * BD01 * 0
23-FEB-2012 08:49:08 * service_update * BD02 * 0
23-FEB-2012 08:57:59 * service_update * BD01 * 0
23-FEB-2012 08:58:08 * service_update * BD02 * 0
23-FEB-2012 09:03:59 * service_update * BD01 * 0
23-FEB-2012 09:05:08 * service_update * BD02 * 0
23-FEB-2012 09:12:59 * service_update * BD01 * 0
23-FEB-2012 09:14:23 * service_update * BD02 * 0

Continue reading

Oracle compact table

Surely more than once have deleted records from a table in large quantities, perhaps millions. Once this is done it expected would be a reduction of the space used in the tablespaces, but it does not. Extensions but remain free to use the given table, can not use another table.

After the removal of millions of records, you must compact the table to return to tablespace free space once done we can even reduce the size of the datafiles without meeting the limitation imposed by the HIGH WATER MARK (maximum size reached by the objects within a datafile).

Suppose the table:

Continue reading

MySQL InnoDB file per table

During a default installation of MySQL, a common mistake is not changing the settings as stored data in InnoDB engine. By default, all information is stored in one datafile, which is usually named:

Source   
ibdata1

Continue reading

MySQL variables states

To perform a tuning of MySQL, you must first become familiar with a few concepts, MySQL has variables and states:

  • A variable has an associated value can be set in my.cnf (my.ini in Windows) or just set a default implicitly, although it is possible to modify some variables at runtime (care that is not the change is reflected in the configuration files). According to the version that we are using can have more than 300 (as with version 5.5). It is possible to know the value of all the variables:

Continue reading

Oracle fake index

Recently following the document ID 456468.1, I made a verification of the integrity of the catalog. Anyway, they have appeared a couple of errors indicating a problem with an object identifier:

1703982

This object exist in dba_objects, the query:

Continue reading

ORA-13605 sql access advisor, when execute SQL Access Advisor en Oracle 10.2.0.5

Once again he repeats the story, a PathSet installed with the idea of solving problems and new ones appear (this time without document).

This time it was to install the PatchSet 10.2.0.5 on the version 10.2.0.1. The fact is that now when trying to run the SQL Access Advisor, the task is not created but an error in the alert.

 

Continue reading

RMAN parameters, in scripts (only Oracle 11g or later)

When we make a list of the backups made with:

Source   
RMAN> list backup summary;

For example, we may have problems locating a backupset. The result is quite confusing and certainly inelegant labels are created by default.

Continue reading

ora-01591 lock held by in-doubt distributed transaction

It is possible that an application displays in its log an ORA-01591 error, which according to official documentation is due to a 2-phase trasacción that can not be completed.

Such transactions are used, for example, when a commit using tables obtained from a dblink becomes.It verifies that you can make a remote commits, another local and finally performs in the 2 locations atomically.

Well when connecting with a dblink is lost during a transaction, the transaction is in an uncertain state and if another session attempts to modify the objects involved see the ORA-01591 error.

Continue reading

Oracle password expired, Oracle 11g

Since the release of Oracle Database 11g, it has reinforced security by default. This should in principle be positive, but there are some situations where some behaviors may be unpleasant.

The most obvious example can be found in the modification of the profile (PROFILE) DEFAULT, which is applied to any user created by default.

Continue reading