RE: Send output to file in SQL

From: Jonah Kowall (jkowall@psteering.com)
Date: 03/15/02


Date: Fri, 15 Mar 2002 13:36:36 -0500
From: "Jonah Kowall" <jkowall@psteering.com>
To: "Alex Harasic" <aharasic@terra.cl>, <pen-test@securityfocus.com>

Are you running mssql 2000 or an earlier version? If you are running
2k, then you may be able to use the sp_makewebtask stored procedure.

Or you can run isql from the command line:

If you want the output to a .txt file just use isql at a cmd prompt
(%MSSQLPATH%\binn\isql > c:\mssql\binn\isql) with the parameter -o for
outputfile and use -q for the query or -i for inputfile (if you got
several statements).

c:\mssql\binn\isql -Usa -P -ddb1 -Sserv1 -i in.sql -o out.txt
where: -Usa > user, -P > password, -ddb1 > your database, -i in.sql >
your input file, -o out.txt > your output file.

> -----Original Message-----
> From: Alex Harasic [mailto:aharasic@terra.cl]
> Sent: Wednesday, March 13, 2002 12:05 PM
> To: pen-test@securityfocus.com
> Subject: Send output to file in SQL
>
>
>
>
> Hi, I've been looking around for ways to send output
>
> to a file in a sql query. I know there is one for mySQL
>
> but not for msSQL.
>
>
>
> Anyone knows a way to send the output in a query
>
> without using extended procedures?
>
>
>
>
>
> Alex S. Harasic
>
> aharasic@terra.cl
>
> --------------------------------------------------------------
> --------------
> This list is provided by the SecurityFocus Security
> Intelligence Alert (SIA) Service. For more information on
> SecurityFocus' SIA service which automatically alerts you to
> the latest security vulnerabilities please see:
https://alerts.securityfocus.com/

----------------------------------------------------------------------------
This list is provided by the SecurityFocus Security Intelligence Alert (SIA)
Service. For more information on SecurityFocus' SIA service which
automatically alerts you to the latest security vulnerabilities please see:
https://alerts.securityfocus.com/



Relevant Pages

  • RE: MS Office Files
    ... You are trying to trace back to a particular machine I ... > This list is provided by the SecurityFocus Security ... > Intelligence Alert Service. ... > SecurityFocus' SIA service which automatically alerts you to ...
    (Pen-Test)
  • RE: Laboratory Setup Help (RS)
    ... >> This list is provided by the SecurityFocus Security ... For more information on SecurityFocus' SIA service which ... >> vulnerabilities please see: ... >This list is provided by the SecurityFocus Security Intelligence Alert ...
    (Pen-Test)
  • RE: Terminal Server brute force
    ... This utility helps automate manual login/password attempts. ... > This list is provided by the SecurityFocus Security ... For more information on SecurityFocus' SIA service which ... This list is provided by the SecurityFocus Security Intelligence Alert ...
    (Pen-Test)
  • RE: Cant get a shell
    ... If the firewall is the issue, ... > This list is provided by the SecurityFocus Security ... For more information on SecurityFocus' SIA service which ... This list is provided by the SecurityFocus Security Intelligence Alert ...
    (Pen-Test)
  • Re: Send output to file in SQL
    ... the main idea of my posting was to create a file using sql ... > This list is provided by the SecurityFocus Security ... > SecurityFocus' SIA service which automatically alerts you to ... This list is provided by the SecurityFocus Security Intelligence Alert ...
    (Pen-Test)