Applies to
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:
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 following table shows the object status icon of an edited object when working in the dedicated model:
|
|
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:
Edited
When an object is edited, its icon in the Object Explorer pane will be displayed as green to that user:
The other developers will see the object with a purple version-controlled icon:
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 other developers will also see a checkmark, but it will be grey:
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:
To the other developers on the team, this same object has a purple checkmark:
Locked
If the database developer locks an object, the icon in the Object Explorer pane will have a blue lock icon:
The other developers will see it as a grey lock:
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 other developers will see it as a purple lock 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 |
|
|
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:
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 window contains all objects from a database that are selected to be version-controlled:
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:
|
|
|
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:
|
|
|
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.