Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005

    Unanswered: Query from a remote computer

    Hi all,

    I need to run a simple select query on a remote DB from my desktop and save the results in a text file on my desktop. I am planning on setting it up as a scheduled task in windows.

    I tried using the following

    "echo exec dbms_output.putline(desc campaign_0_A) >> C:\test.txt; | sqlplus username/pwd@DBSERVER"
    But, it puts out the text 'desc campaign_0_A' in the output file test.txt. Can I use dmbs_output command to do this? Or something else?

    Thanks a lot in advance!

  2. #2
    Join Date
    Jul 2003
    in your sql file:

    PHP Code:
    spool C:\test.txt
    /** your sql code **/
    spool off
    then in your BAT file:
    PHP Code:
    sqlplus username/pwd@DBSERVER @c:\sql_file_name.sql 
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Mar 2005
    Thanks a lot!! It works perfectly!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts