• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

tool for running SQL script remotely...

I haven't had any experience with this, but I have a SQL script that I need to run remotely on one of my SQL servers. How can I run this on the remote server? Is there a tool or something so I can save the file as an .sql file and then run it from my machine?
1 Solution
You can use SQL server management studio, you just have you make sure that your SQL server allows remote connections and connect to that server from your management studio.
willlandymoreAuthor Commented:
I can't really pop open the studio and then paste in the query and then run it manually, it would have to be automatic. Could I schedule this from within Management Studio like you can with backups, etc. and have it run every day if I save the query as a .sql file?
You can create a SQL job to run a script on a schedule.


Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

The utility you are looking for is called


you execute from a windows command line


willlandymoreAuthor Commented:
that looks like what I'm looking for as far as specifying the file and output file, but how can I schedule that one to run at certain times?
willlandymoreAuthor Commented:
forget I asked... :)

I just put it in a batch file and then scheduled it and it was fine.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now