How to find the logged-in username

Hello everyone,
My application needs to find the logged-in username from the
operating system, which in this case will always be Windows. This
would be the same as the USERNAME environment variable that can be
obtained from typing "set" from the command prompt. Anyone know how
this can be done? Many thanks, --Bob

Hi,
There's no direct API for this, but you can try:
var username:String = File.userDirectory.name;
(Refer
http://www.johncblandii.com/2008/09/air-tip-getting-logged-in-user.html))

Similar Messages

  • How to get the logged in username or how to set the acquiredby?

    We are using BPEL 10.1.2.0.2.
    We have implemented CAS/OID to work with the TaskList. Our issue is with obtaining the logged in username while in the BPEL Workflow. Acquired by variable is not populated even after the task is acquired. Explicitly setting Acquired By doesn't work either (still comes as null).
    This might be something quite simple, but I am not able to figure it out. Is there a way to get the logged in username or the user who acquired the task while in the BPEL workflow?
    Thank you!

    I have no longer access to the custom worklist application of 10.1.2 but in 10.1.3 you can access it through:
    SessionStore sessStore = SessionStore.getInstance(request.getSession(false));
    String userName = ((IWorkflowContext) sessStore.get(WorklistappConstants.SESS_ATTR_WORKFLOW_CONTEXT)).getUser();Kind Regards,
    Andre

  • How to know the logged in username in BLS?

    Hi MIIers
    i know i can use this session variable( ) in HTML to get the logged in user name.
    But how to get the logged in user name in BLS? Is it the same way ?
    ( I might be duplicate  post but we have to bare with it..search results didn't get me proper answer ..)
    Thanks
    Hari

    Hari,
    Use it as a transaction property and enable the autobind property of XacuteConnector.
    Regards,
    Ajay.

  • HOW TO FIND THE LOG FILES RELATED TO SAP XI

    Hi Experts,
                    I want some information on finding the log files in SAP XI. When the XI picks the file from Source system and a series of process undergoes and finally delivered to the receiver system. I need the log files related to all process since the start of the scenario and untill the end of the scenario.
    Thanks in Advance,
    Sunil  K Shetty

    HI,
    Please see belo links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8314cb90-0201-0010-f586-9155dba8934d
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/402fae48-0601-0010-3088-85c46a236f50#search=%22xi%20archiving%22
    http://help.sap.com/saphelp_nw04/helpdata/en/aa/fce73a86e99c77e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/15/01df3a1fd91974e10000000a11402f/content.htm
    Regards
    Chilla..

  • How to find the log file on server

    Hi All,
    Here we have installed J2EE Engine & JDI on seperate machine.We have developed a new FPM application. The application is not working it is giving the error when run the application. It is giving the error "500 Internal Server Error Failed to process request. Please contact your system administrator". We want to see the log file what the error is, where can we find the log file.
    Regards
    Suresh

    Hi
    See this thread
    /message/1656215#1656215 [original link is broken]
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/e2/75a74046033913e10000000a155106/frameset.htm">Logging</a>
    See this blogs
    <a href="/people/karsten.geiseler/blog/2005/06/06/netweaver-portal-log-configuration-viewing-part-1 Portal Log Configuration & Viewing (Part 1)</a>
    Kind Regards
    Mukesh

  • How to find the log file

    Hi,
    I am using include directive for including a jsp and i am able to trace the errors in a log file(say mod_servj) but when i use action directive i am unable to find the errors.Can anyone please help me out.

    Try to check in the following location
    /u02/soasitap/sitap/FMW_HOME/user_projects/domains/sit_domain/servers/
    AdminServer/logs/AdminServer.log
    The same way you can check the log file for the SOA server also.
    Mark the posting appropriately as "helpful" or "correct answer", if your issue is solved.
    Regards
    Albin I
    [http://www.albinsblog.com/]

  • How to find the objectslist with username, who create all the Objects in List?

    I have the username and how can I get the objects, which are created by the User.
    Thanks

    Hi,
    Below is one approach.
    E070 table --> AS4USER = Usename --> Get the TR/Task Numbers -->
    E071 table --> TRKORR = TR/Task Number from E070 --> All objects under TR will be fetched.
    Regards
    Gangadhar

  • How to find the log of removing a job

    If a job is removed, how can a DBA know who did it and from which client station? I have looked into the online log, but found no evidence.
    Message was edited by:
    bluebird

    help ,help ,thank

  • C# - How do I read the logged-in username?

    Hi,
    I am looking for a way, to retrieve the logged-in username.
    Just like:
    User.Identity.Name;
    The Windows username and Novell username are not always the same, so I can't use this method.
    Regards,
    Kim Bang

    You want to "read the Novell username", but the problem is that one PC can
    be logged in with multiple identities to multiple trees/servers
    I suggest to take a look at the linked articles to understand the
    architecture, and deicide on your approach;
    then if you have eDirectory specific questions post in this forum
    http://forums.novell.com/novell-prod.../edir-windows/
    if you decide to go for ActiveX you'll find the Novell ActiveX controls are
    deprecated (the forum may be closed, but still can be searched for info),
    but may still be helpful:
    http://www.novell.com/developer/ndk/...supported.html.
    The NWSess control would get you what you need.
    Wolfgang
    "kimbang" wrote in message news:[email protected]..
    Thank you for your reply.
    The idea is, that my webapp (ASP.NET) can read the Novell username on
    the client pc (Windows XP).
    Just like you can read the Windows username. The webserver (IIS) is
    running locally on the network, that is also why the Windows username
    works, because that wouldn't be the case with a remote webserver.
    Wether or not I'm in the right forum I do not know. I was requested to
    find out, how to do the above, and I am not really that much in to
    Novell unfortunatly.
    But if i am in a wrong category, I would very much like to know which
    is the rigth one for this questing.
    kimbang
    kimbang's Profile: http://forums.novell.com/member.php?userid=102779
    View this thread: http://forums.novell.com/showthread.php?t=430307

  • How to find the maximum no of users logged in Database

    Hi All,
    How to find the maximum number of users logged in database at particular time? I can find currently logged users or umber of sessions running on Database but I wanted to find at what time maximum number of users or sessions connected to the DB? is that possible? if yes please help me. thanks.

    Vijay wrote:
    Hi All,
    How to find the maximum number of users logged in database at particular time? I can find currently logged users or umber of sessions running on Database but I wanted to find at what time maximum number of users or sessions connected to the DB? is that possible? if yes please help me. thanks.
    select * from v$resource_limit;Lists about 20 different resources with current, maximum and limit on usage. Session count is one of them. I don't think there's any (simple, efficient) way to determine the maximum number of different users of sessions, though.
    Regards
    Jonathan Lewis

  • How to find the deleted transport req logs.

    Hello gurus,
    in my DEV box some body was deleted the transport request.
    i need to know that by whom that request was deleted. the thing is that request was not released  and not imported into any system. that request was deleted after the creation.
    but now i am confused how to check the logs. i have searched the log file in trans directory and also SLOG,ALOG.
    i guess there is no use of import history in STMS because that request not existed in the system?
    then how can i find the deleted person. and time.
    Could you please do let me know.
    help would be heighly appreciated.
    Regards,
    srini.

    hi!
    Are you sure that the transport request was deleted?
    Perhaps Transport request is a local transport and when you release the transport it will not create the export files.
    FF

  • How to find the configuration status of REDO logs files?

    I am in the process of moving the redo log files.
    Before that I want to find out whether it is set up as duplex or any other configurations.
    How to find the REDO log configurations.
    Oracle 10g R2
    Thank you,
    Smith

    Example:
    Not duplexed redo log - if number of member is 1, then it is not duplexed:
    SQL> select group#, members from v$log;
        GROUP#    MEMBERS
             1          1
             2          1
             3          1
    SQL> select group#, member from v$logfile;
        GROUP# MEMBER
             1 /u01/app/oracle/oradata/db1/redo01.log
             2 /u01/app/oracle/oradata/db1/redo02.log
             3 /u01/app/oracle/oradata/db1/redo03.log
    SQL> alter database add logfile member '/u01/app/oracle/oradata/db1/redo01_2.log' to group 1;
    Database altered.
    SQL> alter database add logfile member '/u01/app/oracle/oradata/db1/redo02_2.log' to group 2;
    Database altered.
    SQL> alter database add logfile member '/u01/app/oracle/oradata/db1/redo03_2.log' to group 3;
    Database altered.Duplexed redolog
    SQL> select group#, members from v$log;
        GROUP#    MEMBERS
             1          2
             2          2
             3          2
    SQL> select group#, member from v$logfile;
        GROUP# MEMBER
             1 /u01/app/oracle/oradata/db1/redo01.log
             2 /u01/app/oracle/oradata/db1/redo02.log
             3 /u01/app/oracle/oradata/db1/redo03.log
             1 /u01/app/oracle/oradata/db1/redo01_2.log
             2 /u01/app/oracle/oradata/db1/redo02_2.log
             3 /u01/app/oracle/oradata/db1/redo03_2.log

  • How to find the number of ODBC connections to Oracle Database

    Hi All,
    How to find the number of ODBC connections and all connections to the Database in last week. Are there any views to get this information?
    Thanks in advance,
    Mahi

    What Ed said is true that Oracle doesn't note which type of protocol is connecting to the database, however, you can see which program is accessing the database.
    For example: if you already know of a user using ODBC, you can verify as:
    select username, osuser, terminal, program from v$session where username = 'SCOTT'
    USERNAME                 OSUSER          TERMINAL   PROGRAM
    SCOTT                    IUSR_SRV231     SRV231     w3wp.exe
    SCOTT                    IUSR_SRV231     SRV231     w3wp.exe
    2 rows selected.Assuming that you can confirm the progam noted in the above (example) is the one using ODBC, then you can change the query such as:
    SQL> select username, osuser, terminal, program from v$session where program = 'w3wp.exe';
    USERNAME                 OSUSER          TERMINAL   PROGRAM
    SCOTT                    IUSR_SRV231     SRV231     w3wp.exe
    SCOTT                    IUSR_SRV231     SRV231     w3wp.exe
    2 rows selected.Just for kicks, I checked our listener.log file, but there was no reference of odbc in it either.
    Hope this helps...

  • How to find the level of each child table in a relational model?

    Earthlings,
    I need your help and I know that, 'yes, we can change'. Change this thread to a answered question.
    So: How to find the level of each child table in a relational model?
    I have a relacional database (9.2), all right?!
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"Tips:
    - each circle represents a table;
    - red tables no have foreign key
    - the table in first line of tree, for example, has level 3, but when 3 becomes N? How much is N? This's the question.
    I started thinking about the following:
    First I have to know how to take the children:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
    using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
    using (owner)
    where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;Thinking...
    Let's Share!
    My thanks in advance,
    Philips
    Edited by: BluShadow on 01-Apr-2011 15:08
    formatted the code and the hierarchy for readbility

    Justin,
    Understood.
    Nocycle not work in 9.2 and, even that would work, would not be appropriate.
    With your help, I decided a much simpler way (but there is still a small problem, <font color=red>IN RED</font>):
    -- 1
    declare
      type udt_roles is table of varchar2(30) index by pls_integer;
      cRoles udt_roles;
    begin
      execute immediate 'create user philips
        identified by philips';
      select granted_role bulk collect
        into cRoles
        from user_role_privs
       where username = user;
      for i in cRoles.first .. cRoles.count loop
        execute immediate 'grant ' || cRoles(i) || ' to philips';
      end loop;
    end;
    -- 2
    create table philips.root1(root1_id number,
                               constraint root1_id_pk primary key(root1_id)
                               enable);
    grant all on philips.root1 to philips;
    create or replace trigger philips.tgr_root1
       before delete or insert or update on philips.root1
       begin
         null;
       end;
    create table philips.root2(root2_id number,
                               constraint root2_id_pk primary key(root2_id)
                               enable);
    grant all on philips.root2 to philips;
    create or replace trigger philips.tgr_root2
       before delete or insert or update on philips.root2
       begin
         null;
       end;
    create table philips.node1(node1_id number,
                               root1_id number,
                               node2_id number,
                               node4_id number,
                               constraint node1_id_pk primary key(node1_id)
                               enable,
                               constraint n1_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n1_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable,
                               constraint n1_n4_id_fk foreign key(node4_id)
                               references philips.node4(node4_id) enable);
    grant all on philips.node1 to philips;
    create or replace trigger philips.tgr_node1
       before delete or insert or update on philips.node1
       begin
         null;
       end;
    create table philips.node2(node2_id number,
                               root1_id number,
                               node3_id number,
                               constraint node2_id_pk primary key(node2_id)
                               enable,
                               constraint n2_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n2_n3_id_fk foreign key(node3_id)
                               references philips.node3(node3_id) enable);
    grant all on philips.node2 to philips;
    create or replace trigger philips.tgr_node2
       before delete or insert or update on philips.node2
       begin
         null;
       end;                          
    create table philips.node3(node3_id number,
                               root2_id number,
                               constraint node3_id_pk primary key(node3_id)
                               enable,
                               constraint n3_r2_id_fk foreign key(root2_id)
                               references philips.root2(root2_id) enable);
    grant all on philips.node3 to philips;
    create or replace trigger philips.tgr_node3
       before delete or insert or update on philips.node3
       begin
         null;
       end;                          
    create table philips.node4(node4_id number,
                               node2_id number,
                               constraint node4_id_pk primary key(node4_id)
                               enable,
                               constraint n4_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable);
    grant all on philips.node4 to philips;
    create or replace trigger philips.tgr_node4
       before delete or insert or update on philips.node4
       begin
         null;
       end;                          
    -- out of the relational model
    create table philips.node5(node5_id number,
                               constraint node5_id_pk primary key(node5_id)
                               enable);
    grant all on philips.node5 to philips;
    create or replace trigger philips.tgr_node5
       before delete or insert or update on philips.node5
       begin
         null;
       end;
    -- 3
    create table philips.dictionary(table_name varchar2(30));
    insert into philips.dictionary values ('ROOT1');
    insert into philips.dictionary values ('ROOT2');
    insert into philips.dictionary values ('NODE1');
    insert into philips.dictionary values ('NODE2');
    insert into philips.dictionary values ('NODE3');
    insert into philips.dictionary values ('NODE4');
    insert into philips.dictionary values ('NODE5');
    --4
    create or replace package body philips.pck_restore_philips as
      procedure sp_select_tables is
        aExportTablesPhilips     utl_file.file_type := null; -- file to write DDL of tables   
        aExportReferencesPhilips utl_file.file_type := null; -- file to write DDL of references
        aExportIndexesPhilips    utl_file.file_type := null; -- file to write DDL of indexes
        aExportGrantsPhilips     utl_file.file_type := null; -- file to write DDL of grants
        aExportTriggersPhilips   utl_file.file_type := null; -- file to write DDL of triggers
        sDirectory               varchar2(100) := '/app/oracle/admin/tace/utlfile'; -- directory \\bmduhom01or02 
        cTables                  udt_tables; -- collection to store table names for the relational depth
      begin
        -- omits all referential constraints:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'REF_CONSTRAINTS', false);
        -- omits segment attributes (physical attributes, storage attributes, tablespace, logging):
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false);
        -- append a SQL terminator (; or /) to each DDL statement:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', true);
        -- create/open files for export DDL:
        aExportTablesPhilips := utl_file.fopen(sDirectory, 'DDLTablesPhilips.pdc', 'w', 32767);
        aExportReferencesPhilips := utl_file.fopen(sDirectory, 'DDLReferencesPhilips.pdc', 'w', 32767);
        aExportIndexesPhilips := utl_file.fopen(sDirectory, 'DDLIndexesPhilips.pdc', 'w', 32767);
        aExportGrantsPhilips := utl_file.fopen(sDirectory, 'DDLGrantsPhilips.pdc', 'w', 32767);
        aExportTriggersPhilips := utl_file.fopen(sDirectory, 'DDLTriggersPhilips.pdc', 'w', 32767);
        select d.table_name bulk collect
          into cTables -- collection with the names of tables in the schema philips
          from all_tables t, philips.dictionary d
         where owner = 'PHILIPS'
           and t.table_name = d.table_name;
        -- execution
        sp_seeks_ddl(aExportTablesPhilips,
                     aExportReferencesPhilips,
                     aExportIndexesPhilips,
                     aExportGrantsPhilips,
                     aExportTriggersPhilips,
                     cTables);
        -- closes all files
        utl_file.fclose_all;
      end sp_select_tables;
      procedure sp_seeks_ddl(aExportTablesPhilips     in utl_file.file_type,
                             aExportReferencesPhilips in utl_file.file_type,
                             aExportIndexesPhilips    in utl_file.file_type,
                             aExportGrantsPhilips     in utl_file.file_type,
                             aExportTriggersPhilips   in utl_file.file_type,
                             cTables                  in out nocopy udt_tables) is
        cDDL       clob := null; -- colletion to save DDL
        plIndex    pls_integer := null;
        sTableName varchar(30) := null;
      begin
        for i in cTables.first .. cTables.count loop
          plIndex    := i;
          sTableName := cTables(plIndex);
           * Retrieves the DDL and the dependent DDL into cDDL clob       *      
          * for the selected table in the collection, and writes to file.*
          begin
            cDDL := dbms_metadata.get_ddl('TABLE', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTablesPHILIPS, cDDL);
          exception
            when dbms_metadata.object_not_found then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('REF_CONSTRAINT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportReferencesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('INDEX', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportIndexesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('OBJECT_GRANT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportGrantsPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('TRIGGER', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTriggersPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
        end loop;
      end sp_seeks_ddl;
      procedure sp_writes_ddl(aExport in utl_file.file_type,
                              cDDL    in out nocopy clob) is
        pLengthDDL  pls_integer := length(cDDL);
        plQuotient  pls_integer := null;
        plRemainder pls_integer := null;
      begin
          * Register variables to control the amount of lines needed   *
         * for each DDL and the remaining characters to the last row. *
        select trunc(pLengthDDL / 32766), mod(pLengthDDL, 32766)
          into plQuotient, plRemainder
          from dual;
          * Join DDL in the export file.                            *
         * ps. 32766 characters + 1 character for each line break. *
        -- if the size of the DDL is greater than or equal to limit the line ...
        if plQuotient >= 1 then
          -- loops for substring (lines of 32766 characters + 1 break character):
          for i in 1 .. plQuotient loop
            utl_file.put_line(aExport, substr(cDDL, 1, 32766));
            -- removes the last line, of clob, recorded in the buffer:
            cDDL := substr(cDDL, 32767, length(cDDL) - 32766);
          end loop;
        end if;
          * If any remains or the number of characters is less than the threshold (quotient = 0), *
         * no need to substring.                                                                 *
        if plRemainder > 0 then
          utl_file.put_line(aExport, cDDL);
        end if;
        -- record DDL buffered in the export file:
        utl_file.fflush(aExport);
      end sp_writes_ddl;
    begin
      -- executes main procedure:
      sp_select_tables;
    end pck_restore_philips;<font color="red">The problem is that I still have ...
    When creating the primary key index is created and this is repeated in the file indexes.
    How to avoid?</font>

  • How to find the sessions which generated maximum redo amount at instance?

    I use below query or Sql*Plus's set autotrace traceonly statistics > redo size statistic to calculate how much redo I generated in my session;
    CREATE OR REPLACE VIEW redo_size AS
    SELECT value
    FROM v$mystat, v$statname
    WHERE v$mystat.statistic# = v$statname.statistic#
    AND v$statname.name = ‘redo size’;
    But how to find the sessions which generated maximum(top 5 for example) redo from the last database startup on 9iR2 or also with new 10gR2 historic views?
    We need this information because from the produced archived log files we observe something new producing almost 2 times more redo for a week. I looked at statspack report but couldnt find as I suspected for a massive update or delete.
    Best regards,
    Tonguc

    I tried v$sysstat but I didnt think about v$sesstat Mr.Gasparotto, thank you very much :)
    SELECT ss.sid,
    sq.sql_text,
    se.status,
    se.username,
    se.osuser,
    se.program,
    se.machine,
    ss.VALUE
    FROM v$sesstat ss, v$statname sn, v$session se, v$sqlarea sq
    WHERE ss.statistic# = sn.statistic#
    AND se.sql_hash_value = sq.hash_value(+)
    AND se.sql_address = sq.address(+)
    AND ss.sid = se.sid
    AND sn.NAME = 'redo size'
    ORDER BY ss.VALUE DESC
    Best regards.

Maybe you are looking for

  • Adobe Acrobat 9 no more updates?

    My company has about 50 licenses of Adobe Acrobat 9 (updated to 9.5.5). For a while updates were fast and furious. I checked their website today and saw that V 9.5.5 was "Latest and FINAL release. This patch fixes specific security issues." Does this

  • Problem in diplaying the output in ALVLIST

    Hi all, iam having problem in ALVLIST display. My requirement is to display the output in the following format in ALVLIST, <b>field1  field2  field3 </b> DRP      200      DRP      200                       400   SubTotal per DRP DRE      300 DRE    

  • My list of artists not on my Iphone 4s and Ipad

    Hello there,I would like to find my list of artists on my Iphone 4s and my Ipad as it is on my Macbook but I cannot. I have Spotify Premium and I thought I could find the same lists when I sign in but it is not. How can I do, can you help me Please?

  • Formula on date....plz help

    Hi All, I have a reporting requirement in which i have to do compariosn between different dates. Mutliptovider contains following fields Contract (char) Move In date (char DATS) Move Out date (char DATS) Consumption(key fihure) Status(need to calcula

  • My apps won't reinstall after I updated to ios7, and they say "waiting" and won't download

    I updated last night and the main apps I use are still in the "waiting" phase