Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the common batch code for the server?

Shulou Source: shulou.com Published: 2022-06-03 08:55:57 11月15日 Update

This article mainly explains "what is the commonly used batch code in the server". The content in the article is simple and clear, and it is easy to learn and understand. let's go deep into the editor's train of thought. Let's study and learn "what is the commonly used batch code on the server"?

Save the following as sqlreboot.bat, and then add it to the scheduled task to restart the sqlserver server after a period of time, preventing the sqlserver from taking up too much memory and causing the web page to fail to open data.

The code is as follows:

Net stop sqlserveragent

Net stop mssqlserver

Echo.wscript.sleep (50000) > s.vbs

Cscript / / nologo s.vbs

Del s.vbs

Net start mssqlserver

Net start sqlserveragent

Shrink sqlserver database and empty log files

The code is as follows:

DUMP TRANSACTION [database name] WITH NO_LOG

BACKUP LOG [database name] WITH NO_LOG

DBCC SHRINKDATABASE ([database name])

Batch processing and php files realized by automatic backup and winrar compression under mysql database

The code is as follows:

FOR / D% I IN (*) DO D:\ php\ php5\ php.exe-Q D:\ php\ php5\ backup.php% I

Backup.php

The code is as follows:

Backup Ver 0.01, for Win95/Win98/WinNT/Win2000/WinXP on i32

Copyright (C) 2000 ptker All rights reserved.

This is free software,and you are welcome to modify and redistribute it

Under the GPL license

PHP Shell script for the backup MySQL database.

Usage:

Can be database name you would like to backup.

With the-help, or? Options, you can get this help and exit.

Thank you for reading, the above is the content of "what is the commonly used batch code in the server". After the study of this article, I believe you have a deeper understanding of what the batch code commonly used in the server is. The specific use of the situation also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Code data server service database common use content learning files tasks memory backup that is ideas situations articles logs time more knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MySQL Docker Redmi OPPO Reno