Apex Sessions on database
Hi I have a database with 150 users.. but it is creating 200-300 sessions.. of which only 5-20 are used at peak..
is teh number of sessions create an automatic function of APEX.. or is there a parameter somewhere?
Deam
Hi Deam,
are all those session for user APEX_PUBLIC_USER?
Which web server are you using OHS with mod_plsql, APEX Listener, EPG?
If you use OHS with mod_plsql, which version are you using?
If you use OHS you should check http://joelkallman.blogspot.co.uk/2008/01/oracle-http-server-apache-20-and.html and http://docs.oracle.com/cd/E14571_01/portal.1111/e12041/concept.htm (search for session) to understand how the database connection pooling of mod_plsql works.
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf
Similar Messages
-
Trace Apex session from sqlplus
Hi,
Apex 4.2.4, Oracle 11.2.0.3, Apex Listener 2.0.5
How to start Apex session trace from sqlplus command line? I know thread Trace with &p_trace=YES but this is not a solution because I want to start from sqlplus (PL/SQL code).
Any help?
Brg
DamirYour question has changed.
Your question now: "How do I identify a session in the database that belongs to an APEX page?"
Use the session tables to match your APEX connection to the information in the gv$session table.
Yes - this is a "free" information in the database, but it is also secure. You will need elevated privileges to do this. Use with caution.
You will not find a PLUG-IN that can do tracing if the base user can not do tracing. The reason the URL feature is there from APEX is because APEX (the framework) has the access and ability - but that is not passed down to each workspace / schema without using the framework.
I have no details of your installation or your application, so you will need to determine what types of calls are being made to the database and with what method (EPG, OHS, ORDS, etc..)
select SID, SERIAL#,inst_id,program,module,event,Action,machine, client_info, CLIENT_IDENTIFIER
from gv$session s where type!='BACKGROUND'
and status='ACTIVE' and sql_id is not null;
The CLIENT_IDENTIFIER will show you SESSION and USER
The MODULE will show you APP and PAGE
From there, you can do all your SID related tracing you need. -
APEX 3.1 "Apex Session Timeout"
Hi all,
I have been trying to find out how I can set a session to timeout in APEX 3.1 i.e. 30 minutes. I have reviewed Shared Components etc and haven't been able to find anything to control this timeout value. I am aware of the procedure SET_SESSION_MAX_IDLE_SECONDS but i am unable to find it in any of the wwv_* packages. Is it available in 3.1? If not, how can i set this value? Also, can the timeout value be set per application rather than globally?
Thanks!Thanks for that (again). So it looks like I have 3 options:
1) Incorporate a JS timeout script
2) Build an APEX session package (api_apex_session.pck) that would handle this
3) Install APEX 3.2 where all this is supported
What about the web server or cookie management...is there anything that could be used there? -
How can i restrict a user not open more than 3 sessions in database
how can i restrict a user not open more than 3 sessions in database.For this i have already create a profile and set CONCURRENT_SESSIONS=3 and assing that profile to user but the problem is there.
You will simply need to use the following parameter in your CREATE PROFILE syntax.
CREATE PROFILE normal_user
LIMIT SESSIONS_PER_USER 2;
but the resource limits set for a profile are enforced only when you enable resource limitation for the associated database.
you could do this either by having an initialization paramater which will invoke as soon as the database starts or try using ALTER SYSTEM command -
I have a doubt as to how to check the total sessions on the database. Also, how many total sessions which are possible on the database.
I hope, my question is clear.
Please, help in solving the doubt.
regardsI assume this is a duplicate of your other thread.
Re: Total concurrent sessions in database.
I answered in the other thread. In the future, though, please don't duplicate posts.
Justin -
How to create an apex session in e.g. SQL*Plus?
I would like to establish an apex session using a tool different from SQL Workshop.
How can I achieve this using e.g. SQL*Plus or SQL Developer?
Is there some document on the internet which addresses this question? I couldn't find it yet.First and foremost you need to set the Security Group ID (SGID)
begin
APEX_UTIL.SET_SECURITY_GROUP_ID(APEX_UTIL.FIND_SECURITY_GROUP_ID('MY_WORKSPACE')); -- replace MY_WORKSPACE with yours
end;
then you might need to set an application_id for certain features to work:
select application_id
into apex_application.g_flow_id
from apex_applications
where application_name = 'my_app_name'; -- replace my_app_name with yours
If you need to create a session id, you can get a fresh one with
DECLARE
VAL NUMBER;
BEGIN
VAL := APEX_CUSTOM_AUTH.GET_NEXT_SESSION_ID;
END;
Flavio
http://oraclequirks.blogspot.com
http://www.yocoya.com -
Want to get ApEx session in JSP
Hi Pals,
From my ApEx application, I am calling a JSP by providing a direct URL.
THe JSP does some specific function here.
If the user get the JSP url by right click and view source, they can very well use this outside my ApEx application.
I want to apply security like, the JSP url only works inside my ApEx application.
My thought, if I can share ApEx session with JSP session I can impose the security check in JSP level.
Any idea would be appreciable.Hi,
Im using below method to call jsp page and passing UserName, application id and Session as
<iframe src="http://apex.oracle.com/pls/otn/...javaapplication.jsp?userId=&USER.&appId=&APP_ID.&sessId=&SESSION."></iframe>
Vailidation is done against the table "wwv_flow_sessions$" of schema : flows_030100 ,whether those values are exist in table.
But if user is already logged into apex application, he can run the jsp independantly taking the url from "view source".
Im also looking for more solid validation
Regards,
Benz -
Inactive sessions increasing database
Hi
We are using oracle11.5.10.2 on windows 2000 server and database version 10.2.0.3
we are facing problem with inactive sessions,grdually inactive sessions increasing and thats leads database crash.
Temporary i increased processes parameter value tp 400 prviously it was 200
Most of inactive session from apps user only
How can i fix this problem?
Thanks
With Regards
OHHi,
Please see these threads.
how to kill inactive sessions????????
how to kill inactive sessions????????
Inactive sessions in Database
Re: Inactive sessions in Database
Regards,
Hussein -
Hi,
Lot inactive sessions are in database, Before we bounce database ----> max process got reached, For that we have changed max process and bounced the database but i can see still 75 inactive sessions in database,
SQL> show parameter process
NAME TYPE VALUE
aq_tm_processes integer 1
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 2
log_archive_max_processes integer 2
processes integer 200
SQL> show parameter spfile
NAME TYPE VALUE
spfile string
Then i changed processes to 300
SQL> show parameter process
NAME TYPE VALUE
aq_tm_processes integer 1
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 2
log_archive_max_processes integer 2
processes integer 300
even after bouncing still 75 inactive sessions in databaseHi,
What are the events/programs of those sessions?
Have you started the application or not yet?
Go through the following documents and see if it helps.
Note: 427759.1 - How To Prevent Inactive JDBC Connections In Oracle Applications
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=427759.1
Note: 261791.1 - 11i JDBC Thin client connections remain active, MAX PROCESSES REACHED
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=261791.1
Regards,
Hussein -
SHUTDOWN: Active sessions prevent database close operation
Hi
Yesterday morning, our Oracle Apps Database did not shutdown and throws the following error.
Fri May 11 06:57:18 2012
Active call for process 2031784 user 'xxxl' program 'oracleyyy@zzz'
SHUTDOWN: waiting for active calls to complete.
Fri May 11 07:04:01 2012
Incremental checkpoint up to RBA [0x165b.1b2b21.0], current log tail at RBA [0x165b.1b2b21.0]
Fri May 11 07:11:14 2012
MMNL absent for 1203 secs; Foregrounds taking over
Fri May 11 07:24:05 2012
Incremental checkpoint up to RBA [0x165b.1b2b42.0], current log tail at RBA [0x165b.1b2b4a.0]
Fri May 11 07:44:10 2012
Incremental checkpoint up to RBA [0x165b.1b2b6f.0], current log tail at RBA [0x165b.1b2b7d.0]
Fri May 11 07:52:18 2012
SHUTDOWN: Active sessions prevent database close operation
Fri May 11 08:04:39 2012
Since last 3 years, we never faced such a situation even though many modules (oracle Apps) were implemented from time to time. This time OTL module is going live and consultants were running some procedure during backup start time.
Even after issuing 'addbctl.sh stop immediate', how come oracle did not close all the database sessions? How to prevent such situation in future?
Any help is highly appreciated.
Regards
Arizuddinyou can first do a alter system checkpoint and then try to shutdown the database.
You can also kill all the active user sessions from v$session and then shutdown the database. -
So many INACTIVE sessions in Database
Hi,
Actually PMON will clears all inactive sessions from database.
But i can see there are sessions like more then 3,4 days old.
Why PMON is not clearing them. ?
On which intervals will PMON do inactive sessions cleaning.
thanks in Advance.>
But i can see there are sessions like more then 3,4 days old.
>
Heed the advice of the other responders.
But for idle sessions that you want cleared immediately you can use
ALTER SYSTEM DISCONNECT SESSION . . . IMMEDIATENOTE - this acts differently than the 'KILL SESSION' syntax typically used.
See 'DISCONNECT SESSION' clause in the SQL Language reference section for ALTER SYSTEM
http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_2013.htm
>
Use the DISCONNECT SESSION clause to disconnect the current session by destroying the dedicated server process (or virtual circuit if the connection was made by way of a Shared Sever).
The IMMEDIATE setting disconnects the session and recovers the entire session state immediately, without waiting for ongoing transactions to complete.
>
Then contrast that with the text for KILL SESSION -
Total concurrent sessions in database.
I have a doubt as to how to check the total concurrent sessions on the database. I mean, how many total sessions are connected to the database at any particular moment.
I hope, my question is clear.
Please, help in solving the doubt.
regardsIs this a duplicate of your other question?
Total sessions in database
Have you looked up the V$SESSION table i the documentation? That's probably what you're looking for.
Justin -
Anyone created an apex session in a plsql procedure in 4.1
Hi all,
Was wondering if anyone has been able to create a procedure that creates an apex session that allows using collections after upgrading to 4.1
Our procedure which we used for nightly processing worked fine in 4.0.1 is no longer working after upgrading.
Thanks for any suggestions or help
Wayne
We were using:
htp.init;
l_cgivar_name(1) := 'REQUEST_PROTOCOL';
l_cgivar_val(1) := 'HTTP';
owa.init_cgi_env(
num_params => 1,
param_name => l_cgivar_name,
param_val => l_cgivar_val );
for c1 in (select workspace_id from apex_applications where application_id = l_application_id) loop
l_workspace_id := c1.workspace_id;
dbms_output.put_line('l_workspace_id:'||l_workspace_id);
end loop;
wwv_flow_api.set_security_group_id(l_workspace_id);
apex_application.g_instance := 1;
apex_application.g_flow_id := l_application_id;
apex_application.g_flow_step_id := 999;
wwv_flow_custom_auth_std.post_login(
p_uname => l_user,
p_session_id => null,
p_flow_page => apex_application.g_flow_id||':'||999);
wwv_flow.show (
p_flow_id => apex_application.g_flow_id,
p_flow_step_id => apex_application.g_flow_step_id,
p_instance => apex_application.g_instance,
p_request => 'FSP_SHOW_POPUPLOV'
execute procedure_XXXX (this procedure contains the code to create an apex collection)Not for sure how I did it, but the user handle should have been wcoleku.
Wayne -
What is an APEX session? Where is it documented?
Exactly what defines an Oracle APEX session? Is it documented somewhere? (I can't see blogs because they filter them out here.)
I ask because I find global variables persisting when I've logged out of APEX and logged back in again. Connectivity is "hit and miss" here. So I often duplicate browers tabs (sessions?) which are timing out. I'm wondering if that's not leaving disconnected session(s) that I log back into. I noticed that the initialization process ("on new session") is not executing, so I presume when I log back in I'm not starting a new session.
Thanks -- HowardHi,
This might help
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/concept_ses.htm#sthref103
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/concept_ses_val.htm#sthref124
I ask because I find global variables persisting when I've logged out of APEX and logged back in again. Connectivity is "hit and miss" here. So I often duplicate browers tabs (sessions?) which are timing out. I'm wondering if that's not leaving disconnected session(s) that I log back into. I noticed that the initialization process ("on new session") is not executing, so I presume when I log back in I'm not starting a new session. Can you create some example to apex.oracle.com to demonstrate what you mean?
Regards,
Jari
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
Can I install APEX in one database and use it to connect and develop applications for other databases in network.
The two issues that I have run into with running an ApEx application in one database against data in another database is dealing with sequences and LOBs.
If you use a database link which does not specify a user name and password to get a sequence value from a remote database in an ApEx application you get the following type of error:
failed to parse SQL query:
ORA-01017: invalid username/password; logon denied
ORA-02063: preceding line from ...Since the sequence is stored in the other database and ApEx runs in the PL/SQL engine because of the engine's security, you have to use a database link with a user name and password in it like:
CREATE DATABASE LINK db_link CONNECT TO you_username IDENTIFIED BY your_password USING your_remote_db;
SELECT your_sequence.NEXTVAL@db_link FROM DUAL;Accessing LOB columns in your remote database cannot be done via a SELECT statement. You have to use an INSERT statement. I have my solution to this on my blog.
Mike
Maybe you are looking for
-
Http adapter metadata in java mapping
Hi, I'd like to read the httpheaders in my java mapping. How can this be done? I have tried the follwing in the execute method trace = (AbstractTrace)param.get( StreamTransformationConstants.MAPPING_TRACE); DynamicConfiguration
-
To log in on a public network without a password-key (not secured), a user login is required. After connecting to the network, the browser, upon opening it, normally automatically loads the login page, in order to enter a username and password and co
-
How can i use toArray to transfer Set to Array ?
Dear All, Currently, I just can do it by the following code, is there any good idea ? Object[] object = set.toArray(); int[] bb = new int[set.size()]; for(int i=0; i<object.length; i++) { Object object_aa
-
Plz help me
-
Pagination Limit the number of result from query. If exceed throw error
Hi expert, I have a question that need your guidance. Declare type myarray is table of emp.empid%type; mytab myarray; vcounter number; vlimit number; Begin select limitnumber into vlimit from ABC where table_name = 'XYZ'; sele