September 17, 2015 at 2:53 pm
I have a .sql script I want to run from sqlcmd. It worked with osql but when I run as a SQL job, I get executed as user NT service\sqlserveragent. sqlcmd -d missing argument
sqlcmd -E -S OLBGL -i c:\scripts\312102.sql -o \\servername\d$\file_shares\ftspgmr\Retail\test.rpt -n -w 255
Job Step
Name =TEST
Type = Operating system (cmdExe)
Please advise
September 18, 2015 at 1:14 pm
It wants to know what database to execute the command in. If you have USE in your script then you can just provide -d master
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply