Project Description
__SC is a lightweight native source control system for database schema objects such as Stored Procedures. It provides checkout/checkin and versioning functionality.

This is a brief technical overview - for a fuller functional walkthru see the documentation

 __SC resides in sql server (it does not rely on an external Source control system) and controls versioning of database schema programmable objects (Stored Procedures ,Triggers ,Functions) using sqlserver DDL triggers.
Objects can be checked out and checkedin so that there is versioning history and that users don't overwrite each others changes.

The heart of __SC lies in a stored Procedure called __SC, this sproc is the "Command Line" into __SC

When you run the __SC procedure without any parameters from SqlServer Management Studio, you get the following help list of available commands.


__SC was designed to work in a full trust environment, user names are the user sql login (includeing the domain name if windows authentication is used)



SC Syntax:
CHECKOUT objname Will try to give you a lock on that specific object - This happens
automaticlly if you do a create/alter/drop on an object. This lock
only valid for 24 hours since the last checkout

FORCECHECKOUT obj Will try to check out an item similiar to CHECKOUT however it will
not check to see if the statement matches the latest definition

CHECKIN objname Will checkin the objname object if it has been checked out to you
*CHECKIN ALL Will checkin all of you checked out items --Not Working yet--

GRAB objname Will grab the checkout from the current user and assign it to you

*STATUS objname Displays the status of of objName

*GENERATE datetime Generates a runable SQL script of all objects that were checkedin on
or after datetime

HISTORY objname Retreives the checkin history for this object

SNAPSHOT datetime Retreives a list and definiton of checked in objects after date time

VERSION objname Retreives the definition of objname at datetime

LIST ALL Retreives the list of all objects currently managed and their current status
last change date and status user

LIST username Retreives the list of all objects currently checked out by user

* These items do not yet work

Note: if you omit a operation parameter the CHECKIN is the default,
so for example you can eaasly check in a object like this:
__SC objectname
this would have the same effect as the more verbose
__SC CHECKIN objectname

Last edited May 3, 2011 at 4:41 AM by UnderscoreSC, version 8