0

I am going to use the FTP task tool to pull a file into the SQL server from a remote host. Is stored procedure the best way to execute a query contained within the file without doing it manually?

1 Answer 1

1

You may try like this:

EXEC xp_cmdshell  'sqlcmd -S ' + @DBServerName + ' -d  ' + @DBName + ' -i ' + @FilePathName
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.