To Get current System Name / Machine Name

Hi all,
Is there any thing to get the current System Name or Machine Name In PL/SQL?
Thanks in advance.
Regards,
GowriShankar.N

Try :
SELECT p.pid, p.spid, p.program, s.sid, s.program
into lvpid, lvspid, lvprogram, lvsid, lvprogram2
FROM v$process p, v$session s
WHERE p.addr = s.paddr AND s.sid = (SELECT sys_context('userenv', 'sid') FROM dual);
display :
PID SPID PROGRAM SID PROGRAM
25 12278 oracleBECD@v480d-01 145 SQL Developer
1 rows selected

Similar Messages

  • How to get current system icon theme

    Hello every one.
    I need to create an ImageIcon object and set it's image to a folder icon image suitable with the current System ( i.e. Vista, XP, ... )
    So, I was wondering how can I get the icons of the system themes?
    any advice will be appreciated.
    thank you.

    Swing related questions should be posted in the Swing forum.
    set it's image to a folder icon image suitable with the current System You can get some Icons from the UIManager. Check out [UIManager Defaults|http://www.camick.com/java/blog.html?name=uimanager-defaults]. Start with the "FileView".
    You can also get the icons of specific applications using something like:
    (((ImageIcon) FileSystemView.getFileSystemView ().
        getSystemIcon (new File ("c:\\windows\\explorer.exe"))).getImage ());

  • How to get current system date and store in db

    may i know how to get the current system date so that i can store it into the database

    java.util.Date is NOT deprecated, just most of its methods are.
    Use
    new java.sql.Date(System.currentTimeMillis());to get the current date. Note that the date in a client machine
    may differ from the clock of the server!
    BTW: java.sql.Date extends java.util.Date.
    Fritz

  • Get current system timestamp

    I need to get the current system timestamp. How can I do?
    Something like this
    String strTimeStamp;
    --> strTimeStamp = java.sql.Timestamp.toString(); ??????????
    Thanks
    Brian Nguyen

    Use the following code:
    String current = new Date().toString();The above code returns a string in the following format:
    dow mon dd hh:mm:ss zzz yyyy
    If you desire a different format have a look at the java.text.SimpleDateFormat class.

  • How to get the system property - user.name from a client system

    Hi All,
    I have an application which would enable active users from the domain of the company. I want to get the name of the client from the system. I tried to run it on the local machine from Jdeveloper, it returned me the correct user name. But when the application is deployed on the Oracle Application server, and i hit the URL of the application, it returns the server URL.
    I understand that the JSP works on the server side here but help me out to get a solution. I want to read the user name from the client side.
    Thanks in advance!
    Akhil

    Akhil,
    I hope this will never work. Think about your requirement for a second....
    This would mean an application is able to see my user credentials without my knowledge. It's bad enough the know my IP if I'm not using TOR.
    To get your requirement to work you have to redefine it a bit. The user have to log in to your application. The application holds the name together with an ID of the session to know the user in further requests.
    Thats a basic security theme, described in the dos [Adding Security to a Fusion Web Application|http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/adding_security.htm] .
    Timo

  • How to get current logged-in user name in data access driver or in universe

    In universe, to get the current log in user is via @Variable('BOUSER').
    Right now, I need to be able to get the user name in the data access driver. I am writing a customized data access driver because we need to patch some where clause on the the query generated by the universe based on the logged-in user info. I only think of using end_sql parameter or adding an universe level filter to patch the @Variable('BOUSER') to the query, which would not work if user want to use customized query.
    Can anyone tell me how to get currentBO user name from connection server ? or how @Variable('BOUSER') is translated into the logged-in user name in the universe?

    I do not know your EJB Service. But you should pass the credentials of the current logged on portal user to your service. That's not by default I think.
    I had a similar problem with CAF developed webservices. I had to turn on permission checks in my web service and passed the credentials via logon ticket.
    Regards, Bernd

  • Getting the system generated column name for xmltype column

    Hello,
    how i can get the internal column name (p.a. SYS_NC00001$) for a xmltype column? I cannot find a correct dictionary view .
    I need that for moving a xmltype lob partition to another tablespace.
    Thanks,
    MaikR

    Does the following help:
    http://www.idevelopment.info/data/Oracle/DBA_tips/LOBs/LOBS_2.shtml
    http://www.liberidu.com/blog/?p=264

  • What SAP function is used to get current system time?

    Hello All:
        I heard there is an SAP function to get system time. It was "gettime" or something! Could anyone please tell me what the function is?
    Thanks.
    Mithun

    Like this:
    DATA tt TYPE uzeit.
    GET TIME FIELD tt.
    This will reset sy-uzeit as well.
    Hmm... it appears I am mistaken. SY-UZEIT always seems to have the current time. I think this is a change from earlier releases.
    Rob
    Message was edited by:
            Rob Burbank

  • Get current system id

    Hi,
    I need to develope a web service (EJB) to get the id of the CE system the web service is running on. This will be later on used to distiguish between test and productive system.
    Anybody can help?
    Thanks and regards,
    Kevin

    Hi,
    You can get the it from a System Property.
    System.getProperty("SAPMYNAME");
    To get all possibilities, just do a System.getProperties() and see the all available properties.
    Best regards

  • GET IP and machine name of user....

    hi friends,
    i want to get IP address and machine name of the user who have access a form in web environment.
    be4 when i was working in client/server invorement i was using the following
    command
    SELECT SYS_CONTEXT('USERENV','IP_ADDRESS'),
    SYS_CONTEXT('USERENV','HOST'),
    SYS_CONTEXT('USERENV','OS_USER') from dual;
    when i try to implement this command for my web form... it gets the information
    (IP and machine name) of the server where applicaiton server resides and my application reside.
    how the get the information of user's mahcine and IP in web environment?
    please help!!!
    regards, imran baig

    hi again,
    thanks for the help, but i am still in problem. i am using forms6i and 9iAS for deployment.
    i tried to use d2kwutility and the code i used is:
    DECLARE
    OS_USER_NAME VARCHAR2(60);
    MACH_NAME          VARCHAR2(100);
    BEGIN
    OS_USER_NAME := win_api_environment.get_windows_username(toBoolean('Y'));
    MACH_NAME := WIN_API_ENVIRONMENT.Get_Computer_Name(toBoolean(MACH_NAME));
    INSERT INTO COMMON.COM_USER_INFO VALUES(:GLOBAL.G_EMPLOYEE_ID,:GLOBAL.G_MODULE_ID,SYSDATE,
    'SETUP > COMPANIES', 'F', :GLOBAL.G_USER_IP, MACH_NAME, OS_USER_NAME);
    COMMIT;
    CALL_FORM('COMPANIES_FRM',NO_HIDE,NO_REPLACE);
    END;
    :( BUT NO RESULTS..
    library is attached but it doest work...
    what to do now..
    Please help its very urgent..
    thanks, Imran Baig

  • System.getProperty("user.name") not working without /etc/passwd, CentOS 4.3

    Dear all,
    I'm having trouble getting the system property user.name (which we need in our ant scripts) on our CentOS box. :(
    When running the program below thru
    java dumpproperties2
    it prints "user.name='?'" on our CentOS 4.3. On win32 it works. It turns out that if you add the account corresponding to the EUID to /etc/passwd it works correctly. However, we don't use passwd authentication but an enterprise wide LDAP-system. Our /etc/nsswitch.conf says:
    passwd: files ldap
    One work around is to replace the java executable with a script that does
    /path/to/jdk/bin/java -Duser.name=$USER -Duser.home=$HOME $@
    Used jdk is j2se 1.5.0_13 Linux 32-bit.
    Some questions for the experts:
    1) Is there any other way?
    2) Is it a known issue that Linux versions of the jdk just looks in /etc/passwd to map uid to user name (and home dir) instead of doing what the rest of the system, like whoami, does? I haven't found anything in either the readme or installation instructions, nor in the bug db.
    Br, Jesper Tr�g�rdh
    public class dumpproperties2 {
        public static void main(String[] args) {
         String s = System.getProperty("user.name");
         System.out.println("user.name='" + s + "'");
    }

    Does this work?
    //public final class System
    public static String getenv(String name)Then you can access the USER environment from inside Java.

  • How to check client machine IP address or Machine name

    I'm trying to check the client machine's IP address to restrict the unauthorised login in unassigned workstation. Any body know how to get the IP address of client machine? Is there any built in function to get it. I'll appreciate if you could send me email. Thanks.

    Hi,
    with the following statement you can get your pc's machine name:
    SELECT UPPER(USERENV('TERMINAL'))
    FROM DUAL;
    Be careful that, if you are dealing with a web envinronment, the outcome will be the Forms Server machine name.
    Regards,
    Marco

  • How does BR get current date, user, and associate member with Attribute Dim

    I need use Business rules or Calc script to implement following functions:
    1. Get current date and the name of user who is running the BR and save the information to cube.
    I don't find any functions to get current date and users.
    Also, since text and date is store in relational database and essbase cube only stores the index, it looks that the value can't be changed or stored by using "==" directly, is there any function to change value of members with Text or Date types in BR/Calc script?
    2. End users select attribute value (via smart list) of products or projects(Sparse dimensions) in data form, run BR to update the association of these members with attribute dimension.
    I don't find any functions to change the attribute association in BR/Calc, is there any CDF (Custom Defined Function) that can do it?
    Thanks!

    Hi,
    For the date functionality, check out the post below.
    Re: Days behaviour between two dates
    As for the username, there is a little tricky way that requires an unused or a new dimension along with a smart list of user names. It's also possible to capture the user name from the cookies and pass it on to the form. The latter is possible through validatedata.js however requires hefty coding here and there.
    As for the attributes, it's not possible to update metadata through business rule. So no luck in there.
    Cheers,
    Alp

  • Current System Time in Cold Fusion

    Hi,
    I am getting the current system Date as below:
    <cfset todaydate = CreateODBCDate(now())/>
    How to get current system time in coldfusion in a similar way
    and what is the syntax for it.
    <cfset currenttime = XXXXXXXXXXX/> which should be of
    24 hrs time format
    Could anyone please help me on this
    Thanks,
    Cold Fusion Beginner

    <cfset currenttime = XXXXXXXXXXX/> which should be of
    24 hrs time format
    <cfset currenttime = now()>
    That will be a date-time object of the current time. If you
    would like
    that formated in a standard 24 hour format:
    <cfset currenttime = timeFormat(now(), "HH:mm:ss")>
    The 'HH' time format mask is for hours in the 24 hour clock;
    'hh' will
    give you hours in a 12 hour format.

  • Getting accurate System time to milliseconds

    I have written a program which needs to do following two things
    1. make current thread sleep by some value in range 1 to 100 milliseconds
    2. Get current system, acurate to maximum accurate value in miliseconds
    as Java on Windows does not gurantee that Thread will sleep for the specified milliseconds and system time is also approximate, I need a solution that provides the guranteed accuracy for above two cases.
    Please help!!!
    Thanks in advance

    I have created a udp client/server. I am able to regulate the rate of packets (approx) on server, but the client time is shifting(slowing down).
    The basic function of client is to put set a variable client recieve time to the time on client and send packet back to server (to calculate delay on n/w).
    The server is sending data at correct timing (approximate), but the recieve time at client is shifting down slowly.
    I reduced the load on client by just discarding currrent packet and goto recieve next, but the delay is still there.
    The data captured is this (SS is Server Send time, CR is Client Recieve time)
    SS: 1108653459464 CR: 1108653447161
    SS: 1108653460464 CR: 1108653448161
    SS: 1108653461464 CR: 1108653449161
    SS: 1108653462464 CR: 1108653450161
    SS: 1108653463464 CR: 1108653451161
    SS: 1108653464464 CR: 1108653452161
    SS: 1108653465464 CR: 1108653453160
    SS: 1108653466464 CR: 1108653454160
    SS: 1108653467464 CR: 1108653455160
    SS: 1108653468464 CR: 1108653456160
    SS: 1108653469464 CR: 1108653457160
    SS: 1108653470464 CR: 1108653458160
    SS: 1108653471463 CR: 1108653459160
    SS: 1108653472479 CR: 1108653460145
    SS: 1108653473463 CR: 1108653461129
    // server time reduced by just 1 millisecond but client got mad
    SS: 1108653474463 CR: 1108653462129
    SS: 1108653475463 CR: 1108653463129
    SS: 1108653476463 CR: 1108653464129
    SS: 1108653477463 CR: 1108653465129
    SS: 1108653478463 CR: 1108653466145
    SS: 1108653479463 CR: 1108653467145
    SS: 1108653480479 CR: 1108653468145
    SS: 1108653481463 CR: 1108653469129
    SS: 1108653482463 CR: 1108653470129
    SS: 1108653483463 CR: 1108653471129
    SS: 1108653484463 CR: 1108653472129
    SS: 1108653485463 CR: 1108653473129
    SS: 1108653486463 CR: 1108653474129
    SS: 1108653487463 CR: 1108653475129
    SS: 1108653488479 CR: 1108653476129
    SS: 1108653489463 CR: 1108653477113
    SS: 1108653490463 CR: 1108653478129
    SS: 1108653491463 CR: 1108653479129
    SS: 1108653492463 CR: 1108653480129

Maybe you are looking for