Skip to content

Use this to backup your databases and free up room on servers

License

Notifications You must be signed in to change notification settings

Hamenopi/Backup-Database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Backup Database

Introduction

Use this to backup your databases and free up room on servers.

Usage

@BACKUP is where it's going be @DBName is the name of the database

DECLARE @BackupPath NVARChar(255)
DECLARE @DBName NVARChar(255)

SET @BackupPath = N'\\Server\User\FileName.bak'
SET @DBName = N'DatabaseName'

BACKUP DATABASE @DBName
TO DISK = @BackupPath
WITH
    NOFORMAT,
    NOINIT,
    NAME = @DBName,
    SKIP,
    NOREWIND,
    NOUNLOAD,
    COMPRESSION,
    STATS = 10
GO

Contribute

Submit a pull request

About

Use this to backup your databases and free up room on servers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published