Link to home
Create AccountLog in
Avatar of panasonic2012
panasonic2012

asked on

run sql files through batch file

i need to run few sql files that hv stored procudures in them through a batch files , i dont know anything much abt how to do that , plz help with an example
Avatar of Pratima
Pratima
Flag of India image

sqlcmd -E -S yoursqlinstance -i backup.sql
refer for more details
http://stackoverflow.com/questions/3294545/how-to-run-sql-file-from-a-batch-file
ASKER CERTIFIED SOLUTION
Avatar of Pratima
Pratima
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of panasonic2012
panasonic2012

ASKER

ok i ran it and it works fine , now i need is to run the batch file to another pc on the network so the sql execution occurs on tht pc , how do i achieve this ?? plz help