Read Urgent
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Read Urgent

  1. #1
    Join Date
    May 2000
    Location
    OHIO
    Posts
    20
    Hi, I need a script, that goes out and looks at all the Datafiles
    and I need to spool it to file, and I need to specify a remove command in front of it, Is there a select statment script for that


    TR
    Rahul Khana

  2. #2
    Join Date
    Sep 2000
    Posts
    43
    set echo on
    spool datafile_status
    desc v$datafile
    set head off
    select * from v$datafile;
    desc dba_data_files
    select * from dba_data_files;
    exit;

    But why would you like to have remove statement for a datafile?
    Alla S. Pfauntsch
    Oracle DBA
    ========================================
    "Life is what happens while you are planning something else".

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    I'm probably shooting myself in the foot, but:

    set pages 0
    set trimout on
    spool deleteme.ksh
    select 'rm -f ' || file_name from dba_data_files;
    spool off

    [Edited by marist89 on 12-05-2000 at 05:25 PM]
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4
    Join Date
    Jun 2000
    Posts
    417
    if you're spooling a sql file instead of a shell script you'll need a "!" or "host" in front of the rm.

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