IT Blog

  • Blog
  • Technology
    • Technology
    • Architecture
    • CMS
    • CRM
    • Web
    • DotNET
    • Python
    • Database
    • BI
    • Program Language
  • Users
    • Login
    • Register
    • Forgot Password?
  • ENEN
    • 中文中文
    • ENEN
Experience IT
In a World of Technology, People Make the Difference.
Database

SQL Server Database Backup - 3 Methods

Database backup is not the DBA-only work. Most of developers and even small business owners also need to perform this task. This article will introduce 3 methods to back up database from SQL Server. Method 1 – from management studio Connect to database server Expend Databases folder Right click on the database that you want to backup from Context menu click Task from sub menu click on Back Up… on the popup window click on Add  on Select Backup Destination window you could enter file location and file name directly or click on … button to specify a backup file. Click on OK button to close the window, then click on OK again and wait for the completion. Method 2 – using T-SQL script You could either to execute the script on Management Studio or store it as stored procedure to execute. Here’s the script for backing up all user databases: DECLARE @name VARCHAR(50) -- database name DECLARE @path VARCHAR(256) -- path for backup files DECLARE @fileName VARCHAR(256) -- filename for backup DECLARE @fileDate VARCHAR(20) -- used for file name --specify database backup directory SET @path = 'C:\DB\MSSQL11.MSSQLSERVER\MSSQL\Backup\' SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112) DECLARE db_cursor CURSOR FOR SELECT name FROM master.dbo.sysdatabases WHERE name NOT IN ('master','model','msdb','tempdb') -- exclude system db OPEN db_cursor FETCH NEXT FROM db_cursor INTO @name WHILE @@FETCH_STATUS = 0 BEGIN SET @fileName = @path + @name + '_' + @fileDate + '.BAK' BACKUP DATABASE @name TO DISK = @fileName FETCH NEXT FROM db_cursor INTO @name END CLOSE db_cursor DEALLOCATE db_cursor Method 3 – using SSIS Service In order to use…

2016-11-01 0 Comments 939 Views 0 Like IT Team Read more
Theme

Add slideshow on homepage for Parallax One theme

File location: /wp-content/themes/Parallax-One-child/sections/parallax_one_header_section.php At the bottom: (site: handyraymond.com)  1,354 total views

2011-11-23 0 Comments 675 Views 0 Like IT Team Read more
1…1415161718
Chinese (Simplified) Chinese (Simplified) Chinese (Traditional) Chinese (Traditional) English English French French German German Japanese Japanese Korean Korean Russian Russian
Newest Hotspots Random
Newest Hotspots Random
All Unicode Chars How to keep and display contact form 7 data Common Regular Expressions How to block bad bots in Appache server Add ALT attribute to Social Media Icon Change Event Calendar Title
All Unicode Chars
CrellySlider - make full width slider How to automatically translate a website to any language Unicode to Chinese conversion notes Disable auto update in wordpress Duplicator - backup & restore Get event list with feature image
Categories
  • Architecture
  • BI
  • C#
  • CSS
  • Database
  • DotNET
  • Hosting
  • HTML
  • JavaScript
  • PHP
  • Program Language
  • Python
  • Security
  • SEO
  • Technology
  • Web
  • Wordpress

COPYRIGHT © 2021 Hostlike IT Blog. All rights reserved.

This site is supported by Hostlike.com