• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2001
  • Last Modified:

SQLPLUS command

I am trying to create a spool file from an SQL query, that I want to set up and run as a scheduled task.

The problem is the query ends up in the spool file along with the output.  I want to eliminate the query from the spool file and just have the results of the query in the spool file.  What are the command to 'hide' the query showing up in the spool file?
0
cat200757
Asked:
cat200757
  • 3
  • 2
1 Solution
 
ajitha75Commented:
try
SET ECHO Off
0
 
cat200757Author Commented:
That did not work it still shows the query along with the output
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
SET ECHO OFF is the correct command, though.
can you show the script how you use it?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
ajitha75Commented:
Instead of directly running the query, place it in a sql file and run using START command and then try.
~akb
0
 
cat200757Author Commented:
This is the syntax I am using:

set echo off
spool d:\sniped.txt
select username, status from v$session
where status='SNIPED';
spool off
0
 
ajitha75Commented:
create a .sql file and copy the command "select username, status from v$session where status='SNIPED'  into it.

and then do the following

set echo off
spool d:\sniped.txt
START run.sql
spool off
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now