September 2, 2009 at 11:45 am
I would like to use stored procedures for reading, parsing, executing programs and moving files across folders
Can a stored procedure in sql server 2000 perform the following:
1- Checks a specific folder for files. In other words, acts as a listener on the folder, if files get dumped in there, the stored procedure will execute. I would like to have it to listen always.
2- Parses a txt file. Open a txt file and searches for a string
3- Calls a program (vb or .exe) with a file name or path to a file as a parameter
if any of those is possible can you advice how. Also do you have any idea of alternatives to stored procedures?
Thanks a lot for your help
September 2, 2009 at 11:48 am
Definitely not something you want to try to do with T-SQL stored procs. That kind of thing is much easier to achieve in .NET, and it'll do a better job of it too.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
September 2, 2009 at 11:59 am
I was thinking of that but I am thinking now to centralize everything and work with tables since I have to open a file and check for a string and then map the file data to sql database. Then I have to extract some of that data from sql into a txt file after.
If you think .net is easier, how?
September 3, 2009 at 5:10 am
can anyone help please?
September 4, 2009 at 6:45 am
Given all the actions you're trying to do, SSIS might be a good solution. It can import data into SQL tables, run command line/exe actions, etc. Take a look at the overview for it (search "Integration Services" in Books Online), and see if it sounds like the right tool.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
September 4, 2009 at 9:34 am
thanks for your help
September 6, 2009 at 7:23 am
SQL Procedure can also be used.
i.e. you can use textcopy.exe to copy the files.
Regards,
Sarabpreet Singh 😎
Sarabpreet.com
SQLChamp.com
Twitter: @Sarab_SQLGeek
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply