Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 211 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 77 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Data Security setup using Session Variable Initialization Block fails with nQSError:23006 OBIEE 12.2

Hello Experts,
We have OBIEE 12.2.1.4.0 on Linux server. Trying to implement data security using session variable Initialization Block. Performed these steps -
1. Created Inti Block - "Authorization"
2. Non-System session variable
3. Defined a Data Filter for BIConsumer Application Role using the session variable.
4. Also, I tested the Init Block by passing a valid username and was able to retrieve data from the SQL
When I login to analytics and run the query , I receive an error [nQSError: 23006] The session variable, NQ_SESSION.Reg_Cd, has no value definition.
Can you please tell me where I went wrong in this setup. Any help is much appreciated
Regards
Rakesh
Answers
-
Since you enabled caching for that variable - did you cache the variable without any value? Like when it was empty?
0 -
Hi Christian,
I am afraid I did . When I checked Row-Wise Initialization I think the cache got checked as well & I never gave a default value to the variable. How can I correct this ?
Thank You.
0 -
Purge the cache. And gove the variable a default value so you never risk that error.
0 -
As per my understanding, you are trying to initialize multi-valued session variable. In this case, you need to only check the box "Row wise initialization" and "use caching" that u already did and importantly remove the target variable "Reg_Cd" that you defined. Then, replace your initialization block query with the following query:
SELECT 'Reg_Cd', R_CD from OIS_USER_INFO where username = ':USER'
This query will initialize the Reg_Cd session variable containing multiple values since you have checked row wise initialization.
Now, I think it will work. Please let me know.
Regards,
DPal
0 -
Thanks Christian. So, I purged the cache, unchecked the cache and gave a default value(04) to the variable "Reg_Cd" and ran the query. I am only getting the default value back. Doesn't look like the Init Block SQL Query is executed. Please help me figure out what's missing. Regards.
0 -
Drop the whole init block and variable and recreate.
0 -
Hi Christian,
I deleted the entire Init block & variable. recreated again, but I could not get it to work. It would only show me the default value of the variable. Not sure if this is a bug . If I remove the default I get the error - [nQSError: 23006] The session variable, NQ_SESSION.Reg_Cd, has no value definition.
I tried the other suggestion given by DPal & it seems to be working in my case. In the Admin tool context based help, it says we can use Row-Wise initialization to define dynamic session variables . I re-wrote init block query to get the variable name & the values from the sql table. and ran the test query in analytics successfully.
Thank You.
0 -
Hi DPal
Thank You for your suggestion. It seems to work for my need. Please see my previous update.
Regards
0 -
My bad. I hadn't seen that you forced a variable name rather than getting it from the SQL.
0