Home Backend Development PHP Tutorial Using SQLSERVER's extended stored procedures to implement remote backup and recovery_PHP tutorial

Using SQLSERVER's extended stored procedures to implement remote backup and recovery_PHP tutorial

Jul 13, 2016 pm 05:02 PM
sqlserver and by use exist backup storage accomplish recover I Expand number frame of program process Remotely

Recently, I am working on a data management module for the company's framework program (data application-oriented application system). The requirements of this module are relatively simple: backup, recovery and log cleaning. Our company's software basically uses C/S as the basic structure, so the two main functions of the data management module, 'backup and recovery', may be operated on the client side, and the files of backup and recovery may also be stored on the client side. end, so this data management module must be able to realize remote backup and recovery of the database.
Now that the premise of the article has been explained, it’s time to talk about how to implement it. In fact, it is very simple. I want to write a test example of remote backup
for everyone to see, so that it can be described clearly!
Example description:
Environment: win2k sqlserver 2K query analyzer
SQLSERVER service instance name: mainserver
Database name to be backed up: msdb
Local machine name (Client): david
Local user: zf Password: 123
Local domain name: domain
Local folder that provides backup requirements: e: est
Step 1: Create a shared folder
and call it in the program code (or CMD window) net share test=e: est
Or use the NetShareAdd API
Brief description:
net share: It is a network command inside WINDOWS.
Function: Create local shared resources and display shared resource information of the current computer.
Syntax: See net share /?
Step 2: Establish a shared credit relationship
master..xp_cmdshell 'net use david est 123 /user:domainzf'
Brief description:
1: xp_cmdshell: is an extended stored procedure of SQLSERVER.
functions, executes the given command string in the form of the operating system command line interpreter,
and returns any output as a text line.
Syntax: See SQLSERVER online help
2:net use: It is a network command inside WINDOWS.
functions to connect or disconnect the computer from shared resources, or display information about the computer's
connection. This command also controls persistent network connections.
Syntax: See net use /?
Step 3: Back up database
backup database msdb to disk='david estmsdb.bak'
This does not require explanation. For syntax, see SQLSERVER online help
Step 4: Delete shared folder

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631075.htmlTechArticleRecently I am working on the data management module for the company’s framework program (data application-oriented application system). This The module's requirements are relatively simple: backup, restore and clean logs. Our company...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1655
14
PHP Tutorial
1253
29
C# Tutorial
1228
24
What is Bitget Launchpool? How to use Bitget Launchpool? What is Bitget Launchpool? How to use Bitget Launchpool? Jun 07, 2024 pm 12:06 PM

BitgetLaunchpool is a dynamic platform designed for all cryptocurrency enthusiasts. BitgetLaunchpool stands out with its unique offering. Here, you can stake your tokens to unlock more rewards, including airdrops, high returns, and a generous prize pool exclusive to early participants. What is BitgetLaunchpool? BitgetLaunchpool is a cryptocurrency platform where tokens can be staked and earned with user-friendly terms and conditions. By investing BGB or other tokens in Launchpool, users have the opportunity to receive free airdrops, earnings and participate in generous bonus pools. The income from pledged assets is calculated within T+1 hours, and the rewards are based on

How does the learning curve of PHP frameworks compare to other language frameworks? How does the learning curve of PHP frameworks compare to other language frameworks? Jun 06, 2024 pm 12:41 PM

The learning curve of a PHP framework depends on language proficiency, framework complexity, documentation quality, and community support. The learning curve of PHP frameworks is higher when compared to Python frameworks and lower when compared to Ruby frameworks. Compared to Java frameworks, PHP frameworks have a moderate learning curve but a shorter time to get started.

How do the lightweight options of PHP frameworks affect application performance? How do the lightweight options of PHP frameworks affect application performance? Jun 06, 2024 am 10:53 AM

The lightweight PHP framework improves application performance through small size and low resource consumption. Its features include: small size, fast startup, low memory usage, improved response speed and throughput, and reduced resource consumption. Practical case: SlimFramework creates REST API, only 500KB, high responsiveness and high throughput

Top 10 Global Digital Virtual Currency Trading Platform Ranking (2025 Authoritative Ranking) Top 10 Global Digital Virtual Currency Trading Platform Ranking (2025 Authoritative Ranking) Mar 06, 2025 pm 04:36 PM

In 2025, global digital virtual currency trading platforms are fiercely competitive. This article authoritatively releases the top ten digital virtual currency trading platforms in the world in 2025 based on indicators such as transaction volume, security, and user experience. OKX ranks first with its strong technical strength and global operation strategy, and Binance follows closely with high liquidity and low fees. Platforms such as Gate.io, Coinbase, and Kraken are at the forefront with their respective advantages. The list covers trading platforms such as Huobi, KuCoin, Bitfinex, Crypto.com and Gemini, each with its own characteristics, but investment should be cautious. To choose a platform, you need to consider factors such as security, liquidity, fees, user experience, currency selection and regulatory compliance, and invest rationally

Top 10 exchanges in the currency circle in 2025 latest digital currency app rankings Top 10 exchanges in the currency circle in 2025 latest digital currency app rankings Feb 27, 2025 pm 06:33 PM

Ranking of the top ten virtual currency trading platforms (latest in 2025): Binance: Global leader, high liquidity, and regulation has attracted attention. OKX: Large user base, supports multiple currencies, and provides leveraged trading. Gate.io: A senior exchange, with a variety of fiat currency payment methods, providing a variety of trading pairs and investment products. Bitget: Derivatives Exchange, high liquidity, low fees. Huobi: An old exchange that supports a variety of currencies and trading pairs. Coinbase: A well-known American exchange, strictly regulated. Phemex and so on.

Top 10 digital currency trading platforms The latest list of top 10 digital currency trading platforms Top 10 digital currency trading platforms The latest list of top 10 digital currency trading platforms Mar 17, 2025 pm 05:57 PM

Top 10 digital currency trading platforms: 1. OKX, 2. Binance, 3. Gate.io, 4. Huobi Global, 5. Kraken, 6. Coinbase, 7. KuCoin, 8. Bitfinex, 9. Crypto.com, 10. Gemini, these exchanges have their own characteristics, and users can choose the platform that suits them based on factors such as security, fees, currency selection, user interface and customer support.

App won't load on iPhone: How to fix it App won't load on iPhone: How to fix it Jun 15, 2024 pm 01:32 PM

Apps not loading on your iPhone? If an app takes a long time to load, that's not normal. With the exception of apps that are still in beta, they should load instantly when you open them on your iPhone. Except for some heavy games, if all the apps on your phone are loading slowly or not loading at all, you should follow the steps below to fix it. Fix 1 – Update App (if applicable) Haven’t updated your app in a while? Updating it to the latest version should resolve the issue. Step 1 – Open the AppStore. Step 2 – Just start typing the name of the app in the search box and open the app directly from the suggestions. Step 3 – Click to go to Special

What are the common misunderstandings in the learning process of Golang framework? What are the common misunderstandings in the learning process of Golang framework? Jun 05, 2024 pm 09:59 PM

There are five misunderstandings in Go framework learning: over-reliance on the framework and limited flexibility. If you don’t follow the framework conventions, the code will be difficult to maintain. Using outdated libraries can cause security and compatibility issues. Excessive use of packages obfuscates code structure. Ignoring error handling leads to unexpected behavior and crashes.

See all articles