LAST_DDL_TIME, and TIMESTAMP in the USER_OBJECTS table

Hi,
I need to know the difference between the LAST_DDL_TIME, and TIMESTAMP in the USER_OBJECTS table concerning with the packages.I know both will give the latest compile time of the package , but i need to know why there is two seperate column. I also could find the date and time of LAST_DDL_TIME, TIMESTAMP to be different some time for a particular pacakge. Please help me in understanding the difference in detail.
Regards,
Vijayanand.C

Here is an example.
SQL> create or replace package mypackage as
2 procedure abc(def in varchar2);
3 end;
4 /
Package created.
SQL> select last_ddl_time,timestamp from user_objects
2 where object_name = 'MYPACKAGE';
LAST_DDL_TIME TIMESTAMP
19-MAY-2004 11:21:31 2004-05-19:11:21:31
SQL> alter package mypackage compile;
Package altered.
SQL> select last_ddl_time,timestamp from user_objects
2 where object_name = 'MYPACKAGE';
LAST_DDL_TIME TIMESTAMP
19-MAY-2004 11:23:26 2004-05-19:11:21:31
I hope this helps.

Similar Messages

  • LAST_DDL_TIME, and TIMESTAMP in the USER_OBJECTS

    Hi,
    I need to know the difference between the LAST_DDL_TIME, and TIMESTAMP in the USER_OBJECTS table concerning with the packages.I know both will give the latest compile time of the package , but i need to know why there is two seperate column. I also could find the date and time of LAST_DDL_TIME, TIMESTAMP to be different some time for a particular pacakge. Please help me in understanding the difference in detail.
    Regards,
    Vijayanand.C

    LAST_DDL_TIME is the timestamp for the last DDL operation on the object (including GRANTS and revokes).
    TIMESTAMP is the timestamp for the specification of the object.
    In more detail,
    TIMESTAMP relates only to changes to the specification of the object. DDL such as GRANTS for the object would alter the LAST_DDL_TIME, but not the TIMESTAMP.
    DDL which modifies the specification of the object, such as in the case of adding a column to a table or modifying a column attribute, would update both LAST_DDL_TIME and TIMESTAMP.
    Hope this helps.
    Janet.

  • When LAST_DDL_TIME and TIMESTAMP fields are uptaded?

    Hi,
    I need know when the fields LAST_DDL_TIME and TIMESTAMP are updated.
    - Which updated objects (tables, procedures, etc) can change them?
    - Which references are updated too? All?
    Thanks by any help
    Moises Rodrigues
    System Analist
    CPM Braxis - http://www.cpmbraxis.com

    Hi,
    Please refrain from posting duplicate threads.
    Already answered Re: When LAST_DDL_TIME and TIMESTAMP fields are uptaded?
    Aman....

  • Columns last_ddl_time and timestamp in dba_objects

    Hi,
    i just ran into strange thing.
    i created a procedure called aaa. then i ran create or replace procedure aaa with the same code of the original procedure.
    i was surprised to see that the fields of last_ddl_time and timestamp haven't change.
    Of course, when i did this experiment with changing one line in the original package - the fields of last_ddl_time and timestamp did change.
    The question is if it's suppose to be this way and if so, is there any way to make this fields change even if the "new" code is exectly the same.
    thanks

    Hi,
    i demonstrated the thing here.
    i forgot to mention that the DB version i'm using is 11.2.0.3.
    SQL> select last_ddl_time,timestamp from dba_objects where object_name = 'AAAAAAA';
    no rows selected
    SQL> create or replace procedure AAAAAAA is
    begin
    null;
    end; 2 3 4
    5 /
    Procedure created.
    SQL> select last_ddl_time,timestamp from dba_objects where object_name = 'AAAAAAA';
    LAST_DDL_TIME TIMESTAMP
    17-APR-2013 17:37:09 2013-04-17:17:37:09
    SQL> create or replace procedure AAAAAAA is
    begin
    null;
    end; 2 3 4
    5 /
    Procedure created.
    SQL> select last_ddl_time,timestamp from dba_objects where object_name = 'AAAAAAA';
    LAST_DDL_TIME TIMESTAMP
    17-APR-2013 17:37:09 2013-04-17:17:37:09
    SQL> create or replace procedure AAAAAAA is
    begin
    null;
    null;
    end; 2 3 4 5
    6 /
    Procedure created.
    SQL> select last_ddl_time,timestamp from dba_objects where object_name = 'AAAAAAA';
    LAST_DDL_TIME TIMESTAMP
    17-APR-2013 17:38:02 2013-04-17:17:38:02

  • Import data from few tables and export into the same tables on different db

    I want to import data from few tables and export into the same tables on different database. But on the target database, additional columns have been added
    to the same tables. how can i do the import?
    Its urgent can anyone please help me do this?
    Thanks.

    Hello Junior DBA,
    maybe try it with the "copy command".
    http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/apb.htm
    Have a look at the section "Understanding COPY Command Syntax".
    Here is an example of a COPY command that copies only two columns from the source table, and copies only those rows in which the value of DEPARTMENT_ID is 30:Regards
    Stefan

  • Multiple and conditions in the same table

    Ok I am going to kick myself for this, but I can't figure it out. I am trying to figure out how to find employees which match multiple criteria in the same table.
    create table emp
    (empno number,
    name  varchar2(10))
    create table skills
    (skill_id   number,
    skill_code varchar2(20))
    create table emp_skills
    (empno    number,
    skill_id number,
    rating   number)
    insert into emp values(1, 'SMITH');
    insert into emp values(2, 'JONES');
    insert into skills values (1, 'SQL');
    insert into skills values (2, 'PLSQL');
    insert into skills values (3, 'JAVA');
    insert into emp_skills values(1,1, 8);
    insert into emp_skills values(1,2, 9);
    insert into emp_skills values(1,3, 10);
    insert into emp_skills values(2,1,9);
    insert into emp_skills values(2,2,2);
    insert into emp_skills values(2,3,7);Now I need to come up with a query finding all employees who match all 3 of the following criteria:
    1) Have at least a 5 rating in SQL
    2) Have at least a 6 rating in PLSQL
    3) Have at least a 7 rating in JAVA
    So using this I would expect to return only SMITH since his/her skills meet all 3 criteria. I dont want to use OR in my query since I want all 3 to match not just one of them.
    I have a feeling I will need to self join the table - but this is going to be part of a dynamic query for APEX where the users can choose the skills and ratings they want employees to adhere to, so I dont know the number of criteria or the exact criteria in advance. But I figure if I can get a proof of concept SQL I can make it work dynamically.
    Any ideas are appreciated - sorry for the long post but I figure more detail is better

    with es1 as(
    select s.skill_code, es.empno, es.rating
    from skills s, emp_skills es
    where s.skill_id = es.skill_id
    /* main */
    select e.*
    from emp e
    where
    exists
    (select 'x' from es1
    where es1.rating >= 5
    and es1.skill_code = 'SQL'
    and es1.empno = e.empno)
    and
    exists
    (select 'x' from es1
    where es1.rating >= 6
    and es1.skill_code = 'PLSQL'
    and es1.empno = e.empno)
    and
    exists
    (select 'x' from es1
    where es1.rating >= 7
    and es1.skill_code = 'JAVA'
    and es1.empno = e.empno)
    -- Addition (Another example)
    with es1 as(
    select s.skill_code, es.empno, es.rating
    from skills s, emp_skills es
    where s.skill_id = es.skill_id
    /* main */
    select e.*
    from emp e
    where
    (select count(distinct es1.skill_code) from es1
    where
    ((es1.rating >= 5 and es1.skill_code = 'SQL')
    or
    (es1.rating >= 6 and es1.skill_code = 'PLSQL')
    or
    (es1.rating >= 7 and es1.skill_code = 'JAVA')
    and es1.empno = e.empno)
    =3;

  • TIMESTAMP in the ABAP table

    Hello all,
    Trying to create a table that has TIMESTAMP as a field and so that whenever the record is touched, the data in the TIMESTAMP field will change. As of now, I only see DATS and TIMS available fields for use in this table.
    Is there another type that will use both DATE and TIME (in seconds)?
    TIA

    I like to use tcode se84 for this type of search.
    Look in dictionary/data elements/
    enter "time" in the Short Description field     asterisktimeasterisk
    press F8
    search the list for "date"
    You will find many date/time data elements.
    Bruce
    Edited by: Bruce Tjosvold on Jul 24, 2008 6:23 PM
    Edited by: Bruce Tjosvold on Jul 24, 2008 6:24 PM
    Edited by: Bruce Tjosvold on Jul 24, 2008 6:25 PM

  • Update and Select from the same table

    Hello,
    i have this select - i tested it and its working
    [code]
    select
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTBT
    else DTF_REEW_201301.KTBT - CTF_REEW_KUM_201301.KTBT
    end
    as KTBT_ISO,
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTZN
    else DTF_REEW_201301.KTZN - CTF_REEW_KUM_201301.KTZN
    end
    as KTZN_ISO,
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTAB
    else DTF_REEW_201301.KTAB - CTF_REEW_KUM_201301.KTAB
    end as KTAB_ISO,
    DTF_REEW_201301.brnrn,
    DTF_REEW_201301.ktat
       from
    reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq.DTF_REEW_201301 DTF_REEW_201301
       where
    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1)
    [/code]
    With the result from KTBT_ISO, KTZN_ISO and KTAB_ISO i want to update the table "reewdq.DTF_REEW_201301" - and this table is in the select-statement!
    I believe, i tried every update-statement - but no update is working.
    I need something like this:
    [code]
    update reewdq.DTF_REEW_201301 t1 set t1.KTBT_ISO=
    select
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTBT
    else DTF_REEW_201301.KTBT - CTF_REEW_KUM_201301.KTBT
    end
    as KTBT_ISO
       from
    reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq.DTF_REEW_201301 DTF_REEW_201301
       where
    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1)
    t1.KTZN_ISO=
    select
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTZN
    else DTF_REEW_201301.KTZN - CTF_REEW_KUM_201301.KTZN
    end
    as KTZN_ISO
       from
    reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq.DTF_REEW_201301 DTF_REEW_201301
       where
    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1)
    t1.KTAB_ISO=
    select
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTAB
    else DTF_REEW_201301.KTAB - CTF_REEW_KUM_201301.KTAB
    end as KTAB_ISO
       from
    reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq.DTF_REEW_201301 DTF_REEW_201301
       where
    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1)
    [/code]
    But this code isn´t working. Has someone an idea please? Can someone please help me.
    Best regards
    Heidi

    Use MERGE:
    merge
      into reewdq.DTF_REEW_201301 t1
      using (
             select  case
                       when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTBT 
                       else DTF_REEW_201301.KTBT - CTF_REEW_KUM_201301.KTBT
                     end as KTBT_ISO,
                     case
                       when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTZN 
                       else DTF_REEW_201301.KTZN - CTF_REEW_KUM_201301.KTZN
                     end as KTZN_ISO,
                     case
                       when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTAB 
                       else DTF_REEW_201301.KTAB - CTF_REEW_KUM_201301.KTAB
                     end as KTAB_ISO,
                     reewdq.ROWID as rid
               from  reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301, 
                     reewdq.DTF_REEW_201301 DTF_REEW_201301
               where DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
                 and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT
                 and CTF_REEW_KUM_201301.KTMO = DTF_REEW_201301.KTMO - 1
            ) t2
      on (
          t1.rowid = t2.rid
      when mathed
        then
          update
             set t1.KTBT_ISO = t2.KTBT_ISO,
                 t1.KTZN_ISO = t2.KTZN_ISO,
                 t1.KTAB_ISO = t2.KTAB_ISO
    SY.

  • And condition within the same table

    Hello all,
    Was wondering if anyone knows what's the best and most efficient way to query for something similar to the example below.
    Table1
    ID CID VALUE
    1 1 a
    2 2 b
    3 3 c
    4 1 c
    Find me all customer id where value is a and c
    This should only bring back cid = 1.
    Thanks in advance

    select cid from table1 t1 where value='a'
    and exists (select 1 from table1 t2 where t2.cid = t1.cid and t2.value='b');note: untested

  • How to find the timestamp and SCN in the standby database?

    Hai,
    I have Oracle 9.2.0.4 RAC with 2 nodes in the production. The logs generated at these servers will be manully moved to my standby database and will be applied. To know what isthe maximum log files applied in the standby database, i am using the below mentioned query in the standby database,
    Select thread#,max(sequence#) from v$log_history group by thread#
    In general i am using "recover standby database until cancel" command and then checking the database with the above mentioned query whether all the logs are applied or not.
    If i use time based or scn based recovery in standby database i.e., "recover standby database until time <time>" or "recover standby database until change <scn number>" , after completion of the recovery, apart from the message "Media recovery complete" or by seeing the alert log, is there any way to query the standby database, so that i can identify the time or scn upto which the archived redo log files got applied.

    Hi Sridhar,
    There should be some view which will have applied_scn information. There is one more option i can suggest, you can create a heart beat table in production with 2 column like scn and timestamp. Update this table every minute. From standby db you can query this table and get fair idea on applied_scn and timestamp.
    While exporting you can export using flashback_scn by taking the value from heartbeat table of standby.
    This heartbeat table is used very common in streams environment. Just see if this helps you.
    hth,
    http://borndba.com

  • Best way to replicate a directory share to a new Windows 2012 serv, keeping all permissions and timestamps the same?

    We have a legacy Windows 2008 R2 server, with a single network share on it, that was acting as a primary file share.   Inside the network share are about a dozen different folders (with subfolders) all with different permissions applied to them at the
    folder and file level.   
    I want to migrate/copy this entire directory structure to a new Windows 2012 Standard server, keeping all the timestamps, permissions, etc. exactly as they are on the old directory structure.  Both servers are part of the same single Windows 2008 R2
    domain.
    What would the best practice method for achieving this?  Using XCopy?   If so, what syntax would I want to use with the command to make sure I don't lose any permissions or change any data and timestamps during the migration?

    Hi 
    I recommend you use robocopy to accomplish it.
    Technet Guide for robocopy command:http://technet.microsoft.com/en-us/library/cc733145(v=ws.10).aspx
    Microsoft RoboCopy GUI tool. Tool
    link: http://www.myitforum.com/articles/15/view.asp?id=9433
    Note: Its always good test in test environment, before applying it to production servers
    Regards, Ravikumar P

  • How to read data from flatfile and insert into other relevant tables ? Please suggest me the query ?

    Hi to all,
    I have flat files in different location through FTP i need to fetch those files and load in the relavant table of the database.
    Please share me the query to do it ..

    You would need a ForEach Loop to iterate though the files. Initially the FTP task will pull the files from locations to a landing folder. Once thats done the ForEachLoop will iterate through files in the folder and will have a data flow task inside to transfer
    file data to tables.
    If you want a more secure option you can also use SFTP (Secured FTP) and can implement it using free WinSCP clinet. I've explained a method of doing it fo dynamic files here
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    for iterating through files see this example
    http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
    you may not need the validation step inside the loop in your case
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to have concurrent CSV upload and manual edit in APEX on the same table

    Hi there,
    my users want to have csv upload and manual edit on apex pages functions together...
    it means they want to insert the data by csv upload and also have interactive report and form on the same table...
    so if user A changes something in csv file...then user B update or delete another record from apex fronted (manually in the apex form)...then after that user A wants to upload the csv file,the record was changed by user B would be overwritten ...
    So how can I prevent it?????

    Hi Huzaifa,
    Thanks for the reply...
    I'm going to use File Browser so that end users can upload the files themselves...
    after editing data by users...a manger going to review it and in case of approval , i need to insert the data to one final table....
    so it needs much effort to check two source tables and in case of difference between table of csv and other one...what to do...

  • To find the size of the fact table and dimension table

    Hi experts,
    Can anyone plz tell me if i want to find size of the fact table and size of the dimension table to find cardinality and line item do we first build statistics then find size by transaction DB02 or any other method we have?
    Thanks in advance

    Hi ,
    Please go to Tcode DB02 >Space>Table and Indexes.Give your table name or pattern (like /BIC/F* for gettinf all the Fact tables)
    .This will give you sizes of all the table.
    Also if you want to get list like TOP 30 Fact tables and Dimension Table.Please use TCode ST14, this will give a desired output with all the required details.
    -Vikram

  • Capturing the DML changes on the source and writing to a temporary table

    Am trying to set up a change data capture where both the source and target would be the same database.
    like in my case i would like to capture changes from a table schema.xyz in a orcl database and write it to a temp table within the same database. My concern here is , the table schema.xyz is already replicating to a different database on a different server.
    Any ideas on how this can be achieved?
    I thought of setting up a different extract process and capture the changes and write to the temp table , but not sure if this is manageable.
    Thanks,
    Venky.

    Just tap into the existing trail if the change data is already there. There's no need to have a second extract in that case. So ADD REPLICAT and specify the EXTTRAIL the same as the EXTTRAIL for the redo log extract.
    OGG won't pick up truncates by default. If the row is gone before the update arrives at the target table then you can use INSERTMISSINGUPDATES. When using this parameter make sure that you add supplemental logging (ADD TRANDATA) for columns that you need but that may not be updated (e.g. target columns with NOT NULL or FK constraints).
    Good luck,
    -joe

Maybe you are looking for

  • Can you give advise on my New Computer?

    My company is upgrading our edit systems:  This is basically what we are getting.  This is pretty much the limit.  Would you recommend any minor changes? Edit Software: Adobe CS6 Master Collection Two 3.06GHz 6-Core Intel Xeon (12 cores) 32GB (8x4GB)

  • Report on Workcenter performance, capacity and requirement

    Hi All, Could any one tell me how to build a report on workcenter performance and workcenter requirement and Capacity. Is there any standard cube available for this? I already checked 0PP_C03 and 0PP_C13. I'm not sure whether these will suffice or no

  • Issue related to View Configuration in EHP1.

    Hi All, We have upgraded CRM system from 6.0 to EHP1. There is some issue with the custom configurations for different components. In 6.0, custom configurations had been done to bring custom fields(EEWB) on web ui. Now in the upgraded system, on Web

  • Anyone heard anything more about shipping?

    I successfully ordered my phone last night. Now I'm wondering if anybody has gotten any more information about what the shipping date will be (beyond the fact that the shipping confirmation says 2/10).

  • Missing a file in the Adobe Download Assistant?

    I use Windows 7. Hello (Sorry if this question has been asked before; I made a search and nothing came up that could answer my question) I tried to download the Premiere CS6 trial. I saved it on my desktop. Then I tried to run the file (I opened it u