Friday 20 April 2012

sqlplus Error : Oracle 11g

Error : sqlplus: error while loading shared libraries: /opt/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 

What could be the problem and how to resolve it. 

Reason : The SELinux is running in "Enforcing" mode on Linux Server. So the required permission should be assign for sqlplus.


Solution : Change SELinux from the default “Enforcing” mode to the “disabled” mode.

Wednesday 1 February 2012

move tablespace datafile between filesystems

Move datafile to another filesystem on a separate mount point

Offline the tablespace
SQL>ALTER TABLESPACE DOMAIN OFFLINE;

Move datafile to new location
$mv /u01/domain01.dbf /opt/

Rename datafile
SQL>ALTER TABLESPACE DOMAIN RENAME DATAFILE '/u01/domain01.dbf' TO '/opt/domain01.dbf';

Online the tablespace again
SQL>ALTER TABLESPACE DOMAIN ONLINE;



For Temporary tablespace
SQL>ALTER DATABASE TEMPFILE '/u01/tempdom1.dbf' OFFLINE;

Drop the existing tablespace
SQL>DROP TABLESPACE TEMPDOMAIN INCLUDING CONTENTS;

Create new Temporary tablespace
SQL>CREATE TEMPORARY TABLESPACE TEMPDOMAIN
TEMPFILE '/opt/tempdom1.dbf' SIZE 200 M AUTOEXTEND ON EXTENT MANAGEMENT LOCAL;

Thursday 5 January 2012

Restore Archivelogs to new location using RMAN

The solution is used to copy archivelogs from RMAN catalog.

Step 1: uncatalog the required archivelogs from RMAN prompt

RMAN>CHANGE ARCHIVELOG FROM LOGSEQ=60 UNTIL LOGSEQ=70 UNCATALOG;

Once the archivelogs have been successfully uncataloged, you are now able to successfully restore the archive logs to a new location.

RMAN>run{
set archivelog destination to '/tmp/arch';
restore archivelog from logseq=60 until logseq=70;
}

Cataloging archivelogs again by added them to the RMAN repository

RMAN>CATALOG ARCHIVELOG '/opt/log/1_60_archivelog.log';

Cataloging multiple copies in a directory

RMAN>CATALOG START WITH '/opt/log';

How To Install LAMP on Ubuntu 12.04

L inux         A pache         M ySQL             P HP Step One—Install Apache open terminal and type in these commands: s udo apt-ge...