This discussion is archived
3 Replies Latest reply: Nov 11, 2013 12:43 PM by 967250 RSS

Pipe Delimited File Backup

967250 Newbie
Currently Being Moderated

Hi All,

 

I have a special requirement which states that I need to back up all the tables in my schema as a pipe delimited file containing the column names as well as the data. I know there are a lot of better ways to back up but this is what the requirement is. I was thinking of using the UTL_FILE package. However since I am pretty new to development I have very little idea as to how to do it. I was thinking about going to all_tables and selecting each table and their corresponding columns from all_tab_cols and then get it inside a loop so as to export for each table through each iteration.

 

Am I thinking in the right track? Can anyone please help me with a sample code so as to start the thing.

 

Thank you in advance for all your help.

  • 1. Re: Pipe Delimited File Backup
    Etbin Guru
    Currently Being Moderated
  • 2. Re: Pipe Delimited File Backup
    rp0428 Guru
    Currently Being Moderated
    I have a special requirement which states that I need to back up all the tables in my schema as a pipe delimited file containing the column names as well as the data. I know there are a lot of better ways to back up but this is what the requirement is.

    Sorry - I don't believe at all that you have such a 'special requirement'.

     

    No one that I have ever worked with in over 20 years would use such a 'backup' strategy since there is absolutely no reason for it. Oracle provides out-of-the-box functionality for producing backups that is reliable.

     

    When I have seen people wanting to do this it is usually because they are NOT authorized to create backups and are not authorized to create their own personal copies of the data. If the tables and data are really yours then you should already have the DDL for all of the tables and the extraction of the data can be easily done using a tool such as sql developer, or Toad.

     

     

     

  • 3. Re: Pipe Delimited File Backup
    967250 Newbie
    Currently Being Moderated

    Thanks Etbin.

     

    That was exactly what i was looking for

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points