How to know active sessions logged in by same database users
This is 10g. I need to query list of DB users who have logged in using the same database user accounts. How can I achieve this? This is on 10g and 9i
Hello,
You may enable audit. Then, with the following query you may get the list of User who logged on the same Oracle User account:
select username, os_username, userhost, terminal, timestamp, action_name
from dba_audit_trail
where action_name in ('LOGON','LOGOFF')
order by username;Please, find below a link about audit:
http://www.oracle-base.com/articles/10g/Auditing_10gR2.php
Hope this help.
Best regards,
Jean-Valentin
Similar Messages
-
How to find active sessions count on a server in weblogic server console
Hi All,
I would like to know how to find active sessions count on a server in weblogic console. I am using weblogic 11g.
Regards,
Sunil.On the deployment, monitoring tab, you can select web applications. Here the number of current sessions are listed per web application deployed on the domain.
The deployment itself (deployments, application, monitoring, sessions) shows a list of sessions and where it is located. Unfortunately, there is no aggregation (but that is something you can so yourself as well).
When you are using a load balancer in front, the count of sessions on per web application on the domain gives you some clue how many sessions there are present on each server.
That is to say, when load balancer is using round-robin (and does that correct), you can take the total number of sessions divide it by the number of servers. -
How to know active user in Ad ? & how many days from not use user id ?
How to know active user in Ad ? & how many days from not use user id ?
Thanks & Regards, Amol . Amol DhaygudeHi Amol,
You can use the below command from the command prompt of DC to get all the AD users who are inactive for last
X weeks,
dsquery
user -inactive X
To extract the inactive user information to a CSV file use the below command,
dsquery user -inactive X > c:\TestFolder\InactiveUsers.csv
NOTE: The value
X represents number of weeks, for example if your requirement is to find the inactive users for last 90 days then the
X value should be 13.
Regards,
Gopi
JiJi Technologies -
How to check relation between two tables in same database
How to check relation between two tables in same database using Oracle SQL developer. Version 2.1.1.64
Hi,
Try this,
SELECT cons.owner AS child_owner, cons.table_name AS child_table,
cons.constraint_name constaint_name,
cons.constraint_type constraint_type, col.owner parent_owner,
col.table_name parent_table, col.column_name column_name
FROM dba_cons_columns col, dba_constraints cons
WHERE cons.r_owner = col.owner
AND cons.r_constraint_name = col.constraint_name
AND col.owner = 'MY_USER'
ORDER BY child_table;Thanks,
Shankar -
How to access "Active Sessions" using MBeans
Hi all,
I have deployed an application at EM (Enterprise Manager).
when I logged into EM and click the application I can see the number of active sessions under "Servlets and JSPs" topic.
how can I access that parameter at application level..??
(I want to access that parameter *"x"* at my web application and display Logged in users : x )
EM shows that the number of active sessions. it updates too.. so there must be some bean or record for that parameter..
how can I access that....??
Regards,
Dinuka.You can use something like the following:
package middleware.magic;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;
import java.io.IOException;
import java.util.Hashtable;
public class Browse {
private String hostname = "172.31.0.106";
private Integer port = 7001;
private String username = "weblogic";
private String password = "transfer11g";
private String protocol = "t3";
private String jndiRoot = "/jndi/";
private String mBeanServer = "weblogic.management.mbeanservers.domainruntime";
private String serviceName = "com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean";
private JMXConnector connector;
public static void main(String[] args) {
Browse test = new Browse();
try {
MBeanServerConnection connection = test.getMBeanServerConnection();
test.getSomeInformation(connection);
test.closeJmxConnector();
} catch (Exception e) {
e.printStackTrace();
public void getSomeInformation(MBeanServerConnection connection) throws Exception {
ObjectName service = new ObjectName(serviceName);
ObjectName[] serverRunTimes = (ObjectName[]) connection.getAttribute(service, "ServerRuntimes");
for (int i = 0; i < serverRunTimes.length; i++) {
String name = (String) connection.getAttribute(serverRunTimes, "Name");
String version = (String) connection.getAttribute(serverRunTimes[i], "WeblogicVersion");
String state = (String) connection.getAttribute(serverRunTimes[i], "State");
System.out.println("Server name: " + name + ", Version: " + version + ", Server state: " + state);
for (int i = 0; i < serverRunTimes.length; i++) {
ObjectName[] applicationRuntimes = (ObjectName[]) connection.getAttribute(serverRunTimes[i], "ApplicationRuntimes");
for (int j = 0; j < applicationRuntimes.length; j++) {
String name = (String) connection.getAttribute(applicationRuntimes[j], "Name");
ObjectName[] componentRuntimes = (ObjectName[]) connection.getAttribute(applicationRuntimes[j], "ComponentRuntimes");
System.out.println("Application name: " + name);
for (int k = 0; k < componentRuntimes.length; k++) {
if (connection.getAttribute(componentRuntimes[k], "Type").equals("WebAppComponentRuntime")) {
String componentName = (String) connection.getAttribute(componentRuntimes[k], "Name");
Integer sessionsCurrent = (Integer) connection.getAttribute(componentRuntimes[k], "OpenSessionsCurrentCount");
Integer sessionsHigh = (Integer) connection.getAttribute(componentRuntimes[k], "OpenSessionsHighCount");
System.out.println(" - Component Name: " + componentName + ", Sessions Current: " + sessionsCurrent + ", Sessions High: " + sessionsHigh);
public MBeanServerConnection getMBeanServerConnection() throws IOException {
return getJmxConnector().getMBeanServerConnection();
public JMXConnector getJmxConnector() throws IOException {
JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port, jndiRoot + mBeanServer);
Hashtable hashtable = new Hashtable();
hashtable.put(Context.SECURITY_PRINCIPAL, username);
hashtable.put(Context.SECURITY_CREDENTIALS, password);
hashtable.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "weblogic.management.remote");
connector = JMXConnectorFactory.connect(serviceURL, hashtable);
return connector;
public void closeJmxConnector() throws IOException {
connector.close();
Information regarding runtimeMBean can be found here: http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e13951/core/index.html.
Open the tree Runtime MBeans, ServerRuntimeMBean and click attributes to see the available attributes (such as Name, WeblogicVersion, State etcetera).
An example output of the program above:Server name: AdminServer, Version: WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PDT 2009 1267925 , Server state: RUNNING
Server name: soa_server1, Version: WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PDT 2009 1267925 , Server state: RUNNING
Application name: FMW Welcome Page Application_11.1.0.0.0
- Component Name: AdminServer__11.1.0.0.0, Sessions Current: 0, Sessions High: 0
Application name: Module-FMWDFW
Application name: bea_wls_internal
- Component Name: AdminServer_/bea_wls_internal, Sessions Current: 0, Sessions High: 0
Application name: mds-soa
Application name: bea_wls_deployment_internal
- Component Name: AdminServer_/bea_wls_deployment_internal, Sessions Current: 0, Sessions High: 0
Application name: wsil-wls
- Component Name: AdminServer_/inspection.wsil, Sessions Current: 0, Sessions High: 0
Application name: bea_wls_diagnostics
- Component Name: AdminServer_/bea_wls_diagnostics, Sessions Current: 0, Sessions High: 0
Application name: mejb
Application name: bea_wls9_async_response
- Component Name: AdminServer_/_async, Sessions Current: 0, Sessions High: 0
Application name: uddiexplorer
- Component Name: AdminServer_/uddiexplorer, Sessions Current: 0, Sessions High: 0
Application name: mds-owsm
Application name: bea_wls_management_internal2
- Component Name: AdminServer_/bea_wls_management_internal2, Sessions Current: 0, Sessions High: 0
Application name: consoleapp
- Component Name: AdminServer_/console, Sessions Current: 0, Sessions High: 2
- Component Name: AdminServer_/consolehelp, Sessions Current: 0, Sessions High: 1
Application name: DMS Application_11.1.1.1.0
- Component Name: AdminServer_/dms_11.1.1.1.0, Sessions Current: 0, Sessions High: 0
Application name: em
- Component Name: AdminServer_/em, Sessions Current: 0, Sessions High: 0
Application name: uddi
- Component Name: AdminServer_/uddi, Sessions Current: 0, Sessions High: 0
Application name: MQSeriesAdapter
Application name: OraSDPMDataSource
Application name: JmsAdapter
Application name: uddi
- Component Name: soa_server1_/uddi, Sessions Current: 0, Sessions High: 0
Application name: wsil-wls
- Component Name: soa_server1_/inspection.wsil, Sessions Current: 0, Sessions High: 0
Application name: SOAJMSModule
Application name: DbAdapter
Application name: bea_wls9_async_response
- Component Name: soa_server1_/_async, Sessions Current: 0, Sessions High: 0
Application name: composer
- Component Name: soa_server1_/soa/composer, Sessions Current: 0, Sessions High: 0
Application name: DMS Application_11.1.1.1.0
- Component Name: soa_server1_/dms_11.1.1.1.0, Sessions Current: 0, Sessions High: 0
Application name: Module-FMWDFW
Application name: usermessagingdriver-email
- Component Name: soa_server1_/sdpmessagingdriver/email-mbeanlifecycle, Sessions Current: 0, Sessions High: 0
Application name: UMSJMSSystemResource
Application name: AqAdapter
Application name: FtpAdapter
Application name: OracleBamAdapter
Application name: SOADataSource
Application name: usermessagingserver
- Component Name: soa_server1_/sdpmessaging/mbeanlifecycle, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/sdpmessaging/parlayx, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/sdpmessaging/userprefs-ui, Sessions Current: 0, Sessions High: 0
Application name: bea_wls_internal
- Component Name: soa_server1_/bea_wls_internal, Sessions Current: 0, Sessions High: 0
Application name: SocketAdapter
Application name: SOALocalTxDataSource
Application name: FileAdapter
Application name: DefaultToDoTaskFlow
- Component Name: soa_server1_/DefaultToDoTaskFlow, Sessions Current: 0, Sessions High: 0
Application name: soa-infra
- Component Name: soa_server1_/soa-infra, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/TaskService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/TaskMetadataService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/TaskQueryService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/TaskReportService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/IdentityService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/UserMetadataService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/RuntimeConfigService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/TaskEvidenceService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/CompositeMetadataService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/b2b, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/b2b, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/AGMetadataService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/AGQueryService, Sessions Current: 0, Sessions High: 0
- Component Name: soa_server1_/integration/services/AGAdminService, Sessions Current: 0, Sessions High: 0
Application name: wsm-pm
- Component Name: soa_server1_/wsm-pm, Sessions Current: 0, Sessions High: 0
Application name: mds-owsm
Application name: b2bui
- Component Name: soa_server1_/b2bconsole, Sessions Current: 0, Sessions High: 0
Application name: bea_wls_diagnostics
- Component Name: soa_server1_/bea_wls_diagnostics, Sessions Current: 0, Sessions High: 0
Application name: bea_wls_cluster_internal
- Component Name: soa_server1_/bea_wls_cluster_internal, Sessions Current: 0, Sessions High: 0
Application name: EDNLocalTxDataSource
Application name: EDNDataSource
Application name: uddiexplorer
- Component Name: soa_server1_/uddiexplorer, Sessions Current: 0, Sessions High: 0
Application name: bea_wls_deployment_internal
- Component Name: soa_server1_/bea_wls_deployment_internal, Sessions Current: 0, Sessions High: 0
Application name: worklistapp
- Component Name: soa_server1_/integration/worklistapp, Sessions Current: 0, Sessions High: 0
Application name: mds-soa
Application name: OracleAppsAdapter -
Hello,
Is there a way to determine what are the active Session IDs in DI Server?Hi Yatsea,
Still remember me? We both meet in Malaysia last year which you held an Advance training in SDK. How are you?
About the DI Server, when I'm gonna logout the Session ID, a fault message appears "SESSION ID IS IN USE", which is currently processing a document. I just want to know how to view all the active session ids without using arrays so i can easily avoid duplicate documents.
Regards,
Gilbert Ngo -
How to get active session details
Dear all
in my application i want to display number of users online in a list and their details,for that how can i get the active session details in a jsp , or any other ways to do this.any suggestion regarding this is very much helpful to me. thanks in advance
thanking u
yours
kumaran ramuHi,
You can use a Listener class for track the sessions and do some logic when a session is created/destroyed. See HttpSessionListener interface. You can save the session IDs and session objects when a session is created, for example in a hashmap. Save the hashmap in application context. In your JSP get the hashmap and get its key/values. See thread safe problems if you are using a hashmap in application context. -
How to monitor active sessions in a cluster
Hi all,
we currently test failover of our WLS 11g cluster.
How can I see in the Console to which managed server a client is connected?
Thank you in advance
Regards
Rolftoday i found a way to get the name of the server in a cluster which handles the active session, using a managed bean in my application.
There i added a getter method
public String getServerName() {
return System.getProperty("weblogic.Name");
and then I used an af:outputText with
#{<mybean>.serverName}
See this blog entry http://theblasfrompas.blogspot.com/2009/05/adf-failover-within-weblogic-103.html
Is there realy no way to get something like client-ip:<managed server> using WLS console?
I only found the number of requests (which is incrementing after reloading the console) in Deployments-> <application> -> Monitoring - Workload
Regards Rolf
Best Regards -
How to display active Session ?
hi,
i would like to implement for an administrative usage, a jsp page that list all active session. I notice in the J2EE api that there's a HttpSessionListener interfaces wich enables listener to receive notification when creating and deleting session. Is it a good way to implement this functionnality, thanks in advance for your help.
PS : i am sure, others persons have already implement a solution, perhaps there is a Design Pattern for that.Hi ,
Its really simple....
See the following code
public class SessionCounter implements HttpSessionListener {
int sessionCount = 0;
public void sessionCreated(HttpSessionEvent evt) {
sessionCount ++;
evt.getSession().setAttribute("Count", sessionCount);
public void sessionDestroyed(HttpSessionEvent evt) {
sessionCount --;
evt.getSession().setAttribute("Count", sessionCount);
now add this Listener to your web.xml
and you can get it anywhere (in jsp or servlet) using session.getAttribute("Count");
Is this you want.
Please let me know.
cheers
kuttus -
How to get active sessions in tomcat 5.0?
Hi,
As I am working on monitoring related requirement, I need to get no. Of active sessions,sessions created, etc.
I found interesting code in ManagerServlet, As it has some protected methods, I cant call it from its object, I need to create servlet for my work, So I even can't extend ManagerServlet, So I've created one POJO for that, But now I need to populte the context and many other objects,
Is there any other way out for this?,
I really appriciate any kind of help. :-)
-Jeffhi :-)
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html
or
http://www.google.com.ph/search?hl=en&q=java+servlet+tutorial&btnG=Google+Search&meta=
regards, -
How to know Active or open ports on a system
How to know he open ports on a system.
N e idea.
regards,
Rajesh Vincent.Using the Java Communications API you can use the static method CommPortIdentifier.getPortIdentifiers to enumerate the available ports on the system, like:
Enumeration ports = CommPortIdentifier.getPortIdentifiers();
while (ports.hasMoreElements()) {
CommPortIdentifier port = (CommPortIdentifier) ports.nextElement();
switch (port.getPortType()) {
case CommPortIdentifier.PORT_PARALLEL:
// it's a parallel port (called port.getName())
break;
case CommPortIdentifier.PORT_SERIAL:
// it's a serial port (called port.getName())
break;
default:
// WTF?
break;
}To know whether you can open the port I think you can use the isCurrentlyOwned() method. To open the port use the open(java.lang.String appname, int timeout) method (you'll get a PortInUseException if the port is already in use) -
How to know which session id has acquired an object ?
Hello,
We work on database 11.2.0.2 and aw 10G style.
concurrent users attach an aw in multi mode.
They make update on cubes and on dimensions.
They use the olap command Acquire before update changes.
When an object cannot be acquired, i would like to know which session lock this object.
best regards
jean marcThat's an interesting question. I'm surprised that nobody has asked it before. The following query will identify all sessions holding object locks:
select a.aw_name,o.obj_name objname, e.sid sess_id
from dba_aw_obj o, gv_$enqueue_lock e, dba_aws a
where
e.type='AO' and
o.aw_number=e.id1 and
a.aw_number = e.id1 and
bitand(o.obj_id, 1073741823) = e.id2;
Jim Carey
OLAP Development -
How to know whether entered date is SAPdate format or User dateformat.
Hi all,
I am uploading data from SAP to internal table ,
here I need to do below logic ,
If user entered SAP dateformat in excel , no need to convert after uploading.
elseIf user entered user default need to convert to SAP date format.
If user entered in other foramt.
need to give error.
so , how to know whether entered data is in SAP format or not.
Regards,
vineshTry this logic
IF call fm DATE_CHECK_PLAUSIBILITY = true
"date etered in SAP internal format
ELSE if call fm CONVERT_DATE_TO_INTERNAL = true
"date entered in user format
else.
"incorrect format
endif.
Regards
Marcin -
Hi,
I have a query that joins two tables in the same database, the result needs to be loaded in a destination DB table. How do I do this in SSIS package?
thank you !
Thank You Warmest Fanny PiedPlease take a look at these links related to your query.
http://stackoverflow.com/questions/5145637/querying-data-by-joining-two-tables-in-two-database-on-different-servers
http://stackoverflow.com/questions/7037228/joining-two-tables-together-in-one-database -
How to remove the selected owned schema in a database user in security
Hi all,
I am using SQL Server mgmt studio with 2005 db. I accidentally clicked the
owned schema while in a database user in security. When I went back to
remove the check boxes they were greyed out. How do I remove them?
Regards,
anjaligo to the schema > choose the schema which is disabled for the user > properperties > change the schema owner = schema name
I you want T-SQL then use below (change the greyed out schema name)
USE [DatabaseName]
GO
ALTER AUTHORIZATION ON SCHEMA::[db_owner] TO [db_owner]
GO
Balmukund Lakhani | Please mark solved if I've answered your question
This posting is provided "AS IS" with no warranties, and confers no rights.
My Blog: http://blogs.msdn.com/blakhani
Team Blog: http://blogs.msdn.com/sqlserverfaq
Maybe you are looking for
-
Currency convension based on calday
Hi i have one scenerio , I am getting Total Valuated Stock Value(ZSR_TVSTV) is equall to inventory on hand.(plant) from 5 global systems with deffirent curriencies. i need to convery source to target currenct to USD at transformations level, I have c
-
Htmldb_collection and db read
Is there a way to force sequential read over scattered read when using htmldb_collection.add_member? I have traced an issue with response time to the following section of my code: if length(dcg) > 1 then htmldb_collection.add_member(
-
Is there a way to have the use of what we used to call "Macros" which would be a key you could hit where you have installed a word, phrase, etc that you type repeatedly? By this I mean if, while on line, you repeatedly type out the phrase "Thank you
-
How do I open a video download I purchased from The Teaching Company in iTunes?
How do I open a download video from The Teaching Company in iTunes?
-
I'm trying to increate the ulimits for max user processes and open files for the oracle user. I've set the values in limits.conf, /etc/profile and in oracle's environment scripts. Now when I log in as oracle I get the below errors. If I change the u