Guest_imported
New member
- Jan 1, 1970
- 0
I want to generate a text file when changes are made to a table. I wrote a trigger like this. If put any statements otherthan bcp statement it is working fine. Bcp statment is working fine in query analyzer. If i put the same in trigger query is not coming out after 5 minutes also and i am not able to access the table too.
create trigger gentextfile on region
for insert, update
as
exec master..xp_cmdshell 'bcp "select * from northwind..region" queryout c:\region.txt -c -Soffice -Usa -P'
Let me know if any other alternative is there.
create trigger gentextfile on region
for insert, update
as
exec master..xp_cmdshell 'bcp "select * from northwind..region" queryout c:\region.txt -c -Soffice -Usa -P'
Let me know if any other alternative is there.