Reputation: 38255
When get a .sql file, how do you execute it? Double click to open it and press F5? Is there any other way to execute it and also able to see the execution result. Thanks.
Upvotes: 0
Views: 3118
Reputation: 65476
for example
osql -D db_name -S server_name -U username -P password -i sqlfile
or
sqlcmd -D db_name -S server_name -U username -P password -i sqlfile
or you can use -E instead of user and password to do integrated security
Upvotes: 3