?
Solved

Oracle 10g and SQL navigator schedule export

Posted on 2011-03-18
7
Medium Priority
?
1,372 Views
Last Modified: 2013-12-19
Hi,
I have installed a 10g Oracle Database. I use SQL Navigator v5.5 for several purposes. How i can create a schedule export (file) for a specific view?
0
Comment
Question by:c_hockland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 11

Expert Comment

by:Akenathon
ID: 35167703
SQL Navigator does not play a role here. You can either use OS tools to periodically invoke an OS script which uses expdp, or else use DBMS_SCHEDULER to create a job which invokes DBMS_DATAPUMP. See here for a full example on the latter: http://ergemp.blogspot.com/2008/02/scheduling-datapump-in-oracle-10g.html
0
 

Author Comment

by:c_hockland
ID: 35168030
First, where can i find DBMS_SCHEDULER? and second can u give me an example of an OS script?
0
 
LVL 11

Expert Comment

by:Akenathon
ID: 35168682
First: DBMS_SCHEDULER is a supplied package, it is created on every Oracle 10+ database. Click on the link to see the docs.

Second: You first need to tell me which OS you're running! For instance: in *nix systems you can use cron for scheduling, for Windows you have the scheduled tasks in the control panel. They both need to invoke expdp, click on the link to see the docs.

Please include full version numbers when asking a question, as well as a clear description of what you are trying to accomplish. I believe "create a schedule export (file) for a specific view" could be rephrased (maybe in some longer sentence?) that clarifies the exact goal.
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Comment

by:c_hockland
ID: 35168729
All i want is to export view "Per'" every one hour in a delimited file on a  windows 2003 server with oracle 10g.
0
 
LVL 11

Accepted Solution

by:
Akenathon earned 2000 total points
ID: 35169139
On a DELIMITED file? That's definitely NOT exporting. You want to schedule a WINDOWS task (nothing to do with Oracle or SQL navigator) that does this:

sqlplus -s username/password @select_from_per

Open in new window


...and then write a script per.sql with this content:

SET ECHO OFF LINESIZE 200 PAGESIZE 0 TRIMSPOOL ON TERMOUT OFF COLSEP ,

SPOOL select_from_per.txt

select * from per;

exit

Open in new window


If you have commas in your string data, instead of select * you will have to select '"' || your_string_field || '"' to enclose them in double quotes.
0
 
LVL 11

Expert Comment

by:Akenathon
ID: 35169147
Note: that is, assuming that when you say "a delimited file" you want to express "a comma delimited file". If you want another delimiter, change the comma after COLSEP on the first line of the SQL script
0
 

Author Closing Comment

by:c_hockland
ID: 35205485
Thanks a lot. It's working just fine.....
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question