Create a database snapshot :

Must be in create database Each data file in the source database is included in the command , The original logical name , New physical name and path ,

No other properties can be specified

create database db_snapshot_name on

(....)[,(....)....]

as snapshot of db_name;

-------------------------------

Example :

create database studio_snapshot
      on(name = 'studio',filename='E:\studio_snapshot.mdf')
      as snapshot of studio;
      go

----------------------------------------------------------------------------------------------------

1、 Snapshot files are created as sparse files , This is NTFS File system functions , Snapshot files only contain modified data , So at first , Sparse files don't include user data

As the data is written NTFS Will allocate space for the file , And the space allocated each time is 64K Integral part of !

2、SQL server A bitmap will be created for each file in the source database , Each page in the file corresponds to a bit , This bit is used to record whether the page has been saved to the snapshot

In the database , After the data in the second source is updated ,SQL Server Will update the bitmap , When doing a snapshot read , The first thing is to look at this bitmap , Used to locate data .

SQL Server More articles on creating database snapshots

  1. About SQL Server Creation and use of mirror database snapshot

    from SQL Server 2005 SP rise ,SQL Start supporting database mirroring . It's designed to try to make SQL Server Provide a disaster recovery technology with real-time data synchronization , That is, it can provide redundant data backup , It's easier to switch . Every time ...

  2. SQL Server Restore a database from a database snapshot

    grammar : restore database db_name from database_snapshot  = 'db_snapshot_name'; ------------------------- ...

  3. SQL Server Create database mail

    One . background The database sends an email to inform the running state of the database ( The state can pass through JOB Form acquisition ) And information , To achieve the effect of early warning . Two . Basic knowledge of msdb System database storage related to Job,Database Mail,Nodifyicati ...

  4. [ turn ]SQL Server Create database mail

    In this paper, from :http://www.cnblogs.com/gaizai/p/3358958.html One . background The database sends an email to inform the running state of the database ( The state can pass through JOB Form acquisition ) And information , To achieve the effect of early warning . ...

  5. SQL Server Create database

    There are two ways to create a database : The way 1- Graphical interface creation : 1. Right mouse click “ database ”, Then click new database 2. Set up the General tab 2.1 Name the database , Generally, multiple words should be underlined , Space is not recommended , Such as Test_DB. ...

  6. Sql Server 2008R2 Database publish and subscribe

    Background description : Publisher A: ( Remote terminal ) , Database service name : GUANWANG1 Subscribers B: ( This machine )   ,   Database service name : PC-LLRDBA From the server A Database publishing in , And then in B Subscription in A Release ...

  7. SQL Server 2012 Create a database snapshot

    Not all MSSQL All database versions support database snapshot , Only Enterprise Version of the support . In other versions , With Business Intelligence Edition Version as an example , When you create a snapshot , The following errors will be reported eliminate ...

  8. How to create and restore SQL Server 2005 database ?

    In restoring SQL Server 2005 Before the database file , It is recommended to copy and paste the database file to be restored into the root directory of a disk , This makes it easy to find the relevant documents later , such as C disc . To open the first SQL Server 2005 Of Microso ...

  9. How to create and restore SQL Server 2000 database ?

    explain : This article is an original one I published on Netease blog a few years ago , But because Netease blog is going to stop running now , So I moved this article here , Although now SQL Server 2000 The software has been around for a long time , But there are still some people using it , especially ...

Random recommendation

  1. C# Encrypt and decrypt files

    using System; using System.Collections.Generic; using System.Text; using System.Security.Cryptograph ...

  2. .NET MVC Methods for separating controllers from class libraries

    stay .ASP.NET MVC The development of , After we create the project ,ASP.NET MVC Yes Model-Controller-View In the form of , In creating content generated automatically by the project Model It's easy to separate into class libraries , therefore ...

  3. About the mobile terminals that are potentially needed on the project GIS System source code collation , To be updated later

    GPS Tools For Android Preface : GPS The data is doing GIS A valuable piece of data for development , In the case of no invasion of other people's privacy, through the mode of Internet collection GPS It's the cheapest model . background : Now the company is working on a project ...

  4. Linq Query in List The number of combined identical values is greater than 1

     List< select g.Key).ToList();

  5. iOS Develop a series of itms-services agreement

    adopt  itms-services  agreement , Publish or share  iOS  Applications     adopt  itms-services  agreement , Publish or share  iOS  Applications <button onclick="w ...

  6. 1-Highcharts 3D The commonness of pictures 3D Histogram and null values

    <!DOCTYPE> <html lang='en'> <head> <title>1-Highcharts 3D The commonness of pictures 3D Histogram and null values </t ...

  7. 【Linux/Ubuntu Study 6】unbuntu download android Source code

    stay Windows Lower installation Cygwin, adopt Cygwin Also available at Windows Download through the download steps of this article Android Source code . The following is in Ubuntu Download Google Android4.4 The steps of source code : 1. Ann ...

  8. Entrepreneurial notes Mr.Hua

    <MR.HUA Entrepreneurial notes > I've been looking forward to this book for a long time , I watched it for a long time , Every aftertaste is endless , A careful reading , It's really enlightening . If not with Mr.Hua Get to know each other , I'm so glad I read it . I picked out the sentences that I thought Hua Ge was good ...

  9. 【LCT】BZOJ3091 City Travel

    3091: City Travel Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 1927  Solved: 631[Submit][Status][Discuss ...

  10. Brown Mood Median Test

    Brown-Mood Median Test For position parameters in two independent sample scales ( Median ) Test the problem : \(H_0: med_x = med_y\) \(H_1=med_x > med_y\) stay ...