Is it possible to edit info from V$SESSION

I have to write something to the CLIENT_INFO field of whatever table the V$SESSION view gets its data from everytime a user connects to a database. The script should be server-side. Is this possible?

I think you can try something similar;
SQL> create trigger logonuser
  2  after logon on database
  3  DECLARE
  4   machinename VARCHAR2(64);
  5  osuserid    VARCHAR2(30);
  6  sid NUMBER;
  7  serial# NUMBER;
  8  program VARCHAR2(100);
  9  CURSOR c1 IS
10  SELECT osuser, machine , sid , serial# , program
11  FROM v$session WHERE audsid = USERENV( 'sessionid' );
12  BEGIN
13  OPEN c1;
14  FETCH c1 INTO osuserid, machinename, sid , serial# , program ;
15  INSERT INTO test.LOGTABLE VALUES ( 'LOGON', SYSDATE,
16  USER, osuserid, machinename , sid , serial#, program);
17  CLOSE c1;
18  COMMIT;
19  END;
20  /
SQL> conn system
Enter password:
Connected.
SQL> select * from LOGTABLE
  2  where schema='SYSTEM';
EVENT      TIMESTAMP SCHEMA
OSUSERID
MACHINENAME                                                             SID
   SERIAL#
PROGRAM
LOGON      29-JAN-08 SYSTEM
testdev
testvoprsR6                                                               159
EVENT      TIMESTAMP SCHEMA
OSUSERID
MACHINENAME                                                             SID
   SERIAL#
PROGRAM
         5
sqlplus@ testvoprsR6 (TNS V1-V3)Anyway if you identify the source from where the column CLIENT_INFO of V$SESSION brings information then that is through DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure.
V$SESSION
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm#sthref3986
DBMS_APPLICATION_INFO
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_appinf.htm#sthref490
Please also mention your complete database version.
Hope it is useful.
Adith

Similar Messages

  • It is possible to get info from the PDF

    Hi Everyone,
    I'm new baby to acrobat using javascript. It is possible to get info from the PDF.
    The Info contain like Color space, Trim size, which font  used depend on pages and which color is used for image & text.
    Thanks in advance.
    -yajiv

    Hi GKaiseril,
    Thanks for prompt response.
    Actually I'm a new baby to Acrobat script. Please explain briefly How do I write java script and execute.
    I'm familiar with Photoshop and Indesign Script. We are using ExtendedScript Toolkit editor for writing script.
    Thanks in advance.
    -yajiv

  • Is it possible to edit properties from WebDAV? Like content.xml in CRXDE?

    Is it possible to edit properties from WebDAV? Like content.xml in CRXDE?

    A simple hardware way :
    Use a home DVD player - connect audio and video(YC) outputs to a Canopus AD 100 converter - connect the firewire of the AD100 to your Mac - open log and capture in FCP (select non controllable device) - play the DVD with your remote control - pause - then click capture now - play the DVD. You will get directly DV files on your hard disk.
    This way you won't get headache. Software way is also available (just write to me : [email protected]
    Hung

  • Is it possible to Edit Mpegs from DVDs?

    Hi there. I am just strating a project, a museum installation, that requires footage to be edited together from a variey of sources. Some of these are DVDs. How can I get footage from the DVDs and into FCP for editing. I can convert into Mpeg4 using Handbrake, but can I edit this? What could I use to convert directly into mpeg2, or better still some .mov format like DV.
    I apologise, all these file formats, muxing, encryption, decryption, encoding, codecs does my head in and I need some help to clarify what would be best.
    Thanks for your advice
    Peter

    A simple hardware way :
    Use a home DVD player - connect audio and video(YC) outputs to a Canopus AD 100 converter - connect the firewire of the AD100 to your Mac - open log and capture in FCP (select non controllable device) - play the DVD with your remote control - pause - then click capture now - play the DVD. You will get directly DV files on your hard disk.
    This way you won't get headache. Software way is also available (just write to me : [email protected]
    Hung

  • Session Info form v$session

    How can I find the currently connected session so I can get the right info from v$session.
    I had tried select * from v$session where sid = (select distinct sid from v$mystat) this works fine in sql but I want it in a package and the package wont compile - complaining about the table or view being missing - am i missing something?

    As SYS:
    grant select on v_$session to your_user_id;
    grant select on v_$mystat to your_user_id;You might also consider using:
    select sid from v$mystat where rownum = 1for the subquery, instead of:
    select distinct sid from v$mystat

  • Is it possible to display GPS info from a COOLPIX S800c in Aperture 3?

    Is it possible to display GPS info from a COOLPIX S800c in Aperture 3?

    To see the GPS locations display the image in "Places view", while connected to the internet (you will see the images locations as pins on a map).
    To see the numerical values edit the "EXIF info" metadata preset in the Info panel to include GPS:
    Or simple us the Lift&Stamp tool to lift the tags from your image:
    It will show the GPS value, if the image has tags. This tool can also be used to transfer the GPS tags to other images without GPS.
    Regards
    Léonie

  • I have just transferred my iTunes library from a hard drive previously connected to a windows laptop to a MacBook Pro and now all my options for editing info are greyed out. I have seen the answers if still using windows but could find a similar situation

    I have just transferred my iTunes library from a hard drive previously connected to a windows laptop to a MacBook Pro and now all my options for editing info are greyed out. I have seen the answers if still using windows but could find a similar situation to this one.

    Eels290776 wrote:
    if my external hard drive is not connected to either of my machines, and I download something onto my iMac and then something different onto my Macbook, where are my machines going to be storing the new downloaded media
    when the drive is not connected, +iTunes media folder location+ will default back to <MacintoshHD>/users/<yourname>/music/iTunes/iTunes music (or media)
    and when I next connect the external hard drive how will I easily get the newly downloaded media onto the external HD
    you'd have to point +iTunes media folder location+ back to the external via preferences > advanced > iTunes media folder location, then file > library, organize library > consolidate files
    and essentially, to have it easily readable on both machines?
    in that case it might be best to copy the entire iTunes folder to the external. then, on each machine, launch iTunes while pressing option on your keyboard. when prompted, click on +choose library+ and navigate to the iTunes folder on the external.
    note only one iTunes can access the iTunes library @ a time !
    also, make sure the external is mounted on either machine before launching iTunes.
    JGG

  • I have many hours of home movies copied years ago to DVDs. Can I edit them using iMovie? All the Help instructions assume that you will be transferring info from cameras.

    I have many hours of home movies copied years ago to DVDs. Can I edit them using iMovie? All the Help instructions assume that you will be transferring info from cameras not from DVDs.

    See my User Tip here.
    https://discussions.apple.com/docs/DOC-3951

  • Is it possible to prevent users from viewing a page in Edit Mode?

    Hello everyone,
    I would like to know if it is possible to prevent users from accessing a portal page in Edit Mode. Currently, the users do not have access to any links that take them to edit mode, but if they add &_mode=16 to the end, they view the page in edit mode. Granted, they don't have permissions to add or edit content, but I would like to keep them from seeing this.
    I am using 9.0.4.1
    Any help or suggestions would be greatly appreciated!
    Jim

    hi jim,
    you cannot really configure this in portal. if somebody manually appends &_mode=16 we display the default edit mode, but fully enforce security. this means that the user cannot see anything he is not allowed to see: like pending items, hidden, expired or deleted items. as you said he also cannot add, edit or delete any items.
    regards,
    christian

  • Can I use automator to pull contact info from Craigslist? I am new to automator, but I am thinking it is possible for sure.

    Hello all!
    I would like to be able to reply to a large amount of Craigslist emails by pulling the contact info from Craigslist using Automator and putting the emails in a text document.
    I have Automator set to:
    1. Open Safari
    2. Open the Craigslist section an city I want.
    3. Pull a list of active listings URL'S
    Beyond that, I can not figure out how to have Automator open one page at a time and click the contact info button and then copy the  needed info into my text document.
    I can have it open all 150 links at one time.....lol but that wont work on my Macbook!!!!
    Help please!!!

    Hello
    You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
    set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
    if f ends with "/" then set f to f's text 1 thru -2
    do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
    use strict;
    use open IN => ':crlf';
    chdir $ARGV[0] or die qq($!);
    local $/ = qq(\\0);
    my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
    local $/ = qq(\\n);
    #     CSV spec
    #     - record separator is CRLF
    #     - field separator is comma
    #     - every field is quoted
    #     - text encoding is UTF-8
    local $\\ = qq(\\015\\012);    # CRLF
    local $, = qq(,);            # COMMA
    # print column header row
    my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
    print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    # print data row per each file
    while (@ff) {
        my $f = shift @ff;    # file path
        if ( ! open(IN, '<', $f) ) {
            warn qq(Failed to open $f: $!);
            next;
        $f =~ s%^.*/%%og;    # file name
        @dd = ('', $f, '', '', '', '');
        while (<IN>) {
            chomp;
            $dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
            ($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
            ($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
            ($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
            ($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
            last unless grep { /^$/ } @dd;
        close IN;
        print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    EOF
    Hope this may help,
    H

  • HT4859 I was in a car collision and need proof of my location when I called 911. How can I get this info. from my i phone device?

    I was in a car collision and need proof of my location when I called 911. The Police Dept., refused to respond, since there were no injuries.
    Now, I have a dispute with the other driver who is falsely stating accident happened at another intersection. In addition of calling 911 twice, I also took pictures of damages. Unfortunately, I did not take pictures of the intersection signs.
    My AT&T carrier states that this info. can only be disclosed by a subpoena. My insurance carrier states that they will not subpoena this info., since it is a civil case only.
    The Police Department does not keep records of calls they do not attend to.
    How can I get this location  info. from my i phone device if at all possible?
    Thanks,
    Pecosa

    Johnathan Burger,
    I did take photos of the damages to car and license plates, but NOT the intersection signs.
    How do I get the GPS Data in the exit data of photos? Please advise.
    Thanks,
    Message was edited by: Pecosa
    Message was edited by: Pecosa

  • Possible to extract data from DB

    Hello All,
    Can any one let me know is it possible to extract data from DB ? for the initial we need to extract all the records and we need to extract from 5 tables and perform match and merge and create a unique records..Is it possible?
    Once done then for delta we need to make sure all the 5 tables are updated then only BODS need to extract and update the deltas...
    Thanks
    Rajeev

    Hi Terry,
    Yes ,u can use DB connect to retrive the data from SQL data base...
    Also, If you want DB -connect with MS-SQL, In the source MS-SQL all the tables which provide data for SAP have to be owned by SAP-User (which you created to connect data base).
    Follow the same procedure u have done for Oracle DB connect..
    Cehck this look for more info..
    http://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/frameset.htm
    Hope this helps u..
    Best Regards,
    VVenkat..
    Edited by: Venkata Narayana Jakkampudi on Jan 13, 2009 6:07 PM
    Edited by: Venkata Narayana Jakkampudi on Jan 13, 2009 6:08 PM

  • Removed an edited folder from Catalog - Bad move?

    I have searched the forum for a specific answer, but I either overlooked it or failed to enter the exact search terms I needed....
    I removed a folder of 173 edited DNG's from the Catalog. Don't ask why!
    Am I correct in assuming that all of the presets/adjustments for those files are permanently gone? It appears that they are. - At least I had already exported all as full res JPGs!
    Please correct me if I am wrong with this statement:
    In order to preserve presets/adjustment applied to any image file in Lightroom, the files MUST remain in the Catalog. Yes or No?
    This is an awesome program & there is much more I have to learn - sometimes the hard way.

    function(){return A.apply(null,[this].concat($A(arguments)))}
    function(){return A.apply(null,[this].concat($A(arguments)))}Seven_D wrote:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    PhotoGAP wrote:
    You didn't say specifically... but did you try to re-import some of those images back into LR? Depending on your LR catalog settings, your edits may still be there. If you looked at the DNG in another viewer, then it's possible that you would not have seen your edits. Be sure to check them again with LR if you haven't done so already.
    In the post above, johnbeardy states how you can manually save your LR edits into the DNG files, so all is not lost when images are removed from the LR catalog. Another method is in the LR catalog settings, as I mentioned above. Look under Edit>Catalog Settings>Metadata tab and see if the option "Automatically write changes into XMP" is checked. If it is, then again, your edit settings were likely saved to the DNG files, and your losses are minimized. Checking this option creates a performance hit for some folks, but it sure can save a lot of work.
    I did re-import the DNG files. I was going to write - "from the original folder" - but now I may (too many senior moments) have moved the DNGs to another folder after exporting the edits as JPGs.. I did not use LR to move them - another bad move!? Anyway, after re-importing the DNGs, the original edits I performed were gone.
    Thanks for the tip about the Catalogue settings - I have now checked that box. Does this mean that all editing info for each DNG will now be part of the file - no matter where I move it - or how it is moved (ie - via LR, Windows, or any other program)? I'll have do an experiment to check this myself.
    Thanks to everyone for your help/suggestions. Especially to PhotoGAP for the tip on "Automatically write changes into XMP" in the Catalogue Settings.
    After making your suggested change in Catalogue Settings, I imported one DNG from the folder, edited it, but did not export. I then removed that folder from the LR Catalogue. When I re-imported the DNG, all edit settings had been saved. I also copied & then renamed the DNG to another folder via Windows. When I imported the copied file, all edit settings were still there.
    This is a relief! I will try to get accustomed to moving/creating new folders in LR, but it is good to know that valuable editing time will not be lost if I don't.
    Thanks much!

  • Is it possible to edit multiple songs simultaneously in iTunes?

    Does anybody know if it is possible to edit multiple songs in a single pass (by right clicking on all of them and then opening a single edit window or so?). I would like to be able to, for example, change the Genre of 50 songs from Electronica/Dance to Drum 'N Bass without having to do it 50 times over individually for each of the songs.

    I've done this before...by selecting the multiple songs, then right clicking and selecting "get info" from the list. You can then change things like the genre, album name, grouping, compilation (Y or N)...and other changes.

  • Is it possible to edit the alarm popup menu?

    I notice that, when I set a new event or to-do, the alarm popup menu has two sections: the top one describes "methods" (Message, Message with Sound, etc.); the bottom one lists a few odd combinations (for example, "Message with sound (Frog) 15 days before").
    The items on this second list seem to have been "saved" from earlier choices I made when I set alarms for particular events. But I'd like to edit this list: add certain combinations I like and remove ones I don't use.
    Is it possible to do this?
    And by the same token, is it possible to edit (add,etc.) options in the popup menus for those little screens that actually "perform" the alarm (stating the message)?
    Thanks,
    Stuart Sherman

    The 1st question might be able to be partially addressed by deleting the preferences files (resetting the defaults)? I'm assuming Apple set some defaults. Alternatively (or additionally) a call to 800-apl-care might get you more info.
    The 2nd question: No way known to me.

Maybe you are looking for

  • IPhoto 09 not sorting events by date

    iPhoto events were sorted by date, with most recent at the top. iPhoto has started putting new events at the bottom of the stack so I have to scroll down to find them. What can I do to get the sort order restored?

  • Calling a backend JOB in oracle express

    Hello, I have oracle 10g Express installed, which is working fine. I have created a backend database job to update an index automatically every time a change is made to the require table. Code is:- DECLARE X NUMBER; BEGIN SYS.DBMS_JOB.SUBMIT ( job =>

  • How can move Grid Control Repository to other server

    hi, We need to move our Oracle Grid Control Repository to Other server due to some Server Issuse....can someone helpme out...... OMR and OMA : Server A (Windows 2003 Server) OMS : Server B (Windows 2003 Server) Target Server : Server C (Windows 2003

  • I'm looking for the program that can make my left enter key an option key.

    I used to have it before my computer crashed and i lost everything on my hard drive. if any one who knows what it is please help me out.

  • Multiple CST tax cond in the tax code

    hi all, is it possible to have multiple tax cond for CST, say JIN7 and JIN4 in the tax code  (in FTXP) so that if their of these cond is present in teh invoice pricing procedure the taxes are determined. onyl one of these conditions will be present i