Thursday, December 16, 2010

Check the Oracle edition

Blatently copied from http://vicker313.wordpress.com/2009/05/16/how-to-check-oracle-10g-is-standard-or-enterprise-edition/

In normal situation, we can check the edition of Oracle 10g using SQLPlus. Just login using SQLPlus, and there will be a connention message on top of the SQL prompt, stating that the Oracle is either Standard or Enterprise.

Or you can also issue the following select statement to get the edition information:
select * from v$version

However if the database is not created using Database Configuration Assistant (DBCA), but using script or SQL statement, the 2 methods stated above might not work. It still will show out the edition detail but not stating that it is either Standard or Enterprise.

In such scenario, we will need to digg into the files. First look for this file (applicable to both linux and windows):
$ORACLE_HOME/inventory/Components21/oracle.server/*/context.xml
Inside this context.xml file, look for parameter s_serverInstallType and check out its value (VAL). If it is EE, means it is Enterprise Edition. While SE means Standard Edition.

Tuesday, December 7, 2010

Corrupt temporary tablespace symptoms (10g)

When attempting to use TOAD to look at tablespaces as user SYSTEM, I got the following error:
SELECT privileges on the following are required: DBA_DATA_FILES, DBA_FREE_SPACE, V$TEMP_SPACE_HEADER, V$TEMP_EXTENT_POOL, DBA_TEMP_FILES.

Connect as SYS resulted in the same errors.

Alert log show ORA-01187: cannot read from file xxx because it failed verification tests, where file xxx was the temporary tablespace tempfile.

Alert log also showed: ORA-1187 signalled during: alter database backup controlfile to trace ...

Solution turned out to be dropping and recreating the temporary tablespace(s). Obviously, if there is only one temporary tablespace, you'll have to create a interim temporary tablespace as you cannot drop the default tablespace.