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, expand a database node in the Object Explorer pane, navigate to the linked object, right-click on it and select the Check out option:

The Check out option in right-click context menu

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

Check out icon

Other users who have the same database linked using the shared development 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:

How other users see Check out object

The Check in option becomes enabled once the checked out object is edited:

The Check in option in right-click context menu

When the Check in option is initiated, the Commit changes dialog appears:

The commit changes dialog

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:

"Object checked out by" warning is shown

To review the current object status in the Object Explorer pane, right-click on the selected database and choose the Object status command:

The Object status option in right-click context menu

The Object status window is shown, where a list of all objects is present with the information about which user is working on what object, and what actions are performed (check out, lock, edit):

The Object status dialog

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 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, then 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 and lock action.

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 window.

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

A: Yes, by opening the Object status window 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.