How would you execute a stored procedure in SQL Server (using windows authentication) from a batch file?
If you are using Sql Server 2005+, you can use sqlcmd utility.
Example:
sqlcmd -Q "exec storedProcName" -S YourServer -d YourDatabase -o C:\yourOutput.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With