Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

colinmitton

Technical User
Feb 24, 2005
190
0
0
GB
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.

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


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
 
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]
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top