Forum Stats

  • 3,855,322 Users
  • 2,264,499 Discussions
  • 7,905,968 Comments

Discussions

Export to file.

tbhluehorn
tbhluehorn Member Posts: 95 Red Ribbon
edited Nov 7, 2017 12:59AM in General Database Discussions

Good Afternoon,

I have access to a 11.2.0.3.0 database.    I would like to export the output of a select statement to a text file on a schedule once every hour.

I am working off of a windows 7 workstation.

Please discuss some viable options for this.

Tagged:

Answers

  • Unknown
    edited Nov 4, 2017 8:14PM

    Please discuss some viable options for this.

    The FIRST STEP is:

    Visit ALL of the threads you have created and mark them ANSWERED if they have been.

    Let us know when that has been done.

  • John Thorton
    John Thorton Member Posts: 14,493 Silver Crown
    edited Nov 4, 2017 8:25PM
    tbhluehorn wrote:Good Afternoon,I have access to a 11.2.0.3.0 database. I would like to export the output of a select statement to a text file on a schedule once every hour. I am working off of a windows 7 workstation. Please discuss some viable options for this. 

    Please  read the fine  HELP file

    C:\Users\SB920>schtasks /?

    SCHTASKS /parameter [arguments]

    Description:

        Enables an administrator to create, delete, query, change, run and

        end scheduled tasks on a local or remote system.

    Parameter List:

        /Create         Creates a new scheduled task.

        /Delete         Deletes the scheduled task(s).

        /Query          Displays all scheduled tasks.

        /Change         Changes the properties of scheduled task.

        /Run            Runs the scheduled task on demand.

        /End            Stops the currently running scheduled task.

        /ShowSid        Shows the security identifier corresponding to a scheduled task name.

        /?              Displays this help message.

    Examples:

        SCHTASKS

        SCHTASKS /?

        SCHTASKS /Run /?

        SCHTASKS /End /?

        SCHTASKS /Create /?

        SCHTASKS /Delete /?

        SCHTASKS /Query  /?

        SCHTASKS /Change /?

        SCHTASKS /ShowSid /?

  • tbhluehorn
    tbhluehorn Member Posts: 95 Red Ribbon
    edited Nov 6, 2017 10:29AM

    Hi rp0428, I reviewed the threads I have created and marked as many as I thought were answered as such.

    ty

  • top.gun
    top.gun Member Posts: 3,666 Gold Crown
    edited Nov 7, 2017 12:59AM

    For example you could do something like this:

    schtasks /create ^

    /sc minute ^

    /MO 60 ^

    /tn "special job" ^

    /tr "cmd /C echo select blah from blah;| sqlplus user/[email protected]" ^

    /f

This discussion has been closed.