I want to connect to a server using its IP address. Then, I want to execute a .sql file kept on that servers drive. I also want to store the results of this sql in a text file on the server itself. Should i execute it as an sql task or run it as an extraction from database or something else ? I am not sure how to go about it. I need tips on how to proceed.
The database used is SQL server 2008.