If you familiar with MSSQL maintenance plan and ever configured backup through this tool and you should know that to backup the MSSQL database to remote computer, you have to configure Log On setting from services.
Okay, today we assume that we couldn’t allow to change the setting from Log On setting and wish to set the schedule backup, we could use maintenance tool and batch command to schedule it.
Firstly, create a maintenance plan from MSSQL, then select “Back Up Database Task”. From Database(s) option, select your database name, you may specify the directory that wish to backup. From this article we make it to C:\mssql\backup\.
Next, create a batch file named mssql_backup.bat and insert command as below.
xcopy C:\mssql\backup "\\remote_server\c$\backup" /e /i /h /y
Where remote_server is your remote server name and you would like to place it to C:\backup.
Lastly, create Windows Task Scheduler and configure the mssql_backup.bat to run daily or weekly as your wish.
Do you ever try to reboot or shut down a server/PC within a network?
The mystery from Microsoft have done if you are running with administrator role, just try to the command as below if you could like to reboot/shutdown.
1. Open command prompt by Press Windows+R and type in cmd.
2. Type in “shutdown /m \\computername /r” if you could like to reboot.
The General format was as below:
shutdown \\computername /l /a /r /t:xx “msg” /y /c
- \\computername: Use this switch to specify the remote computer to shut down. If you omit this parameter, the local computer name is used.
- /l (Note that this is a lowercase “L” character): Use this switch to shut down the local computer
- /a: Use this switch to quit a shutdown operation. You can do this only during the time-out period. If you use this switch, all other parameters are ignored.
- /r: Use this switch to restart the computer instead of fully shutting it down.
- /t:xx: Use this switch to specify the time (in seconds) after which the computer is shut down. The default is 20 seconds.
- “msg“: Use this switch to specify a message during the shutdown process. The maximum number of characters that the message can contain is 127.
- /y: Use this switch to force a “yes” answer to all queries from the computer.
- /c: Use this switch quit all running programs. If you use this switch, Windows forces all programs that are running to quit. The option to save any data that may have changed is ignored. This can result in data loss in any programs for which data is not previously saved.
Within the above description you may force all of the query and etc from the command to reboot/shutdown a server/PC.
Article from: http://support.microsoft.com/kb/317371