Search code examples
sqloracleoracle-sqldeveloper

Export automatically


I work in a company, and i need to export one request SQL to CSV every month. I need to register this file in folder on the server of the company. I work with Oracle (sql developer). Is this posible ?

Do you have any ideas or a way to resolve my problem ?


Solution

  • "Every month" leads to a scheduled job - use DBMS_SCHEDULER package to create it (or, if you're on older database versions, see DBMS_JOB).

    "CSV file" leads to usage of a stored procedure and UTL_FILE package.

    At the end, you'd have a job which periodically calls the stored procedure which - using UTL_FILE - creates a CSV file in a directory on the database server.