Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2007
    Posts
    3

    Unanswered: How to create incremental Spool Files

    Hi, I would be glad if anybody could help me out, in creating spool files with different names probably in sequence, so that a backup of each and every file could be taken......

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    In thinking about this situation I realized that when Oracle was faced with a similar challenge, a different solution was implemented for trace file names.
    Oracle uses the Operating System Process_ID (PID) as the unique identifier for tracefile names.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Sep 2007
    Posts
    3

    Pls elaborate on PID

    I would be thankful if you could elaberate on the solution viz...PID????

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    I extrapolated your question to mean you wanted a unique ID# embedded within filename.
    Oracle solved this by using PID# as the uniqueID# as part of their trace filename.
    Alternatively, you could use TIMESTAMP value.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    The easiest way is as follows


    create sequence spool_file_seq; --- Done only once


    Code:
    column spool_file new_value spool_file noprint
    set head off
    select 'C:\MY_Path\backup_'||to_char(spool_file_seq.nextval,'fm99999999')||'.txt' spool_file
    from dual;
    set head on
    
    spool &spool_file
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  6. #6
    Join Date
    Sep 2007
    Posts
    3

    Tnakx a ton

    Dear freind,

    your suggestion has helped me a lot and it has actually worked in a second, just like a miracle.........

    Thanks a lot..........................

    with very best regards
    Shaivi bansal

Posting Permissions

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