Object status icons and visualization

Applies to

ApexSQL Source Control

Summary

This article explains object status icons in the Object Explorer pane inside SQL Server Management Studio (SSMS) when working with ApexSQL Source Control

Description

Dedicated model

When working in the dedicated development model, there are two different icons that can be shown in the Object Explorer pane. As soon as a database is linked to source control, all objects that are selected to be version-controlled in the Object filtering step will have the default “version-controlled” icon in the Object Explorer pane:

A linked database in the dedicated development model

When the object is displayed with this icon it means that:

  • The object has been added to version control during the linking process, or
  • The object is initially committed to the repository and the current version of an object in a database is the same as the latest version of the same object on the repository

When the user modifies any version-controlled object, its status icon will be changed in the Object Explorer pane to a checkmark:

The status icon of the edited object in the dedicated development model

The following table shows the object status icon of an edited object when working in the dedicated model:

Object status

Object Explorer icon

Default

Edited

Shared model

Default state

Similar to the dedicated model, the default icon is the same, and represents one of the following:

  • The object has been added to be version controlled during the linking process, or
  • The object is initially committed to the repository and the current version of an object in a database is the same as the latest version of the same object on the repository

In addition to this, if an object is initially committed and its state is presented as a default in the Object Explorer pane, it means that it is not yet edited by any user, nor it is checked out or locked:

A linked database in the shared development model

Edited

When an object is edited, its icon in the Object Explorer pane will be displayed as green to that user:

The green status icon of the edited object displayed to the user who edited the object

The other developers will see the object with a purple version-controlled icon:

The purple status icon of the edited object displayed to the other user

Checked out

The previous scenario describes when an object is edited without being checked out or locked previously. In the case when an object is checked out, the icon for that object in the Object Explorer pane will be displayed as a checkmark:

The blue check mark status icon of the checked out object displayed to the user who checked out it

The other developers will also see a checkmark, but it will be grey:

The grey check mark status icon of the checked out object displayed to the other user

Checked out and edited

If the user who checked out an object also modifies it, the icon of the checked out and modified object appears as a green checkmark:

The green check mark status icon of the checked out and edited object displayed to the user who checked out and edited it

To the other developers on the team, this same object has a purple checkmark:

The purple check mark status icon of the checked out and edited object displayed to the other user

Locked

If the database developer locks an object, the icon in the Object Explorer pane will have a blue lock icon:

The blue lock status icon of the checked out and locked object displayed to the user who checked out and locked it

The other developers will see it as a grey lock:

The grey lock status icon of the checked out and locked object displayed to the other user

Locked and edited

If the database developer edits the object, checked out and locked it, it will be shown with a green lock icon:

The green lock status icon of the checked out and locked, and edited object displayed to the user who checked out and locked, and edited it

The other developers will see it as a purple lock icon:

The purple lock status icon of the checked out and locked, and edited object displayed to the other user

Quick tip icon

Quick tip:

A locked object cannot be edited, nor the lock operation can be overridden by any other database developer beside the one who is checked out and locked the object before the changes are committed to source control or check out and the lock is reversed

To summarize the above, the following is a table that represents all the object statuses from a perspective of the database developer who performed the specific operation (User A), as well as from a perspective of another database developer (User B) who has the same database linked using the shared development model:

Object status

User A

User B

Default

Edited only (without check out or lock)

Checked out (not edited)

Checked out (and edited)

Locked (not edited)

Locked (and edited)

Static data icon

If the database developer links static data for the selected table, the object status icon will change the color to yellow:

The yellow status icon of the table when static data is linked

Object status window

To avoid searching for the particular object in the Object Explorer pane in order to find out its status, the Object status window can be used to investigate which objects are not in a “default” state. To access the Object status window, right-click on a linked database in the Object Explorer pane, and select the Object status command from the context menu:

The Object status option in the right-click Object Explorer pane context menu

The Object status window contains all objects from a database that are selected to be version-controlled:

The Object status window

The appropriate column will contain a checkmark to describe if an object is being checked out, edited or locked. Besides the information about the object status, the Object status window contains information about the exact user who changed the status of the particular object.

More about this feature can be found in the Object status in the database source control article.

Overriding check outs

Since the check out operation can be overridden, when a database developer performs a check out operation against an object that is already checked out, the object status icon will be changed. The following table shows how the check out icon looks like before and after the check out operation is overridden, and in the case where an object is edited and not edited, to the database developer who is overriding the check out operation:

First database developer perspective:

 

Not edited

Edited

Before check out

After check out

From a perspective of the database developer whose check out is overridden, the following table shows how the object status icon of a checked out object will be changed, depending on if an object is edited or not:

What other database developers will see:

Not edited

Edited

Before check out

After check out

FAQs

Q: Can a check out or lock operation be performed against the already edited object?

A: Yes, the check out and lock operations can be performed against an edited object as well as against an object that is not edited.

Q: What happens with the object’s status when relinking a database?

A: If one database developer unlinks a database, while at least one more database developer has the same database linked in the shared model, the information about which objects are checked out or locked will not be removed. Any object that is being edited by the database developer who relinked a database will be shown in the Action center tab, including the information about which database developer modified them.

The information about object status will be removed in case the last database developer unlinks the last database linked on a SQL Server instance.

Q: Is the Object status form available to all the users who have a database linked?

A: The Object status form is available to all the database developers that have at least select permission against the ApexSQL_SourceControl.Objects table.