Archive

Archive for November, 2013

getting rid of Foreign Archive Logs

November 27, 2013 Leave a comment

Recently I ran the following query to see what was occupying the flash recovery area

select file_type, space_used*percent_space_used/100/1024/1024 used,
space_reclaimable*percent_space_reclaimable/100/1024/1024 reclaimable,frau.number_of_files
from v$recovery_file_dest rfd, v$flash_recovery_area_usage frau;

Image

These foreign archive logs were from a previous incarnation of the database so how do we delete them as they were no longer needed 

 using RMAN

RMAN> crosscheck foreign archivelog all;

RMAN> delete expired foreign archivelog all;

Foreign archived log files are usually created if a database is mining redo logs of foreign database such as a logical standby database or a Streams database. These foreign archived log files will be purged once the mining is completed by the streams process. If there are issues with mining and it did not proceed, then these archivelogs are kept in FRA. However, a user can choose to override that and delete it using the following RMAN command:

RMAN>  delete foreign archivelog all;
Categories: Oracle

Oracle advanced security

November 19, 2013 Leave a comment

Create a wallet to store secret keys

The Oracle wallet is created using “owm” , orapki or mkstore. We use the orapki utility.

# orapki wallet create -wallet /oradiag/oradata/wallet -auto_login

Instruct Oracle where your wallet is located

Edit sqlnet.ora by adding the following parameters:

ENCRYPTION_WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /oradiag/oradata/wallet)))

Save the file.

Create the master encryption key

Since this is the first time you setup the master key and we have created the wallet with orapki, open the wallet first:

ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY “<wallet password>”;

Now set the key:

ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY “<wallet password>”;

You will now receive an ORA-error stating that the wallet is not open after setting the encryption key. Now, reopen the wallet:

ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY “<wallet password>”;

Basically you’re done and can begin encrypting your data.

 

Categories: Oracle

Change IP adresses of SCAN Name in Oracle 11gR2 RAC

November 14, 2013 Leave a comment
[root@rac1 ]# srvctl stop scan_listener
[root@rac1 ]# srvctl stop scan

Be sure that all the SCAN VIP services are down:

[root@rac1 ]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running

reconfigure the virtual ip addresses

[root@rac1 ]# srvctl modify scan -n rac-scan.maverick.com
[root@rac1 ]# srvctl start scan
[root@rac1 ]# srvctl start scan_listener
[root@rac1 ]# srvctl config scan
Categories: Oracle Rac

Unregister Database From RMAN catalog using rman

November 14, 2013 Leave a comment

First select the DBID from rman catalog that needs to be unregistered

SQL>  select db_key,DBID,NAME from  rc_database where name='UKPROD';

    DB_KEY       DBID NAME
---------- ---------- --------
   4537165 3907766204 UKPROD

[oracle@udbmon10]$ rman catalog rcat/liverxxxx

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Nov 14 13:01:39 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> set  DBID 3907766204

executing command: SET DBID
database name is "UKPROD" and DBID is 3907766204

RMAN> unregister database ;

database name is "UKPROD" and DBID is 3907766204

Do you really want to unregister the database (enter YES or NO)? YES
database unregistered from the recovery catalog

RMAN> exit

Categories: Oracle

Could not execute auto check for display colors using command /usr/bin/xdpyinfo

November 6, 2013 Leave a comment

even after you set DISPLAY when installing oracle on a linux environment you get the following error

Image

In order to resolve the issue

1. login as root

2. execute  xhost +SI:localuser:oracle

3. login as the oracle user

4. execute ./runInstaller

the above should resolve the issue

Categories: Oracle