-
SQL Server 2000: Write message to text file
How do you reliably and efficiently write a message to an operating system
level text file? I am trying to use the Microsoft(R) OLE Automation stored
procedures sp_OACreate() etc.
From Query Analyzer, I can successfully create, destroy and use methods on
the Scripting.FileSystemObject class. Any message is written to the named
file.
However, when the code is incorporated into a stored procedure that is executed
from a COM+ component that is used from an Active Server Page, there is nothing
written to the file.
I have checked the OS permissions (Windows 2000) and the directory and its
children are all EVERYONE=FULL CONTROL.
There are articles documenting the use of the command shell extended stored
procedure, but this is likely to perform like a snail super-glued to the
concrete.
Any comments or suggestions welcomed.
Many thanks, Mark
-
Re: SQL Server 2000: Write message to text file
see http://www.mssqlserver.com/faq/general-flatfile.asp
"Mark" <mtshipman@hotmail.com> wrote in message
news:3cf2df8b$1@10.1.10.29...
>
> How do you reliably and efficiently write a message to an operating system
> level text file? I am trying to use the Microsoft(R) OLE Automation stored
> procedures sp_OACreate() etc.
>
> From Query Analyzer, I can successfully create, destroy and use methods on
> the Scripting.FileSystemObject class. Any message is written to the named
> file.
>
> However, when the code is incorporated into a stored procedure that is
executed
> from a COM+ component that is used from an Active Server Page, there is
nothing
> written to the file.
>
> I have checked the OS permissions (Windows 2000) and the directory and its
> children are all EVERYONE=FULL CONTROL.
>
> There are articles documenting the use of the command shell extended
stored
> procedure, but this is likely to perform like a snail super-glued to the
> concrete.
>
> Any comments or suggestions welcomed.
>
> Many thanks, Mark
-
Re: SQL Server 2000: Write message to text file
"David Satz" <davidNOSPAMsatz@yahoo.NOSPAM.com> wrote:
>see http://www.mssqlserver.com/faq/general-flatfile.asp
>
>"Mark" <mtshipman@hotmail.com> wrote in message
>news:3cf2df8b$1@10.1.10.29...
>>
>> How do you reliably and efficiently write a message to an operating system
>> level text file? I am trying to use the Microsoft(R) OLE Automation stored
>> procedures sp_OACreate() etc.
>>
>> From Query Analyzer, I can successfully create, destroy and use methods
on
>> the Scripting.FileSystemObject class. Any message is written to the named
>> file.
>>
>> However, when the code is incorporated into a stored procedure that is
>executed
>> from a COM+ component that is used from an Active Server Page, there is
>nothing
>> written to the file.
>>
>> I have checked the OS permissions (Windows 2000) and the directory and
its
>> children are all EVERYONE=FULL CONTROL.
>>
>> There are articles documenting the use of the command shell extended
>stored
>> procedure, but this is likely to perform like a snail super-glued to the
>> concrete.
>>
>> Any comments or suggestions welcomed.
>>
>> Many thanks, Mark
>
>
Try using the xp_commandshell stored proc to generate a text file.
It is fairly quick and easy to use if you have access to the xp stored procs.
Mark W.
-
Re: SQL Server 2000: Write message to text file
it is xp_cmdshell and that is what the FAQ I referenced suggested...
"MarkW" <JTNMUFVHDMXI@spammotel.com> wrote in message
news:3cf52f6c$1@10.1.10.29...
>
> "David Satz" <davidNOSPAMsatz@yahoo.NOSPAM.com> wrote:
> >see http://www.mssqlserver.com/faq/general-flatfile.asp
> >
> >"Mark" <mtshipman@hotmail.com> wrote in message
> >news:3cf2df8b$1@10.1.10.29...
> >>
> >> How do you reliably and efficiently write a message to an operating
system
> >> level text file? I am trying to use the Microsoft(R) OLE Automation
stored
> >> procedures sp_OACreate() etc.
> >>
> >> From Query Analyzer, I can successfully create, destroy and use methods
> on
> >> the Scripting.FileSystemObject class. Any message is written to the
named
> >> file.
> >>
> >> However, when the code is incorporated into a stored procedure that is
> >executed
> >> from a COM+ component that is used from an Active Server Page, there is
> >nothing
> >> written to the file.
> >>
> >> I have checked the OS permissions (Windows 2000) and the directory and
> its
> >> children are all EVERYONE=FULL CONTROL.
> >>
> >> There are articles documenting the use of the command shell extended
> >stored
> >> procedure, but this is likely to perform like a snail super-glued to
the
> >> concrete.
> >>
> >> Any comments or suggestions welcomed.
> >>
> >> Many thanks, Mark
> >
> >
> Try using the xp_commandshell stored proc to generate a text file.
> It is fairly quick and easy to use if you have access to the xp stored
procs.
>
> Mark W.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks