Reputation: 43
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 ?
Upvotes: 0
Views: 76
Reputation: 309
You can configure your Oracle Server(NOT client) to SPOOL with tool UTL_FILE.
If you want to do it more faster, you can do it with command SPOOL into .SQL file. There are some specifications like: you must to redirect the output to > /dev/null for example, but it is more eazy.
Upvotes: 0
Reputation: 142710
"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.
Upvotes: 1