Checking out and checking in objects

Applies to
ApexSQL Source Control

Description
Check out and Check in features are available only when using the Shared database development model in ApexSQL Source Control. These features address the need of a developer to inform other team members about the intention to work on a database object and can be made more consequential by a combination of more restrictive check out polices

To Check out an object, right click an object in the Object Explorer pane, and select the Check out option from the context menu:

Once the object is checked out, the icon will be changed:

Other users who have the same database linked using the Shared model will see that the object is checked out by someone else, as the object will be marked in the Object Explorer pane with the following icon:

The Check in option becomes enabled once the checked out object is edited. When the Check in option is initiated, the Commit changes form appears:

Quick tip icon

Quick tip:

The comment can be mandatory or not. That depends on the Require comment option state in ApexSQL Source Control options

The Check out option is permissive by default. This means that anyone can perform the Check out command on an object that is already checked out. In this case, the following warning appears:

A review of the current object status is available from the Object status form:

The Object status form shows a list of all objects including the information about which user is working on what object, and what actions are performed (check out, lock, edit):

FAQs

Q: Why performing a check out?

A: By performing a check out, the user is informing everyone else about his intention to work on an object. That way the team can avoid accidental overwrites or broken dependencies.

Q: How can I tell if something is checked out? By me, by someone else?

A: The icon next to the object name in the Object Explorer pane will change to reflect the state of the object (blue checkmark if the current user performed a check out, or a grey checkmark in case another user checked out an object). In addition to this, the Object status form contains the information about the check out\lock\edit state of all objects in a database.

Q: What happens if someone else tries to check out an object that has already been checked out?

A: They will be informed that the object is checked out by a specific user and will be provided a choice to overwrite the check out or cancel the operation.

Q: Can Check out be overridden, and if so, than how and when/under which circumstances?

A: Yes, a check out can be overwritten as its main intention is just to inform the user that someone else wants to work on an object. If a developer wants to prevent anyone from editing an object though, he can perform a check out with lock.

Q: Can I see if an object has not only been checked out, but also edited?

A: Yes, the object state is presented in the Object Explorer pane with an appropriate icon next to the object name included for the Edited status. There is a separate icon for each state (checked out, checked out and edited, etc.). It can also be seen in the Object status form.

Q: Can I easily see who checked out an object?

A: Yes, by opening the Object status form and navigating to the object in question.

Q: Can I check in /check out more than one object at once?

A: Check in can be performed against multiple objects at once using the Action center tab. A check out can be performed only against individual objects.

Q: Are dependent objects also checked out once I check out an object?

A: No, not currently. But this feature is planned for future releases.