Posts

Showing posts from 2014

Switching to Archivelog mode – Oracle 11g

Archivelog mode is a must for a production database as it ensures high recoverability of the database and provides greater flexibility to backup. Its very simple to turn on archiveing of Redo logs in your database. First step is check the log mode of the database. There are two ways to check this. First way is to query the column LOG_MODE from v$database. sys@ORCL> select log_mode from v$database; LOG_MODE ------------ NOARCHIVELOG sys@ORCL> sys@ORCL> Second way is to use the command ARCHIVE LOG LIST sys@ORCL> archive log list Database log mode              No Archive Mode Automatic archival             Disabled Archive destination            USE_DB_RECOVERY_FILE_DEST Oldest online log sequence     51 Current log sequence        ...

ORA-01092 & ORA-30040

Image
      ORA-01092 & ORA-30040 ·          Mount the database. ·          Create a pfile from spfile to a desired location. For example CREATE PFILE = ‘f:\temp\test\initorcl.ora’ from spfile; ·          Edit the pfile and give an online tablespace *.undo_tablespace='UNDOTBS3' already existing. ·          Start the database with this new Pfile, for example STARTUP PFILE=’F:\TEMP\TEST\initorcl.ora’ ·          Create spfile from the new pfile settings loaded using the command “CREATE SPFILE FROM PFILE;” ·          Bounce the database.

Oracle SP2-1503

Image
SP2-1503 Error Oracle 11g. SP2-1503 : Unable to initialize Oracle call interface. SP2-0152: ORACLE may not be functioning properly. This error is due to version mismatch between the binaries of the sqlplus called and the listener, instance running in the server. Action taken : The system contained 2 Oracle homes as shown below The environment variable “Path” contained the bin path of both the installation. Note that we try to start 10g, but the bin path of 11g comes first in the “Path” variable. As a result of this, version mismatch happened during the call. The sqlplus called is 10g and the listener called is in 11g. Due to this version mismatch problem, we faced the error SP-1503. Modify the path variable and remove the bin path of 11g and try again. Or you can change the order of bin path. Lsnrctl of 10g is now started correctly. The instance will start correctly now.

Creating Cluster tables in Oracle 11g

The flow is * First you need to create a cluster. * Then create tables that need to be clustered by using the newly created cluster. The idea of clustered table is to minimize space used by a group of tables by clustering column that occur commonly in these tables. Suppose there are 3 tables namely T1, T2, T3 and they all have a column named Emp_ID with the same values, then clustering these table using this column Emp_ID reduce space occupied by the column. This column will be stored only one time in a cluster instead of storing in 3 tables. Here is the command to create a cluster create cluster test_cluster (Emp_ID varchar2(32)); Create the tables that need to clustered by using the above created cluster. create table T1 (Col1 varchar2(100), Emp_ID varchar2(32)) cluster test_cluster(Emp_ID); create table T2 (Col1 varchar2(100), Emp_ID varchar2(32)) cluster test_cluster(Emp_ID); etc. Make sure you match the type of the cluster column a...