DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Display the current time

  1. #1
    Join Date
    Jan 2002
    Posts
    474
    Could someone tell me how I can display the current time of the database????

    thanks

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    What's wrong with SYSDATE?
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    select to_char(sysdate, 'dd-mon-yyyy, hh24:mi:ss') as date_time from sys.dual
    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

  4. #4
    Join Date
    Jan 2002
    Posts
    474
    Thanks so much for both reply

    I have another question.

    I have an full export run everynight and I want to capture to the log the time to see how long it take to export the full database.


    For example


    EXP SYSTEM/MANAGER FILE=EXP_FULL.DMP LOG=EXP_FULL.LOG FULL=Y

    Please show me how to capture the time.


  5. #5
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    create am OS batch file/unix script to start your export.

    put the os date/time command at the begining.
    start the export
    finish with another date/time command
    redirect output to a file.
    study the output file.
    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

  6. #6
    Join Date
    Jan 2002
    Posts
    474
    Could you please give me more detail about

    "put the os date/time command at the begining" Etc


    Thanks

  7. #7
    Join Date
    Apr 2002
    Posts
    55
    Some [people] succeed by what they know; some by what they do; and a few by what they are.
    VenDe ChukPeen Zuri

    Someone who quotes himself as a DBA and posts simple question in forums is a big idiot to me . I donot care what others think

  8. #8
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    What OS u are using?
    If any unix then some idea for u:

    DB=sodom
    cat tpl_$DB.par | sed -e s/#DMP#/d_${DB}_$(date +%m%d%Y)/g > exp_$DB.par
    exp parfile=exp_sodom.par

    about current date/tine in filename.

  9. #9
    Join Date
    Apr 2001
    Location
    London
    Posts
    725
    Questions

    1.What is your OS
    2.Do you know any commands or the workings of your OS ?
    If not.. contact you OS manager for actual syntax.

    In unix your script would look something like this :

    date
    EXP SYSTEM/MANAGER FILE=EXP_FULL.DMP LOG=EXP_FULL.LOG FULL=Y
    date

    The script would be a cron job to run at a certain time and output redirected to a file,


    In windows you would use schedular to run a batch file at a certain time.

    If you haven't got a clue what I'm talking about, I suggest you contact your OS administrator. And get his/her advice.



    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

  10. #10
    Join Date
    Jan 2002
    Posts
    474
    I am on Wndows 2000 server

    Please advise


    Shureshy,

    I know how to use scheduler, but I want to capture the time of how long this export will run instead of looking into the property of the file.( I like to have this info capture to the log file)

    thanks



    [Edited by ashley75 on 07-03-2002 at 11:00 AM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width