Session ORA_ROWSCN is linked?

I was doing research to try to understand a bit more about the ORA_ROWSCN feature.  I hope someone can explain what I see.

For my tests, I created the following table.

CREATE TABLE TEST3

(

COL1 NUMBER,

USERS VARCHAR2 (10) USER BY DEFAULT.

USERS_SID NUMBER SYS_CONTEXT ('USERENV', 'SID') BY DEFAULT,

TIME_STAMP DATE DEFAULT SYSDATE

);

I inserted lines in this table - I first connected as SYSTEM, reconnected as SYSTEM and then connected as CODY.  The first session created for the connection of the SYSTEM was SID 255 (as shown in the output).  The next session created for the connection of the SYSTEM was SID 367.  The next session created for the connection of CODY was 255 SID.  It was the same SID previously used by the connection of the SYSTEM.  Here is the table for which the RCS data.  What I found interesting is that when a change has been made for a given SID, all lines that have been previously inserted or updated so that SID got the new SNA - not only the new lines.  You can see in the outputs field time_stamp including the moment the file is actually spent.

My question is: why each line previously updated by a given session becomes a new SNA for every change of this session?  For example, in the output, you can see that the last record was inserted at 11:52 and the first record inserted for the session (255) was at 11:32.  However for all records with SID 255 CHN has been updated with the last change.

scn.png

No - ORA_ROWSCN is NOT bound session.

You marked this as ANSWER, but I want to make it clear that the statements you have posted is NOT correct. If fact, many of you statements are completely false or very misleading.

What I found interesting is that when a change has been made for a given SID, all lines that have been previously inserted or updated so that SID got the new SNA - not only the new lines.

No - not all rows get a new SNA. As others have stated that when the dependencies of line is not used ORA_ROWSCN is at the block level.

Thus, all THE ROWS in a block will be ORA_ROWSCN even. If you change just ONE LINE then all of THE rows in this block will reflect the ORA_ROWSCN for the block. But the ORA_ROWSCN for other blocks/lines won't be altered 'all lines that have been previously inserted or updated' will NOT have the new ORA_ROWSCN - that will be possible only if these wors are in the same block as the last row being changed but will NOT happen if they are in another block.

You can see in the outputs field time_stamp including the moment the file is actually spent.

No - this TIME_STAMP column is populated with the help of SYSDATE so the value will be the SYSDATE value that existed at the time where the INSERT statement is executed.

The ORA_ROWSCN value is determined at the time of the VALID transaction. Can be seconds, hours, or even days between the time of INSERTION and VALIDATION time.

Also the function SCN_TO_TIMESTAMP is an APPROXIMATE value and may be shifted a few seconds of the actual time that the operation of SNA was made.

http://docs.Oracle.com/CD/B28359_01/server.111/b28286/functions149.htm

SCN_TO_TIMESTAMPtakes as an argument a number that corresponds to a system change number (SCN) and returns an approximate timestamp associated with the SNA. The returned value is of TIMESTAMP the data type. This function is useful when you want to know the time stamp associated with a SNA. For example, it can be used in conjunction with the ORA_ROWSCN virtual to associate a time stamp with the most recent change to a line.

Notes:

  • The usual accuracy of the value of the result is 3 seconds.
  • The association between a SNA and a timestamp when the RCS is generated is known by the database for a limited period of time. This period is the maximum value of the undo retention period auto tuned, if the database is running in Automatic Undo Management mode, and the retention of flashback time all records in the database, but no less than 120 hours. The time for the association become obsolete only when the database is opened. An error is returned if the SCN specified for the argument SCN_TO_TIMESTAMP is too old.

You can also have multiple statements within the same transaction. So you can insert 2 rows, and then a few seconds/minutes later insert a few more lines. These lines would TIME_STAMP values due to the use of SYSDATE, but would have to value ORA_ROWSCN EVEN when the TRANSACTION is committed.

My question is: why each line previously updated by a given session becomes a new SNA for every change of this session?

Is not - as you know by now.

The only reason why you example seems to show that this is because all your lines are probably stored in the same block or you change at least one line in EACH block. Each previous row does NOT get a new SNA - only the preceding lines in the same block, modified by the new session (by ANY USER) will appear to get a new SNA.

As I explained above it has NOTHING to do with what makes a session, or not do. It is ONLY related to a change in beiing in a block.

Tags: Database

Similar Questions

  • Links created manually on a tree with the Protection of the active Session State

    Friends,

    I met a problem and hope you can help me with.

    I created a tree using the method described in a book great John & Scott, 'Pro Express Application'. Here is an example of a link stored in my table:


    access a page, passing it parameters

    f? p = & APP_ID.:3: & SESSION.: P3_IDENTIFIER, P3_FAMILY_NAME: & P2_IDENTIFIER, & P2_FAMILY_NAME.


    When the page is executed that it works as expected. I can expand the tree and go to the page, passing it the parameters if necessary.

    However when I turned on the protection of session state these links "handmade" has stopped working. (What I expected because it contains no checksum!).

    After some research, I see that I must use APEX_UTIL. PREPARE_URL to generate the URL with a checksum. But that's where I met problems. I can't be able to pass parameter values to the calling page.

    The original tree query was:

    Select "IDENTIFIER" id,
    "PARENT_IDENTIFIER" the nest,
    Name of "TITLE."
    Link "LINK."
    null a1,
    null A2
    a < table >

    Then, I changed the option to use APEX_UTIL. PREPARE_URL:

    ....
    APEX_UTIL. Link PREPARE_URL (Link),
    ....

    But clicking on the link just gave me a blank page. I then hardcoded just the url in the select statement:

    ....
    APEX_UTIL. PREPARE_URL ('f? p ='|: APP_ID |) » : 3 :'|| : APP_SESSION |': P3_IDENTIFIER, P3_FAMILY_NAME: & P2_IDENTIFIER, & P2_FAMILY_NAME. ") link.
    ...

    and it works, the page is called, and I can see the values of the parameters passed. But I can't use this method because it is limited to a page!

    Finally, I tried to store the parameter values, the parameters and the page number in different columns of the table that the tree came and then bring together them:

    ...
    APEX_UTIL. PREPARE_URL ('f? p ='|: APP_ID |': ' | navigate_to_page |': ' |: APP_SESSION |': ' | parameter |': ' | parameter_values link).
    ...

    Go to page set: 3
    parameters a value: P3_IDENTIFIER, P3_FAMILY_NAME
    parameter_values has the values of: & P2_IDENTIFIER, & P2_FAMILY_NAME.

    He now calls the page, but the values of the parameters have become literals. so, where I would expect an identifier I see & P2_IDENTIFIER Idem for family name.

    What I am doing wrong? How can I pass values to my page called using apex_util_prepare_url?

    If necessary, the details of my environment are: Apex 3.2.1 Oracle Application Server 10.1.2.3. Database Oracle 10.2.0.3

    Thanks in advance for any help you may be able to provide.

    Hello

    & NAME. the rating is not available in SQL, you must either use: NAME or v ('NAME') or nv ('NAME') (for numbers). One of these must be concatenated in your SQL statement in the same way that you did for: APP_ID etc.

    Andy

  • How can I get rid of the box that appears when you start Firefox 'Restore previous Session'?

    How can I get rid of the box that appears when you start Firefox 'Restore previous Session'?

    Subject: House is the default in Firefox 4 home page - look at the address bar containing the addresses of web page - it is the container for Google search, with a 'extract container' and below these elements is the Previous Session Restore button. It's not the same homepage that previous versions of Firefox used (although it is similar in appearance), it is a 'local' page that won't load the Internet.

    Set this page as your home page, which is what Firefox 3.6 and earlier versions had for the default home page. He has Previous Session Restore button/link.

    http://www.Google.com/Firefox

  • recreate the link db pvt without password

    It will take place the change of password occurs every month for particular schema and we have links from db pvt created on this scheme.  We want to re-create the db again links whenever password change. Version of Oracle's 11g.

    Is there any to recreate existing db link pvt without knowing the password (password) of the schema where the reset password frequently.

    Hello

    You can create the database links using "current user" style - in order to not specify a user or a password. If the source and destination game, then it will connect - see demo below. If you update the password on both ends at the same then the link continues to operate.

    See you soon,.

    Rich

    SYS@db1 > create demo user identified by demo.

    Created by the user.

    SYS@db1 > grant create session demo;

    Grant succeeded.

    SYS@DB2 > create demo user identified by demo.

    Created by the user.

    SYS@DB2 > grant create session, create the link of database for demo;

    Grant succeeded.

    SYS@DB2 > conn demo/demo

    Connected.

    Demo@DB2 > create xx link of database using the 'DB1 ';

    Database link created.

    Demo@DB2 > select sysdate in dual@xx;

    SYSDATE

    --------------------

    JANUARY 20, 2014 11:35:03

    DEMO@DB2 >

    SYS@db1 > alter demo user identified by new;

    Modified user.

    [oracle@]:DB2:[~]# sqlplus demo/demo

    SQL * more: Production release 11.2.0.2.0 on Mon Jan 20 11:35:47 2014

    Copyright (c) 1982, 2010, Oracle.  All rights reserved.

    Connected to:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    With the partitioning option

    Demo@DB2 > select sysdate in dual@xx;

    Select sysdate from dual@xx

    *

    ERROR on line 1:

    ORA-01017: name of user and password invalid. connection refused

    ORA-02063: preceding line XX

    SYS@db1 > alter demo user identified by new;

    Modified user.

    Demo@DB2 > conn new/demo

    Connected.

    Demo@DB2 > select sysdate in dual@xx;

    SYSDATE

    --------------------

    JANUARY 20, 2014 11:36:43

  • TREE, link to another page in the application without authentication

    Hello

    I'm working on APEX 4.1.1 , I used region of the tree to make my menu of the application. My problem is in all parts of the tree, I do a redirect to a specific page ID (in another application), and I'm trying to do an automatic authentication, but his does not work:

    My region requestio tree:

    Select case when connect_by_isleaf = 1 then 0

    When level = 1 then 1

    else                           -1

    end the status,

    level,

    'ÉTIQUETTE' as the title,.

    NULL as an icon,

    "ID_PAGE" as a value.

    NULL as ToolTip,

    M.num_app |': ' | v('SESSION') |': ' | M.REQUEST link

    MY_TREE m

    Start with M.LABEL = 'START '.

    connect prior "ID_PAGE" = "ID_PAGE_PARENT."

    brothers and sisters of order by 'ID_PAGE.

    Suppose that my main application containing my menu tree = 500 and the target page, ID is on the apllication page 501 on page 101 ID of my App ID 501 I add a process header before that get the username and password cookies and call apex API to login.

    Thanks for your replies.

    Yosof

    This thread Re: navigate between two applications in the same workspace without sing again suggests that you don't have to do any coding.

    See what happens when you navigate to a page that is not the login page. A non-public page.

    What I know of the login process, is that it changes the session id.

    Nicolette

  • What apex application to get the session?

    Hello!

    Can someone tell me what app to get the session? I use the plugin for the menu drop down and now I have to put the link for the page. I tried to put the link like this f? p = & APP_ID.:2: & SESSION. for browser could use it as localhost: 8080/apex / * f? p = 1000:2:386966391988601: *, but this does not work for me. I also try to put as f? p = 1000.:2: & SESSION. (error I get is Bad request HTTP client sent a request to this server could not understand). or f? p = 1000:2: (here I must log in evry time I want to use this link) and nothing works well for me.

    Kind regards
    Dragan

    Published by: drama9346 on 26.4.2012 04:11

    The must be in

    HTML Header
    

    and not in

    Page HTML Body Attribute
    

    .

    It's in the right place?

    To test, it adds an alert after the assignment.

    
    

    The loading of the page, you should get the alert with the App Id.

    The second thoughts, literature wrote

    To use this menu, you'll need a source of data that provides menu options in the format: ID, Parent ID, name, link and level. 
    

    So why not fill the APP_ID and the Session in the link to the help

    Select ....
    'f?p=' || v('APP_ID') ||':'|| page_no ||':'||v('SESSION') link,
    ....
    

    Kind regards

    Published by: Dominique on April 26, 2012 17:52

  • v ('APP_USER') on the database link

    We have an APEX appliocation that updates the tables via 2 database llinks VIEWS

    the views were created in select * from Employee@DBLINK for example

    on each of the remote databases, we have implemented a package of verification which has been copied from another application and is called from the triggers

    the following INSERT statement works very well when demand and the DB tables are not using the links

    INSERT INTO AUDIT_TBL (TIMESTAMP, WHO, TNOM, CNAME, OLD, NEW, GCI)
    VALUES
    (sysdate, v ('app_user'), upper (l_tname), upper (l_cname),)
    l_old, l_new, l_GCI);

    but when the table is updated via the points of view on data base linking the value of v('app_user') is null

    no idea how I can fill this value on the links

    Thanks in advance

    Chris

    Hello

    If you set the client_info context when the user connects so yes it will happen. Apex sessions are pooled are reused by different users. That's why when a database of apex session creates a session on the remote database so that remote session is reused until the closing of the database session and therefore will be used by different users of the Apex. The client_info context is a session context and will be set for the duration of the session.

    Therefore, you must set the context when the page is processed before we do each remote update. You can also issue an ALTER SESSION CLOSE DATABASE LINK to ensure that the remote session is closed and cannot be reused, but this should not be necessary.

    Rod West

  • What is a session in APEX?

    The definition and the functionality of a ' * session * "in the apex, the same as with other web development platforms?

    While each session is only linked to a customer?

    and session variables last for the duration of the session?

    Hello

    Take a look at the section "what is a session" in the documentation.

    http://download.Oracle.com/docs/CD/E14373_01/AppDev.32/e11838/concept.htm#BCEDJAIH

    Hope this helps,

    John.
    --------------------------------------------
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    AWARDS: Don't forget to mark correct or useful posts on the forum, not only for my answers, but for everyone!

  • Same ol' questions ' Hotmail: help!

    Can connect, but no e-mail-influence link does work. Impossible to open, reply, tri - whatever it is. I deleted the cache and cookies; I confirmed that I have the latest version. I uninstalled and reinstalled, and I even disabled every plugin, but nothing's worked. Hotmail support says it's a browser problem.

    I was in the middle of you answer a second e-mail in the same sign-in session when the links stopped working. I could connect and disconnect, open account hotmail as options, but I can not read, file, reply/forward, removal or any other internal page link function more.

    You are using version 3.6.23. Version 7.0.1 is available. He has not pushed to 3.6 users automatically yet, but you can download and install from http://www.mozilla.org/en-US/firefox/new/

  • Impossible to download a working version of Skype for my OS

    I use Skype on a Mac with OS 10.5.8. Until today, Skype 6.3.0.602 worked well. Now, he refuses to connect and invites me to download a new version. Following the instructions, I download a version which is proving to be Skype 6.3.0.602. Not surprisingly, this version still I cannot open a session. The link to the new version gives me the same version again.

    System requirements specify a version of the operating system that is not numbered, but may be more recent than mine. I found different tips download an older version of Skype has worked in the past. However, I don't find a way to select which version to download. Is there a working version of Skype for my computer? Or a Skype was in collusion with Apple in order to force users like me to buy new computers?

    My apologies. There was a problem with the update. It is corrected now, could you please try logging in again download using the same link as displayed above. Also make sure the downloaded version that have been served to you if you use the leopard is 6.3.0.604.

  • C20-isdnlink troubleshooting call

    I have a codec C20 and an adapter isdlink with Numéris.

    I try to call C20 ISDN destination with '10.125.11.5; x-h320number = isdnnumber', but the call does not work.

    In the journal of the c20, I can see something like 'type 3 door not supported '.

    Can you help me?.

    Thank you

    Hello. Hello.  Watching the xcon since the link module, instead of putting the peer GW URI like IP address, can you remove it and put it in the host field counterpart versus the counterpart URI?

    If your still having a problem placing a call after this change, open a session module ISDN link and run the following and capture the output to a text file:

    (1) xcon

    xstat 2)

    (3) newspaper ctx sippacket debug 9

    output log 4) on

    (5) systemtools isdntrace decode on

    (6) systemtools isdntrace on

    isdntrace output 7) systemtools on

    Call SIP instead of the system connected to the link Module to see if the SIP call comes on the module, and the ISDN Trace to output, hopefully, we'll see what happens with the appeal, it turns off the ISDN network.

    Disable the recording after the call failure occurs:

    (1) log out offshore

    isdntrace output 2) systemtools off

    (3) off isdntrace systemtools

    (4) log ctx sippacket debug 0

    Let us know if that helps.  Thanks in advance.

    VR

    Patrick

  • UC 540 VIC 4 FXO ADD CARD IN THE EXPANSION OF VIC SLOT

    Hi all

    I would add an extra card to 4 FXO VIC to the 540 CPU expansion slot. I can add additional VIC 4 FXO card without adding DSP modules. ?

    Same device I need to create the System Attendant service auto. What are the necessary permit for the auto attendant?

    Product details are given below

    UC 540 VIC 4 FXO ADD CARD IN THE EXPANSION OF VIC SLOT

    Processor UC540W - FXO - K9 (MPC8358) of Cisco (revision 0 x 100) with 235520 K/K 26624 bytes of memory.

    MPC8358 CPU Rev: Part Number 0x804A, Revision ID 0 x 20
    30 user licenses
    10 FastEthernet interfaces
    2 terminal lines
    1 module of virtual private network (VPN)
    4 FXO voice interfaces
    4 FXS voice interfaces
    1 voice interface MoH
    1 802.11 radio
    1 cisco service engine (s)
    128 KB of non-volatile configuration memory.
    250880K bytes of ATA CompactFlash (read/write)

    Kind regards

    Jose Ajay K

    Hi ajay1komban,

    You don t need a permit for the System Attendant service auto and expansion slot VIC, you must take into account the Conference and transcoding of design, you can check the total number of session from this link:

    http://www.Cisco.com/c/en/us/products/collateral/unified-communications/...

    If this was helpful, please rate.

    Kind regards.

  • dblink question...

    Hi all..

    Can you please help me with the following question of dblink.

    We use dblinks in some of our packages, since then DBA complain there is a lot of

    "Idle sessions" are piling up in the remote database, which are causing many problems.

    It seems that whenever we use a dblink, oracle automatically creates a session in the remote database

    and we need to issue 'commit' or 'dismantling' to close this session.

    My question is, should we just issue commit or rollback to close the remote session or do we need

    to explicitly close the session of dblink using ("dbms_session.close_database_link")?

    I mean..

    EX:

    Start

    Select count (*) in the table_name@REMOTE_DB.world; v_count

    commit; -If I have committed, oracle closed the session?

    DBMS_SESSION.close_database_link ("REMOTE_DB.world"); - or do I have to explicitly close the dblink session?

    end;

    Our goal was to not make too many idle sessions in the remote database.

    Sorry if this question was already before. I went through various articles already, but I couldn't find

    This response.

    Thanks in advance...

    Connections and sessions established to the remote databases persist for the duration of the session of the local user, unless the application or the user explicitly puts an end to them. Note that when you issue a SELECT statement on a database link, a transaction lock is placed on the segments of cancellation. To repeat the segment, you must issue a COMMIT or ROLLBACK statement.

    Remote connections set up by using the links in the database is useful to disconnect high cost connections that are no longer required by the application. You can finish a remote connection and the session using the ALTER SESSION statement from the CLOSE DATABASE LINK clause. For example, assume that you run the following:

    ALTER SESSION CLOSE DATABASE LINK dblinkname;

  • apex_workspace_activity_log view column ip_address

    Hello

    When I ask apex_workspace_activity_log, why there are a few lines with two ip addresses separated by commas?
    Here's the example query I ran on apex.oracle.com
    select ip_address
    from apex_workspace_activity_log
    where ip_address LIKE '%,%'
    ;
    Also why ip address and user agent column is not populated for all the lines in the view of apex_workspace_activity_log?

    Kind regards
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

    Hi Jari

    When I ask apex_workspace_activity_log, why there are a few lines with two ip addresses separated by commas?

    I have not all entries like this on my local implemented using SST. On apex.oracle.com that the first address is coming from everywhere (including my ISP and search bots), then it seems to be the true origin of the request. The second address is always either 141.146.114.41 or 141.146.114.42, which resolves to acsmv0121.oracle.com and acsmv0131.oracle.com respectively. Run () owa_util.print_cgi_env on apex.oracle.com says:

    X-Forwarded-For = 82.46.239.216  // cpc9-sgyl29-2-0-cust215.sgyl.cable.virginmedia.com (my ISP)
    REMOTE_ADDR = 141.146.114.41     // acsmv0121.oracle.com
    

    This indicates to me that the APEX to connect both of these addresses when they differ, or it is a result of the use of an architecture of web server in particular (i.e. not SST on the DB server).

    Also why ip address and user agent column is not populated for all the lines in the view of apex_workspace_activity_log?

    I read somewhere that it's for performance reasons because they will be the same for all entries for a session. If you look at the log, they are recorded for the first two entries in the session (usually deep link request and forwarding connection involved).

  • New user lost. Need of simple questions answered

    I received a short time trying to configure vmware 5 for virtualizing office in a university setting. Especially for our laboratories and public machines. I have a few thin clients from Wyse, I can try with Dell

    We are a single network MS most of the time. I have been using HyperV about everything for a while.  But VMware and the structure baffles me.

    I just set up a test environment for a few thin clients. I need someone to straighten out the mess of servers required for vmware view

    Servers connection composer, ESXI,... etc.

    What must be a physical server? Can I install several things on a server? can I install anything on a hyperV VM to test or all should there be physical?  My Manager gave me a server unfortunately exceeded to try this and I think it's impossible. How can I install everything first?  VMWare for Dummies anyone?

    The basic components:

    * Shared storage - iSCSI, fiber, NAS (not recommended, but an option for a small number of workstations or for verification). In addition, required hardware (Ethernet or fiber) of switching.  You can use local storage, but you lose your availability with vMotion or light HA.

    * ESXi host (s) - the number depends on the size of the environment.

    * SQL 2005 + database - physical or virtual.

    * Active Directory

    * Good MS licenses depending on the type of clients you are going to use. Example: You may have to pay for the VDA licenses, if you use clients which don't run Windows natively to connect to virtual desktops.

    * Computers desktop, laptops, zero customers or clients to access virtual desktops.

    * Discover the connection to the server - physical or virtual (Virtual is recommended).

    * vCenter Server - physical or virtual (Virtual is recommended).

    * Security Server - it is used to tunnel securely sessions of WAN links to your connection/Server Manager view if you want clients to be able to connect securely from the outside or to secure your network part where connection (s) are located.

    Basically, install you ESXi on your physical boxes, build your decision-making supported virtual servers, lift the display and running management environment, then start to build your virtual desktop and create then pools that your client devices will connect to the.

    I don't think one host will be sufficient for to accomplish you everything and it is not really a good test because you will not get the high availability features or vMotion and looks that you have no access to the shared storage.

    The documents posted on the link below will give you all the information you need to get running.

    http://www.VMware.com/support/pubs/view_pubs.html

Maybe you are looking for