Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 535.7K On-Premises Infrastructure
- 138.1K Analytics Software
- 38.6K Application Development Software
- 5.6K Cloud Platform
- 109.3K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71K Infrastructure Software
- 105.2K Integration
- 41.5K Security Software
Query to find out the preferences and section_groups
How do I find out what are the ...
1. default preferences available to the current user
2. user defined preferences and their attributes
3. user defined section_groups and their attributes
The schema has CTXAPP granted.
I am looking for queries that do NOT involve dba_* tables or views (if possible).
Thanks.
Best Answer
-
1. default preferences available to the current user
If you mean pre-defined preferences then:
SELECT pre_name FROM ctx_user_preferences WHERE pre_owner = 'CTXSYS';
2. user defined preferences and their attributes
SELECT pre_name, prv_value FROM ctx_user_preferences, ctx_user_preference_values WHERE pre_name = prv_preference (+);
The outer join is necessary because some preferences will not have attributes.
3. user defined section_groups and their attributes
Depending on what info you're after, you'll want to play around with ctx_user_section_groups and ctx_user_sections
A simple listing of the sections in section groups would be
SELECT sgp_name, sec_name FROM ctx_user_section_groups, ctx_user_sections WHERE sgp_name = sec_section_group (+);
Answers
-
1. default preferences available to the current user
If you mean pre-defined preferences then:
SELECT pre_name FROM ctx_user_preferences WHERE pre_owner = 'CTXSYS';
2. user defined preferences and their attributes
SELECT pre_name, prv_value FROM ctx_user_preferences, ctx_user_preference_values WHERE pre_name = prv_preference (+);
The outer join is necessary because some preferences will not have attributes.
3. user defined section_groups and their attributes
Depending on what info you're after, you'll want to play around with ctx_user_section_groups and ctx_user_sections
A simple listing of the sections in section groups would be
SELECT sgp_name, sec_name FROM ctx_user_section_groups, ctx_user_sections WHERE sgp_name = sec_section_group (+);