Automate the purging of the repository cache (Exalytics Linux)

So we have created a ram disk and you are now storing the repository cache, how can we automate the purging. 1.  First we will create a file that we can run that will 1st load the BI environment, then we will clear the cache : -          Create a file called purge.txt with the following contents: Call SAPurgeAllCache(); -          Create a file called purge.sh with the following contents cd /u01/app/oracle/product/fmw/instances/instance1/bifoundation/OracleBIApplication/coreapplication/setup . ./bi-init.sh cd /u01/app/oracle/product/fmw/Oracle_BI1/bifoundation/server/bin ./nqcmd -d "AnalyticsWeb" -uweblogic –p<place the password here> -s/home/oracle/TT_INSTALLERS/purge.txt   2. Update crontab to execute the file everyday: 00 23 * * * /home/oracle/TT_INSTALLERS/purge.sh > /home/oracle/TT_INSTALLERS/purged.log 2>&1 You now have automated purging of your cache.

Create a Ram Disk in Exalytics (LINUX)

So you have all your data in memory, how can you make it even faster. You can create what you call a RAM Disk, this is when you have allocated part of the memory to be used as a file system, then configure BI to use the ram filesystem for caching. 1. Check the amount you have free ram you have left on your machine, by using the command free –g, you can see we have 1tb ram. 2. Create a folder to use as a mount point for your RAM disk. mkdir /mnt/ramdisk 3. Add the following into the /etc/fstab file in the size add the size you want, we are using 1g: tmpfs /mnt/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0 4. Enter the following to mount it : mount /mnt/ramdisk 5. To check all mounted df-k 6. On the BI Server edit the NQSConfig.INI 7. Update the DATA_STORAGE_PATHS as below, don’t update anything else. [CACHE] ENABLE = YES; # This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control # A comma separated list of pair(s). # These are relative to the process instance directory. # e.g. DATA_STORAGE_PATHS = "nQSCache" 500 MB; # resolves to # $(ORACLE_INSTANCE)/bifoundation/OracleBIServerComponent/<instance_name>/nQSCache #DATA_STORAGE_PATHS = "cache" 500 MB; DATA_STORAGE_PATHS = "/mnt/ramdisk" 500 MB; 8. Lets set up OBIEE to use ramdisk for the presentation cache by doing the following in the OBIEE 11g EM console: FMW Control > Business Intelligence > CoreApplication > Capacity Management tab 9. Then click the Performance tab, tick ‘cache enabled’ under ‘Enable BI Server Cache’ 10. Restart the BI Services. Next time I will show you how to automatically clear the cache.

ORA-30012: undo tablespace ‘UNDOTBS01′ does not exist or of wrong type

I was recently recovering a backup of a standby database, the standby was from a primary that was a RAC with 2 nodes.  I had the following error:

SQL> startup

ORACLE instance started.

Total System Global Area 3170893824 bytes

Fixed Size                  2043968 bytes

Variable Size            2030047168 bytes

Database Buffers         1124073472 bytes

Redo Buffers               14729216 bytes

Database mounted.

ORA-01092: ORACLE instance terminated. Disconnection forced

ORA-30012: undo tablespace 'UNDOTBS01' does not exist or of wrong type

Process ID: 19872

Session ID: 1218 Serial number: 3

Solution

[oracle@eux3300392 dbs]$ vi initps82live.ora

undo_management=MANUAL

SQL> startup

ORACLE instance started.

Total System Global Area 6313463808 bytes

Fixed Size                  2264976 bytes

Variable Size            1677721712 bytes

Database Buffers         4613734400 bytes

Redo Buffers               19742720 bytes

Database mounted.

Database opened.

SQL>

4. create a new undo tablespace, e.g.:

CREATE UNDO TABLESPACE "UNDOTBS3" DATAFILE '+DATA' SIZE 10880M AUTOEXTEND ON NEXT 5120K MAXSIZE 32767M

5. shutdown the database

6. change UNDO_MANAGEMENT=AUTO in your init file and set UNDO_TABLESPACE=UNDOTBS (or whatever name you specified during the undo tablespace creation)

7. connect "/ as sysdba" and startup the database using this init file (as in step 2).

Now the database will open using the new undo tablespace and it would have created new undo segments in this tablespace.

   

Adding New Redo Log Groups

An error occurs when deleting a logfile group after you have added new groups. SQL> alter database drop logfile group 3; alter database drop logfile group 3 * ERROR at line 1: ORA-01623: log 3 is current log for instance   Solution SQL> alter system switch logfile; System altered. SQL> alter system switch logfile; System altered. SQL> alter system checkpoint; System altered. SQL> alter database drop logfile group 3; Database altered. Then just check by doing the following: SQL> select member from v$logfile;  

Cannot mark instance UNNAMED_INSTANCE as enabled

 

I was recently recovering a backup of a standby database, the standby was from a primary that was a RAC with 2 nodes.  I had the following error:

 

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled

 

Solution

 

Edit the .ora file add the following:

*._no_recovery_through_resetlogs=TRUE

Save

 

SQL> shutdown immediate;

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

 

SQL> startup mount;

 

ORACLE instance started.

Total System Global Area 6313463808 bytes

Fixed Size                  2264976 bytes

Variable Size            1677721712 bytes

Database Buffers         4613734400 bytes

Redo Buffers               19742720 bytes

Database mounted.

 

SQL> alter database open resetlogs;

Database altered.

 

shutdown and remove the line added above and restart instance