Oracle DB useful queries

To Kill Session:

SELECT ‘alter system kill session ‘||””||B.SID||’,’||
b.machine from v$session b where B.OSUSER in (‘AK851270’);

To Check Lock on Tables:

select a.session_id,a.oracle_username, a.os_user_name, b.owner “OBJECT OWNER”, b.object_name,b.object_type,a.locked_mode from

(select object_id, SESSION_ID, ORACLE_USERNAME, OS_USER_NAME, LOCKED_MODE from v$locked_object) a,



To check tablespace datafiles/tempfiles:



COLUMN tablespace FORMAT a18 HEADING ‘Tablespace Name’
COLUMN filename FORMAT a75 HEADING ‘Filename’
COLUMN filesize_in_MB FORMAT 9,999,999,999,999 HEADING ‘File Size’
COLUMN used_in_MB FORMAT 9,999,999,999,999 HEADING ‘Used (in bytes)’
COLUMN pct_used FORMAT 999 HEADING ‘Pct. Used’

BREAK ON report

COMPUTE sum OF filesize ON report
COMPUTE sum OF used ON report
COMPUTE avg OF pct_used ON report
SELECT /*+ ordered */
d.tablespace_name tablespace
, d.file_name filename
, d.file_id file_id
, d.bytes/1024/1024 filesize_in_MB
, NVL((d.bytes – s.bytes), d.bytes)/1024/1024 used_in_MB
, TRUNC(((NVL((d.bytes – s.bytes) , d.bytes)) / d.bytes) * 100) pct_used
sys.dba_data_files d
, v$datafile v
, ( select file_id, SUM(bytes) bytes
from sys.dba_free_space
GROUP BY file_id) s
(s.file_id (+)= d.file_id)
AND (d.file_name =
d.tablespace_name tablespace
, d.file_name filename
, d.file_id file_id
, d.bytes/1024/1024 filesize
, NVL(t.bytes_cached, 0)/1024/1024 used
, TRUNC((t.bytes_cached / d.bytes) * 100) pct_used
sys.dba_temp_files d
, v$temp_extent_pool t
, v$tempfile v
(t.file_id (+)= d.file_id)
AND (d.file_id = v.file#)

To create schema:
create tablespace GST_01 datafile ‘path/GST_01.dbf’ size 10G;

create user GST identified by “password” default tablespace GST_01;

grant connect,resource to gst;

To Impersonate in OBIEE:


*IPAddress or Hostname of obiee.

OBIEE11g: Error:[nQSError: 43126] Authentication failed: invalid user/password. error when Logging into Answers/analytics

After restarting all services (Admin server, Node manager, Managed server and OPMN), users were not bale to login to Presentation Services (commonly known as answers/analysis). It was showing invalid user/password error.

Log file:  /u01/APP/OBIEE/instances/instance1/diagnostics/logs/OracleBIServerComponent/coreapplication_obis1/nqserver.log

error: [2017-08-02T21:53:52.000+05:30] [OracleBIServerComponent] [ERROR:]1] [] [] [ecid: 0000LqZjaJG4qmmpsoL6iX1PWVhs000002,0:26:1:6] [tid: eaed6700] oracle.webservices.provider.ProviderException: java.lang.RuntimeException: SecurityService::authenticateAccess is denied for the specified credentials/identity.
[2017-08-02T21:53:52.000+05:30] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 0000LqZjaJG4qmmpsoL6iX1PWVhs000002,0:26:1:6] [tid: eaed6700] [nQSError: 43126] Authentication failed: invalid user/password.

Root Cause: The BISystemUser account has become locked.


  1. Log in to the WebLogic Server Administration Console.
  2. Navigate to Security Realms > myrealm > Users and Groups > Users > BISystemUser > Password
  3. Reset the password to same as of old password (i.e. you just need to reset to same password) and save.
  4. Login to Enterprise Manager.
  5. Navigate to WebLogic Domain  and right click on bifoundation_domain.
  6. Click on Security > Credentials
  7. click on and then system.user
  8. Then click on edit on top of this table and reset the password same as you set for BISystemUser in WebLogic Server Administration Console.
  9. Restart OPMN services and wait (i did so) for 10 minutes before login into Answers.
  10. It should work.


Thank You

Akash (@akashdgarg).

OBIEE11g: Managed server services Stuck: java.lang.OutOfMemoryError: GC overhead limit exceeded error

One fine day, if you suddenly face an issue of OBIEE being not working, managed server services in ‘Hang’ or ‘STUCK’ state, try to restart the services but no luck etc. Reason behind all this scenarios could be the following:

java.lang.OutOfMemoryError: GC overhead limit exceeded.

you will find above error in bi_server.log (bi_server is the name of your managed server) at below path:


Error: looks like this:

####<Jun 12, 2017 8:22:37 PM IST> <Error> <HTTP> <etdcrpt02> <bi_server1> 
<[STUCK] ExecuteThread: '11' for queue: 
'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> 
<005KKckpyjA4qmmpsoL6iX0001CH00001^> <1497279157635> <BEA-101017> 
<[ServletContext@1533767336[app:bisecurity module:bisecurity path:
/bisecurity spec-version:2.5 version:11.1.1]] 
Root cause of ServletException.
java.lang.OutOfMemoryError: GC overhead limit exceeded

Cause of error:

 The detail message "GC overhead limit exceeded" indicates that the 
garbage collector is running all the time and Java program is making very 
slow progress. After a garbage collection, if the Java process is spending 
more than approximately 98% of its time doing garbage collection and if it 
is recovering less than 2% of the heap and has been doing so far the last 
5 (compile time constant) consecutive garbage collections, 
then a java.lang.OutOfMemoryError is thrown. This exception is typically 
thrown because the amount of live data barely fits into the Java heap 
having little free space for new allocations.


Instant: restart all services (admin server, node manager, managed server and OPMN).

while restarting managed server, first you need to stop/force stop (to force stop use kill -9 PID ) managed server.

Permanent fix: 

Increase the heap size. The java.lang.OutOfMemoryError exception for 
GC Overhead limit exceeded can be turned off with the command line 
flag -XX:-UseGCOverheadLimit.




Thanks till next time

Akash (@akashdgarg)



‘Catalog’ not visible despite of having access in OBIEE11g.

One of my user raised an issue of ‘Catalog’ menu being not visible on homepage along with other menu items like Dashboard, Open, New etc.catalog_not_visible

My initial investigation was to check roles, group of the user. He belongs to ‘AuthenticatedUser’ group, no explicit denial of access to catalog folder. He was able to open reports by going an alternative approach(using Open menu). Then why is he not able to see catalog as a menu button on home screen?

Solution: 1. Log in to user’s account (impersonation/ or by user’s credentials), go to my Account, check the Accessibility mode to ‘OFF’ (earlier it was set to ‘ON’).


press ‘OK’ and refresh the page:


Catalog is visible now.

OBIEE Version:


Thanks till next time.

Error while exporting/printing large data to PDF/Excel2007 in OBIEE11g

Today, my business user sends me an error screenshot saying he was not able to take a printout of detailed report which had approx. 7k rows. I provided an ‘Export‘ link at the bottom of the report and asked the user to download first and print. But, interestingly, he was able to download in excel 2003 but neither in excel2007 nor pdf. It triggered me to investigate the issue and provide a solution.

Issue: trying to export an analysis result in to pdf or printing to pdf and gives following error:


A fatal error occurred while processing the request. The server responded with:$ReadOverTheLimitException.


Solution: edit the config.xml file located at /$OBIEEHOME$/instances/instance1/config/OracleBIJavaHostComponent/coreapplication_obijh1/config.xml

Note: take a backup of config.xml file in case you need to rollback the changes.

and edit the following entries:


in my case value in <InputStreamLimitInKB> was 32768 and i changed it to 0 (zero)


0 means deactivating the limit.

and restart the services.

But , would you like to limit the maximum input size (in kilobytes) for requests that are sent to the JavaHost service, then increase the parameter’s value until you are able to resolve the issue.

Note: everytime you make the changes in config.xml file, you need to restart the services.

You can also try changing the following tag in same file:



AKASH (@akashdgarg)





Showing dynamic data over image in OBIEE

There was a requirement in which we needed to show report’s data on a static image. This Image was provided by client and we had to place the tables of 4×2 on multiple places on this image. In image (refer below image) you will see Rectangles in different colours which are static, but values shown under those rectangles are dynamic. These values are changing as per there is a change in data in ETL table. To overcome as a solution of this requirement we took help of html code. Here is the step by step guide to implement the same.


  1. Criteria:go to criteria tab and drag and drop columns for which you want to show data on image.show_dynamic_value2
  2. Create one column called ‘Style’ for the position of different boxes on Image. This is how 8 different positions were created. No of positions may vary for your project. you can change the px values to change the position of objects on image.show_dynamic_value3
  3. Then use ‘Narrative View’show_dynamic_value4
  4. you can take reference from below code:Prefix: show_dynamic_value6Note: Image shown is placed at a path mentioned above. This path may be different for different projects

    Narrative: show_dynamic_value5


    Highlighted texts:

    color:red it is a tag for Red coloured box and @2 and @4 are referring to the columns in criteria which to be shown in row corresponding to red box: @2 and @4 are referring to two different columns, Internal and External respectively.

    Like wise this is done for other coloured boxes.

    Row seperator : </div>

    Post fix : </div>

    Please share your thoughts if it helped and keep watching this space for more updates.You can follow me on twitter (@akashdgarg) for quick updates about what’s happening in the area of BI, Big data, OBIEE etc.

Continue reading