September 11, 2015

Connection scripts in OBIEE11g with real time example / connection scripts in connection pool properties

We can use this option to execute a command script.

There are four possibilities where we can use to execute command script in RPD level.

1) Execute on connect

2) Execute before query

3) Execute after query

4) Execute on disconnect

For example we will discuss about Execute on connect

We will get few common requirements like .... changing NLS_DATE_FORMAT.
or client may ask some times what are the users loggged in the dashboard side.

 For example we have a requirement whenever user logis in ...it should insert one record with user name and login time.

This requirement we can do in simple way by using connection scripts.

Follow below steps:

1) Open connection scripts tab.

2) Click on Execute on connect




3) Click on new button.



4) Enter below command and click on OK.



 


 5) Before that create LOGIN_TABLE in database by using below sql command.

CREATE TABLE LOGIN_TABLE

  "USER" VARCHAR2(20 BYTE),
  "DATE" TIMESTAMP(6)




 



5) Now login with weblogic account and run any report.













 6) Login with other account ... Here my other account is Asia.





 And run any report.






 6) Now check the table which we created in beginning (Login_table).



 We logged in two different accounts...weblogic and Asia.
Table has updated with user and date.........

Let me know if you have any issues regarding this post.


Bye....until next post.......

 

1 comment:

  1. Can you explain all other options also before query after query and on connection closed

    ReplyDelete