브랜드

Impact-Company-Logo-English Black-01-177x54

슈나이더 일렉트릭 코리아 웹사이트에 방문해 주셔서 감사합니다.

슈나이더 일렉트릭 코리아 웹사이트 방문자 분들 모두 환영합니다.
		
오늘 무엇을 도와드릴까요?
How to Create a Database Snapshot
Issue
A database snapshot is a read-only, static view of the source database. Multiple snapshots can exist on a source database and always reside on the same server instance as the database.  Each database snapshot is transaction consistent with the source database as of the moment of the snapshot's creation.  A snapshot persists until it is explicitly dropped by the database owner.

Snapshots can be used for reporting purposes.  Also, in the event of a user error on a source database, you can revert the source database to the state it was in when the snapshot was created.  Data loss is confined to updates to the database since the snapshot's creation.

Product Line
SQL Server

Environment
SQL Server Management Studio, SSMS

Cause
Reasons to take database snapshots include:
  • Maintaining historical data for report generation.
  • Safeguarding data against administrative error.
  • Safeguarding data against user error.  By creating database snapshots on a regular basis, you can mitigate the impact of a major user error, such as a dropped table.
  • To recover from a user error, you can revert the database to the snapshot immediately before the error.
  • Managing a test database.


Resolution

*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.*

1. This Transact-SQL creates a snapshot of the database:

CREATE DATABASE ION_Data_Snap
ON (name='ION_Data_Data', filename='C:\ION\Database\ION_Data.ds')
AS SNAPSHOT of ION_Data;
GO

Where:
- name: refers to the logical name for ION_Data database (which is ION_Data_Data)
- filename: name and location of the snapshot (in this example the extension is 'ds')


2. This Transact-SQL restores from a snapshot:

RESTORE DATABASE ION_Data
FROM DATABASE_SNAPSHOT = 'ION_Data_Snap';
GO


3. This Transact-SQL  drops the snapshot database:

DROP DATABASE ION_Data_Snap
GO

슈나이더 일렉트릭 Korea

첨부 파일
Snapshot Queries.txt [401 Bytes]
  • 제품 문서
  • 소프트웨어 다운로드
  • 제품 선택기
  • 제품 대체 및 교체
  • 지원 및 연락처 센터
  • 영업소 검색
  • 견적 받기
  • 슈나이더 일렉트릭 커뮤니티
  • 채용
  • 회사 소개
  • 부정 행위 보고
  • 접근성
  • 뉴스룸
  • 투자자
  • Ecostruxure
  • 작업 검색
  • 블로그
  • 개인정보 취급방침
  • 쿠키 공지
  • 사용 약관
  • Change your cookie settings