Query to get the windows-user(os)

Hallo,
I have a windows operating system and on this system is oracle database with the
spatial-option installed. Now I wanna create a trigger which writes in a table if
a geometry is updated. In this table I wanna write the new geometry, the time of
the update and the windows-user that logged on the windows operating system. I
don't wanna know the database user.
What is the sql-query to get the windows-user?
Thanks Katrin

As an alternative, use the SYS_CONTEXT function to get some of this info.
oracle@fuzzy:~> sqlplus test/test@XE
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 2 16:32:53 2007
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> select sys_context('USERENV', 'HOST') Host,
  2         sys_context('USERENV', 'IP_ADDRESS') IP,
  3         sys_context('USERENV', 'OS_USER') OS_User,
  4         sys_context('USERENV', 'AUTHENTICATED_IDENTITY') Identity
  5    from dual;
HOST    IP          OS_USER   IDENTITY
fuzzy    127.0.0.2  oracle    test
SQL>                                           More info at http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm#i1038176

Similar Messages

  • How can I get the Windows User using ABAP ?

    I need to get thru ABAP the Windows user.

    Hi Carlos,
    You can use the following FM to read the currently logged in windows user id:
    DATA: w_userid TYPE char20.
    CALL FUNCTION 'GUI_GET_DESKTOP_INFO'
         EXPORTING
              type   = '5'
         CHANGING
              return = w_userid.
    WRITE: 'Windows User ID:', w_userid.
    Hope this is what you need.
    Sumant.

  • Query to get the user profile

    Hello
    I would like to know the query to get the complete user profile, for example the user password, all the privileges it has, etc
    Thank you

    Go to tahiti.oracle.com
    Drill down to your selected product and version
    There, find the complete documentation set
    There, find the find Reference Manual
    There, find a complete description of all the data dictionary view.
    Browse through the names of those view for something that looks like a likely candidate (thing with "user" or "priv" in the name)
    Edited by: EdStevens on Oct 23, 2009 8:20 PM

  • Getting the NT user name (Windows user name)

    Hello,
    I am trying to get the windows user name in ABAP program but
    I can not find any useful function.
    Thanks in advance,
    Eitan Iluzz.

    you can use the following code to get the windows logged on user
    data: username type string .
    CALL METHOD cl_gui_frontend_services=>get_user_name
      CHANGING
        user_name            = username
      EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 3
        others               = 4 .
        CALL METHOD cl_gui_cfw=>flush
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2
            others            = 3 .

  • Trouble getting the default  user directory under Windows XP

    I m trying to get the default user directory under windows XP SP3.
    To do so, I'm using
    System.getProperty("user.home");
    I was expecting to get a path like "C:\Documents and Settings\user", nstead of that I get "C:\Documents and Settings\user\Destop".
    I checked the %USERPROFILE% and %HOMEPATH% window's environment variables and both of them are correctly set ( set to "C:\Documents and Settings\user").
    Is there any way to get the right path other than using : System.setProperty("user.home", "C:\\Documents and Settings\\user"); ?

    Thanks WalterLaan,
    The System.getenv("USERPROFILE") method will, at least, fix the problem under win XP.
    I guess i'll have to write a more refined method to be able to deploy my application under differents OSes.
    Regards.

  • Ldap query to get the users of a OU

    Hi,
    I want to get the available users into a OU and the query I'm using is like this:
    (OU=Departamento Informatica,DC=mydomain,DC=com)
    There is a user into this OU so when I do the LDAP test query the user shuld be returned but the result is 0.
    Can anybody help me or tell me which must be the correct query?
    Thanks in advance.
    Regards.

    This can be done either by dsquery or Powershell commands (Like
    Get-ADUser).
    For dsquery, I would recommend that you refer to this Wiki article initiated by Richard for more details about LDAP filtering: 
    http://social.technet.microsoft.com/wiki/contents/articles/5392.active-directory-ldap-syntax-filters-en-us.aspx
    dsquery * "OU=TargetOU,DC=CONTOSO,DC=COM" -filter "(&(objectcategory=person)(objectclass=user))"
    For Get-ADUser, all you need is to specify your OU as the search base:
    Get-ADUser -SearchBase "OU=TargetOU,DC=CONTOSO,DC=COM" -Filter *
    This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
    Get Active Directory User Last Logon
    Create an Active Directory test domain similar to the production one
    Management of test accounts in an Active Directory production domain - Part I
    Management of test accounts in an Active Directory production domain - Part II
    Management of test accounts in an Active Directory production domain - Part III
    Reset Active Directory user password

  • Query to get the Discoverer privileges granted to user / responsibility

    Hello,
    I am discussing the oracle applications EUL here.
    I am interested to know the privileges granted to a user / responsibility from backend or any option with "eulapi" utility which can be used to list the same.
    Which EUL table should I query to get the privileges granted to a user / responsinility?
    Thanks,
    Ajay

    Hi Ajay,
    Which EUL table should I query to get the privileges granted to a user / responsinility?Go through this link you wil get what your looking for.
    Re: List of Users in Admin layer under Privileges
    Hope this helps you.
    Best Wishes,
    Kranthi.

  • How to get the SSO user from PL/SQL with Windows native authen

    I connect to a 10g daabase using SSO through Windows Native Authentication wher the OID user mapps to a single Database user.
    I need to get the SSO user from pl/sql
    My fornt end is Portal & Forms

    Hmm, I see.
    Well your problem boils down to being in the database and needing to have access to web environment variables. The SSO sets specific variables in the environment but your stored procedure is not privy to them.
    Now having said that, note that the mod_plsql Web Toolkit has a utility for accessing cgi variables. For instance,
    owa_util.get_cgi_env('Osso-User-Dn')
    If your web application cannot capture the SSO info and pass it to the stored proc in a parameter, OWA may be the only way.
    Check out the Single Sign-On Developers Guide, specifically the part about developing statically protected PLSQL applications.
    Hope this helps.
    regards,
    tt

  • Which view I can query to get the granted objects privilege to a user?

    Hi all,
    which view I can query to get the granted objects privilege to a user?
    for example:
    grant execute on accounting.get_name to scott;
    Which view has above object granted information?
    Thanks

    SQL> select * FROM all_tab_privs where grantor = upper('accounting');
    no rows selected

  • Web Application getting the Windows NT User ID

    Is there a way within the web Oracle application to get the Windows NT User ID of the client running the application?
    Thanks in advance.

    For 6i, there is a bean example that works
    out of the box for that purpose.
    The only thing you have to keep in mind is
    that using Jinitiator, you have to create
    an identity and populate it with the provided
    certificate ON EVERY CLIENT MACHINE.
    Using IE5 native VM, there is no need for that, provided that you can live with granting some privileges to unsigned java code. (Signing is kinda tricky, I failed anyway...)
    If you are running 6.0, I posted an example
    (for the client hostname) that works under 6.0 a couple weeks back ("Getting Client Info"), an it can easily be modified to return the NT userid.
    Regards
    Anton

  • How to get the current user name of the host who is occupying a specific VM?

    I'm developing a winform app with c# code to manage Hyper-V. I need to remind someone if he/she would take a VM which has already been occupied by others.
    Is there any powershell cmd or WMI interface to get the current user of a specific VM?
    Thanks!

    Hiya,
    from cmd there are quser(Query user) and qwinsta(Query Session)
    which should give you that. Don't know how you can incoorperate that in C#, but that should give you something to work with :)
    https://technet.microsoft.com/en-us/library/cc785434.aspx
    https://technet.microsoft.com/en-us/library/cc788125.aspx

  • How can I get the current user and the current page?

    Hi everyone
    Question..
    It is possible to get the current user (from the user's database on apex) and the current page? (I mean, if I'm in page 4 be able to query a variable / function or something which could give me the current displayed page)
    Thank you very much... I'd been researching without success :-S so I'll appreciate your help
    Regards,
    Fury

    Fury,
    If the user has authenticated, :APP_USER is the name that was used. The current page id is in :APP_PAGE_ID.
    Although I showed bind variable notation for those, & substitution format and v() notation are also available for referencing developer-defined items or built-in names. See the User's Guide for more details.
    Scott

  • Query to get the hierarchical results

    Hi,
    Please help me in writing a Query to get the hierarchical results. I want a result like follows...
    course-----groupname---TotalMembers---NotStarted---INProgress---Completed
    Course1---country1--------12---------------6----------3-------------3
    Course1-----state11-------12---------------6----------3-------------3
    Course1------District111--10---------------5----------0-------------0
    Course1--------City1111----0---------------0----------0-------------0
    Course1--------City1112----1---------------0----------0-------------1
    Course1--------City1113----6---------------3----------2-------------1
    Course1---country2--------12---------------6----------3-------------3
    Course1----state21--------12---------------6----------3-------------3
    Course1------District211--10---------------5----------0-------------0
    Course1--------City2111----0---------------0----------0-------------0
    Course1--------City2112----1---------------0----------0-------------1
    Course1--------City2113----6---------------3----------2-------------1
    Course2---country1--------12---------------6----------2-------------3
    Course2----state11--------12---------------6----------2-------------3
    Course2------District111--10---------------5----------0-------------0
    Course2--------City1111----0---------------0----------0-------------0
    Course2--------City1112----1---------------0----------0-------------1
    Course2--------City1113----6---------------3----------1-------------2
    Course2---country2--------12---------------6----------3-------------3
    Course2-----state21-------12---------------6----------3-------------3
    Course2------District211--10---------------5----------0-------------0
    Course2--------City2111----0---------------0----------0-------------0
    Course2--------City2112----1---------------0----------0-------------1
    Course2--------City2113----6---------------3----------2-------------1
    These are the Tables available to me.
    (I have just given some examle data in tables, to get the idea)
    "Groups" Table (This table gives the information of the group)
    GROUPID-----NAME-------PARENTID
    1---------Universe--------1
    2---------country1--------1
    3---------state11---------2
    4---------District111-----3
    5---------City1111--------4
    6---------City1112--------4
    7---------City1113--------4
    8---------country2--------1
    9---------state21---------8
    10--------District211-----9
    11--------City2111--------10
    12--------City2112--------10
    13--------City2113--------10
    "Users" Table (This table provides the user information)
    userID----FIRSTNAME---LASTNAME
    user1-----------Jim-------Carry
    user2-----------Tom-------lee
    user3-----------sunny-----boo
    user4-----------mary------mall
    "User-Group" Tables (This table provides the relation between the groups
    and the members)
    GROUPID---userID
    3-------------user1
    3-------------user2
    3-------------user4
    4-------------user5
    5-------------user6
    5-------------user7
    user_score (This table provides the user scores of different courses)
    USERID----course-----STATUS
    user1------course1-----complete
    user1------course2-----NotStarted
    user2------course1-----NotStarted
    user2------course2-----complete
    user3------course1-----complete
    user3------course2-----InProgress
    user4------course2-----complete
    user4------course1-----NotStarted
    I will explain the first four lines of the above result.
    Course1---country1--------12---------------6----------4-------------2
    Course1-----state11-------12---------------6----------4-------------2
    Course1------District111--10---------------5----------3-------------2
    Course1--------City1111----0---------------0----------0-------------0
    Course1--------City1112----1---------------0----------0-------------1
    Course1--------City1113----6---------------3----------2-------------1
    # "city1111" group has 0 members
    # "city1112" group has 1 member (1 member completed the course1)
    # "city1113" group has 6 members(3 members notStarted,2 members
    InProgress,1 member completed the course1)
    # "District111" is the parent group of above three groups, and has 3
    members.(2 members NotStarted,1 member InProgress the course1). But this
    group has child groups, so the scores of this group has to rollup the
    child groups scores also. Thats why it has 2+3+0+0=6 members Not
    Started,1+2+0+0=3 members InProgress,0+0+1+1=2 members completed.
    # "state11" group also same as the above group.
    I am able to get the group hierarchy by using "Connect By" like follows
    "select name,groupid,parentid from groups_info start with groupid=1 connect by parentid = prior groupid;"
    But i want to get the result as i have mentioned in the begining of this discussion.
    I am using oracle 8i (oracle8.1.7).
    Thank you for any help
    Srinivas M

    This may not be exactly what you want,
    but it should be fairly close:
    SET      LINESIZE 100
    SET      PAGESIZE 24
    COLUMN   groupname FORMAT A20
    SELECT   INITCAP (user_score.course) "course",
             groupnames.name "groupname",
             COUNT (*) "TotalMembers",
             SUM (NVL (DECODE (UPPER (user_score.status), 'NOTSTARTED', 1), 0)) "NotStarted",
             SUM (NVL (DECODE (UPPER (user_score.status), 'INPROGRESS', 1), 0)) "InProgress",
             SUM (NVL (DECODE (UPPER (user_score.status), 'COMPLETE', 1), 0)) "Completed"
    FROM     user_score,
             user_group,
             (SELECT ROWNUM rn,
                     name,
                     groupid
              FROM   (SELECT     LPAD (' ', 2 * LEVEL - 2) || name AS name,
                                 groupid
                      FROM       groups
                      START WITH groupid = 1
                      CONNECT BY PRIOR groupid = parentid)) groupnames
    WHERE    user_score.userid = user_group.userid
    AND      user_group.groupid IN
             (SELECT     groupid
              FROM       groups
              START WITH groupid = groupnames.groupid
              CONNECT BY PRIOR groupid = parentid)
    GROUP BY user_score.course, groupnames.name, groupnames.rn
    ORDER BY user_score.course, groupnames.rn
    I entered the minimal test data that you
    provided and a bit more and got this result
    (It was formatted as you requested,
    but I don't know if it will display properly
    on this post, or wrap around):
    course  groupname            TotalMembers NotStarted InProgress  Completed
    Course1 Universe                        6          2          0          4
    Course1   country1                      5          2          0          3
    Course1     state11                     5          2          0          3
    Course1       District111               2          0          0          2
    Course1         City1112                1          0          0          1
    Course1         City1113                1          0          0          1
    Course1   country2                      1          0          0          1
    Course1     state21                     1          0          0          1
    Course1       District211               1          0          0          1
    Course1         City2113                1          0          0          1
    Course2 Universe                        5          1          1          3
    Course2   country1                      4          1          1          2
    Course2     state11                     4          1          1          2
    Course2       District111               1          0          1          0
    Course2         City1113                1          0          1          0
    Course2   country2                      1          0          0          1
    Course2     state21                     1          0          0          1
    Course2       District211               1          0          0          1
    Course2         City2113                1          0          0          1
    Here is the test data that I used, in case
    anyone else wants to play with it:
    create table groups
      (groupid  number,
       name     varchar2(15),
       parentid number)
    insert into groups
    values (1,'Universe',null)
    insert into groups
    values (2,'country1',1)
    insert into groups
    values (3,'state11',2)
    insert into groups
    values (4,'District111',3)
    insert into groups
    values (5,'City1111',4)
    insert into groups
    values (6,'City1112',4)
    insert into groups
    values (7,'City1113',4)
    insert into groups
    values (8,'country2',1)
    insert into groups
    values (9,'state21',8)
    insert into groups
    values (10,'District211',9)
    insert into groups
    values (11,'City2111',10)
    insert into groups
    values (12,'City2112',10)
    insert into groups
    values (13,'City2113',10)
    create table user_group
      (groupid number,
       userid  varchar2(5))
    insert into user_group
    values (3,'user1')
    insert into user_group
    values (3,'user2')
    insert into user_group
    values (3,'user4')
    insert into user_group
    values (4,'user5')
    insert into user_group
    values (5,'user6')
    insert into user_group
    values (5,'user7')
    insert into user_group
    values (7,'user8')
    insert into user_group
    values (13,'user9')
    insert into user_group
    values (11,'use11')
    insert into user_group
    values (6,'use6')
    create table user_score
      (userid varchar2(5),
       course varchar2(7),
       status varchar2(10))
    insert into user_score
    values ('use6','course1','complete')
    insert into user_score
    values ('user9','course1','complete')
    insert into user_score
    values ('user9','course2','complete')
    insert into user_score
    values ('user8','course1','complete')
    insert into user_score
    values ('user8','course2','InProgress')
    insert into user_score
    values ('user1','course1','complete')
    insert into user_score
    values ('user1','course2','NotStarted')
    insert into user_score
    values ('user2','course1','NotStarted')
    insert into user_score
    values ('user2','course2','complete')
    insert into user_score
    values ('user3','course1','complete')
    insert into user_score
    values ('user3','course2','InProgress')
    insert into user_score
    values ('user4','course2','complete')
    insert into user_score
    values ('user4','course1','NotStarted')

  • SQL query to get the list of approvals

    Hi,
    Could someone let me know the SQL query to get the list of all the pending approvals for a user in OIM 11g R2.
    Thanks

    There are a few ways to do this:
    -  The easiest would be to use a Relationship Query from the CMC. To do this, go to the Universes section on the CMC, right click on the relevant universe, select tools >> Check Relationships.
    - Use Query Builder. You will need more than one query to pull the information you need. You could try something like the below (for Webi)
    SELECT SI_NAME, SI_WEBI, SI_DATACONNECTION FROM CI_APPOBJECTS
    WHERE SI_KIND = 'universe' and SI_NAME = 'Universe Name'
    This will give you a list of Webi Reports by SI_ID.
    You'll need another query to list Webi report names:
    SELECT SI_NAME FROM CI_INFOOBJECTS WHERE SI_ID IN (SI_ID from query above)
    - This is trivial via Auditing / the Activity universe. This of course will only return reports that have already run.
    Best.
    Srinivas

  • Spatial Query to get the coodinates only

    Hi,
    I define an attribute called "geometry" in TILE table.
    For normal query (to get the tileId), I do the following (an example for illustration):
    SELECT tileId FROM tile
    WHERE SDO_RELATE(geometry, MDSYS.SDO_GEOMETRY(2003, 8307, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1),
    MDSYS.SDO_ORDINATE_ARRAY(50,10, 70,10, 70,50, 50,50, 50,10)), 'mask=COVERS+CONTAINS+OVERLAPBDYINTERSECT+EQUAL querytype=WINDOW') = 'TRUE'
    ORDER BY tileid;
    If I do a query on geometry, I will get something like (select geometry from tile):
    SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(60, 60, 80, 60, 80, 80, 60, 80, 60, 60))
    How can I just get the result of (60, 60, 80, 60, 80, 80, 60, 80, 60, 60) ?
    Thanks for your advice!
    Message was edited by:
    eecow

    This should get you the results you need.
    select tileid, gv.x, gv.y from tile, table(sdo_util.getvertices(geom)) gv where sdo_relate etc etc etc
    Cheers,
    David

Maybe you are looking for

  • IPhone Sync with Yosemites Photos App

    Hi there, I know, it's still Beta, but I am wondering, if I get it wrong somehow... Will it still be possible to sync Photos from Photos App in OSX Yosemite to iPhone via iTunes and without iCloud Photo Library? Yesterday I installed the new Beta Rel

  • SCCM 2012 SP1 - Multiple SUP - common WSUS DB

    Hello, Is it supported / recommend to share a common WSUS DB for multiple WSUS / SUP roles ? If yes, how to perform a clean deployment of additional SUP dealing with additional KB requirements.Following article explains the problem but the solution l

  • Database Upgrade Documents

    Hi, I am presently, working in Oracle 9i. We thought of Upgrading to 10g. I need some upgrade documents for 10g Upgrade. Where can I get the documents of Upgrade with Screenshots provided for Upgrade. Present Version: SQL*Plus: Release 8.1.7.0.0 - Pr

  • TC won't backup (verify issue?) and disk full?

    I appear to have a two-fold issue -- FIRST, my TC a couple of weeks ago stopped backing up.  Message was that it was full.  I was surprised since I thought it automatically deleted old files.  I even got notifications in weeks prior to backup failure

  • Link to files not created in iWeb?

    I tried some of iWeb yesterday, I don't have a .mac, so I publish to a folder, but it seems it can only inter-connect pages created in itself only. Say I want to add a link to a pdf file for downloading on my page, I can't find where should I put the