what is the alternative for oracle's UTL_FILE in SQL serverHi
You dont have anything like UTL_FILE in SQL Server.
If you want the output to be returned to a disc,
in the query analyer tool,
from the Menu Query > Result to File
if u execute the query in the query analyser, it promps you to output the
file to a flat file
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"Chandra" wrote:
> what is the alternative for oracle's UTL_FILE in SQL server|||or probably this can help you:
http://seclists.org/lists/pen-test/2002/Mar/0049.html
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"Chandra" wrote:
> Hi
> You dont have anything like UTL_FILE in SQL Server.
> If you want the output to be returned to a disc,
> in the query analyer tool,
> from the Menu Query > Result to File
> if u execute the query in the query analyser, it promps you to output the
> file to a flat file
>
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://www.SQLResource.com/
> ---
>
> "Chandra" wrote:
>|||--Open file for writing
v_OutputFileHandle:=UTL_FILE. FOPEN(FileDirectory,FileName,'w',32767);
UTL_FILE.put_line(v_OutputFileHandle,'REM All Rights Reserved.');
I need to migrate the above lines from Pl/SQL to T-SQL for the same
functionality.
Any help'
"Chandra" wrote:
> Hi
> You dont have anything like UTL_FILE in SQL Server.
> If you want the output to be returned to a disc,
> in the query analyer tool,
> from the Menu Query > Result to File
> if u execute the query in the query analyser, it promps you to output the
> file to a flat file
>
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://www.SQLResource.com/
> ---
>
> "Chandra" wrote:
>|||Yes, I can understand that,
but UTL file cannot be used in SQL Server.
you can try this which is similar:
exec master..xp_cmdshell 'isql -U [username] -P [password] -S . -d pubs -q
"select * from employee" -o "c:\result.sql"'
please remember that the options are case sensitive. try executing the query
and u see the output in the file result.sql in the folder "C"
please let me know if u have any questions
please substitute usrname and pwd also
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"Chandra" wrote:
> --Open file for writing
> v_OutputFileHandle:=UTL_FILE. FOPEN(FileDirectory,FileName,'w',32767);
> UTL_FILE.put_line(v_OutputFileHandle,'REM All Rights Reserved.');
> I need to migrate the above lines from Pl/SQL to T-SQL for the same
> functionality.
> Any help'
> "Chandra" wrote:
>|||I typed in my local Query analyser the following statement
exec master..xp_cmdshell 'isql -U sa -P sa -S . -d pubs -q
"select * from employee" -o "c:\result.sql"'
after executing this statement it did not create any result.sql in C.
in the output pane, there is one columnwith name 'output' and in that there
is one row with value "1>"
what's wrong with this statement?
please feel free to ping me on my MSN messenger (anilchander@.hotmail.com)
"Chandra" wrote:
> Yes, I can understand that,
> but UTL file cannot be used in SQL Server.
> you can try this which is similar:
> exec master..xp_cmdshell 'isql -U [username] -P [password] -S . -d pubs -q
> "select * from employee" -o "c:\result.sql"'
> please remember that the options are case sensitive. try executing the que
ry
> and u see the output in the file result.sql in the folder "C"
> please let me know if u have any questions
> please substitute usrname and pwd also
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://www.SQLResource.com/
> ---
>
> "Chandra" wrote:
>|||Hi Anil
Please check that the result sql file will be saved in the directory of SQL
Server.
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"Chandra" wrote:
> I typed in my local Query analyser the following statement
> exec master..xp_cmdshell 'isql -U sa -P sa -S . -d pubs -q
> "select * from employee" -o "c:\result.sql"'
> after executing this statement it did not create any result.sql in C.
> in the output pane, there is one columnwith name 'output' and in that ther
e
> is one row with value "1>"
> what's wrong with this statement?
> please feel free to ping me on my MSN messenger (anilchander@.hotmail.com)
>
> "Chandra" wrote:
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment