INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Manually run a ad-hoc maintenance plan from a desktop PC

Manually run a ad-hoc maintenance plan from a desktop PC

(OP)
I have a MS-SQL 2008 SP3 server and I'm in the process of setting up a maintenance plan that will back up a database to file on a ad-hoc basis. So when I have any minor changes to happen to the server I have a good back up to return to! The file location is on the physical server and the current daily backup works in seconds to the same partition. (I want to keep the ad-hoc back ups in a different place so hence the separate plan)

My main problem is that when I'm not about I need someone else to run the maintenance plan for me, the person who needs to do it I don't want to give access to the server (RDP or alike) in case they start to play. Is there a way (via powershell or command line so I can create a batch file) to run a specific plan from a remote PC with out giving them SSMS. The PC in question is running Windows 7 32bit.

RE: Manually run a ad-hoc maintenance plan from a desktop PC

You can run your commands via SQLCMD. You can download it here:

http://www.microsoft.com/en-us/download/details.as...

Scroll down to: Microsoft® SQL Server® 2008 R2 Command Line Utilities

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: Manually run a ad-hoc maintenance plan from a desktop PC

(OP)
Thanks, I'm installing this on my PC now to try it out. Do I run a special command to run the plan or to I run the T-SQL command the plan generates?
Just so I can get aiming in the right direction! glasses

RE: Manually run a ad-hoc maintenance plan from a desktop PC

SQLCMD allows you to run queries as though you were running within SQL Server Management Studio (but without the GUI). To see what you can do, you should open a command prompt and then run

SQLCMD -?

This will show you all of the command line arguments for SQLCMD. One thing to note, the command line switches are case sensitive.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: Manually run a ad-hoc maintenance plan from a desktop PC

(OP)
Thanks, time to have a play :)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close