Creating a Snapshot Through
a Database Connection

Creating a Snapshot Through
a Database Connection

A database snapshot can be created in one of two ways:

To create a snapshot from a connected database use the following steps:


1) From the quick access menu click New Document

2) Ensure the first tab (Snapshot From Connection) is selected


3) In the Server dropdown enter the name of SQL Server instance to connect to

4) In the Suffix dowpdown (to the right of the Server dropdown) enter ‘-FromConnection’. The suffix will be appended after the server name in the suggested filename and is optional

5) Choose from Integrated Security (Windows login) or enter a Username and Password (The app.config option may also be selected but this is an advanced option and will be covered in other articles)

6) Select a database name from the Database dropdown (or type in the name if you prefer)

7) Leave Incremental Build, Shallow Incremental Build and Infer Schemas checked

8) Select a suggested filename for the snapshot from the Save As dropdown (or type a name if you prefer)

9) Leave Full Build, One Click Refresh, Recursive Build and Offline unchecked

10) Select a filename suggestion from the Save As dropdown (or type a filename if you prefer) and Click OK (You may be prompted for a folder location if none has been specified)


The snapshot will be created by analysing each database object through a live connection to the database and saved in a single file.


This file can then be shared with other users of SQLCompass, allowing them to inspect and analyse the database schema with no requirement to be connected to the database or even a network.

So, let’s take a closer look at those options:

Server

  • Should contain the name of the SQL Server instance to connect to
  • This must exactly match the named instance to allow correct connection to the server

Integrated Security

  • When checked uses the current Windows user to connect to the server
  • When unchecked a SQL Server username and password must be specified

Use app.config

  • Checking this option allows connection details to be accessed from an app.config file
  • Use of this option will be discussed in other articles

Username, Password, Database

  • SQL Server username, password and database name to make the connection

Incremental Build

  • When checked, enables fast rebuilding of the snapshot where only changed objects are re-analysed
  • When unchecked, all database objects will be reanalysed on rebuild

Shallow Incremental Build

  • When checked, Indexes and Foreign Keys will be reanalysed on rebuild only if the associated table object has changed
  • When unchecked, all Indexes and Foreign Keys will be reanalysed on rebuild even when Incremental Build is checked.

Infer Schemas

  • When checked, schemas will not be directly analysed but will be inferred from the schemas of analysed objects (as a result, empty schemas containing no objects will be omitted)
  • When unchecked, schemas will be explicitly analysed from the database connection (this is generally discouraged and may lead to unexpected schemas being listed)

Full Build, On Click Refresh, Recursive Build, Offline

  • These options are related to rebuilding of a snapshot rather than initial creation and will be covered in other articles

 

Just started working with or interested in learning about how SQL works? Click here.