Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Create txt file after Stored Procedure

Author  Topic 

veparala
Starting Member

30 Posts

Posted - 2006-09-26 : 16:28:18
I have a stored procedure to schedule everyday. I need SQL server to create txt file after the job completes successfully. I woud like to store this txt file in client system not in the sql server system.

Please help me.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-26 : 17:11:32
What will the text file have in it?

Tara Kizer
Go to Top of Page

veparala
Starting Member

30 Posts

Posted - 2006-09-26 : 17:13:09
It can be anything like any text 'hello'. It can be empty also.

Utmately i need one file.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-26 : 17:18:46
You can use xp_cmdshell to in SQL Server. xp_cmdshell let's you run DOS commands. You can use the type DOS command to create a new file with whatever you need in it. To create it on a remote server, just make sure to fully qualify the file using a UNC path. Since this is in a job, the SQL Server service account will need to access to this remote server.

Tara Kizer
Go to Top of Page
   

- Advertisement -