SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 writing into a Text file in a remote system
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

krishnan_sn
Starting Member

India
14 Posts

Posted - 12/09/2005 :  12:13:12  Show Profile
Hi,

I want to write some text into a text file. The text file will be placed in a remote system and the Sql db server is a separate system. I guess there should be some stored proc which would do the above task. but i am not aware of this. This piece of Sql statements should be called from a trigger.(when some DML operations are performed in a table then the trigger would fire and write the contents into the file.)
Can anyone guide me how can i do this. will there be any security contraints/problems in writing into a file in one system from the other system.
sample code would be much appreciated.

Regards,
Krishnan


S.Navaneetha Krishnan

Kristen
Test

United Kingdom
22403 Posts

Posted - 12/09/2005 :  23:55:02  Show Profile
Are you replacing your database with a flat file system?

Because that 's what it sounds like ...

Kristen
Go to Top of Page

krishnan_sn
Starting Member

India
14 Posts

Posted - 12/12/2005 :  01:34:29  Show Profile
Hi,

No. My Database will remain in same format. what i need is to append or delete the existing contents in a existing Text file and replace it with some new contents. The text file will remain in a separate system and the database will be in separate system.

Regards
Krishnan

S.Navaneetha Krishnan
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22755 Posts

Posted - 12/12/2005 :  01:38:06  Show Profile  Send madhivanan a Yahoo! Message
You can access that file using \\SysName\$DriveName\FileName
Cant you?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Kristen
Test

United Kingdom
22403 Posts

Posted - 12/12/2005 :  01:56:10  Show Profile
Well, sorry, but I think its a bad idea. I would process the text files in batches, rather than as part of a transaction.

Kristen
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000