Skip to main content

How to backup database in sql server using query

This article demonstrates how to backup database from SQL server to disk using query.

Let's start step by step. Open Microsoft SQL Server management studio and run following query.

The following example backs up the complete TestDB database to disk.


USE TestDB;
GO
BACKUP DATABASE TestDB
TO DISK = 'c:\temp\TestDB.bak'
   WITH FORMAT,
      MEDIANAME = 'SQLServerBackups',
      NAME = 'Full Backup of TestDB';
GO 

Full back up to disk as default location from SQL Server Management Studio

In this example, the database Test will be backed up to disk at the default backup location.

1. The connect SQL server database engine instance in your machine.

2. Expand Databases, then right click on Test database, then select Tasks, then select Back Up.

3. Then click OK.

4. When the backup completes successfully, select OK to close dialog box.

backup database sql server management studio


 

Comments

Popular posts from this blog

Angular 14 CRUD Operation with Web API .Net 6.0

How to Perform CRUD Operation Using Angular 14 In this article, we will learn the angular crud (create, read, update, delete) tutorial with ASP.NET Core 6 web API. We will use the SQL Server database and responsive user interface for our Web app, we will use the Bootstrap 5. Let's start step by step. Step 1 - Create Database and Web API First we need to create Employee database in SQL Server and web API to communicate with database. so you can use my previous article CRUD operations in web API using net 6.0 to create web API step by step. As you can see, after creating all the required API and database, our API creation part is completed. Now we have to do the angular part like installing angular CLI, creating angular 14 project, command for building and running angular application...etc. Step 2 - Install Angular CLI Now we have to install angular CLI into our system. If you have already installed angular CLI into your system then skip this step.  To install angular CLI open vis

Angular 14 : 404 error during refresh page after deployment

In this article, We will learn how to solve 404 file or directory not found angular error in production.  Refresh browser angular 404 file or directory not found error You have built an Angular app and created a production build with ng build --prod You deploy it to a production server. Everything works fine until you refresh the page. The app throws The requested URL was not found on this server message (Status code 404 not found). It appears that angular routing not working on the production server when you refresh the page. The error appears on the following scenarios When you type the URL directly in the address bar. When you refresh the page The error appears on all the pages except the root page.   Reason for the requested URL was not found on this server error In a Multi-page web application, every time the application needs to display a page it has to send a request to the web server. You can do that by either typing the URL in the address bar, clicking on the Menu link/

React js CRUD Example Step by Step

How to build basic CRUD app with ReactJS Here's an example of building a simple CRUD application for managing a list of books. Step 1: Set up the React application To set up the React application, you'll need to have Node.js and NPM installed on your computer. Open a terminal or command prompt and create a new directory for your project. mkdir react-crud-app cd react-crud-app Next, initialize a new React application using the create-react-app CLI. npx create -react-app . Step 2: Create a list of books In this step, you'll create a list of books and display them in a table. Create a new file BookList.js in the src directory and add the following code: import React from 'react' ; const BookList = ( { books } ) => { return ( < table > < thead > < tr > < th > Title </ th > < th > Author </ th > < th > Actions </ th > </ tr > &