arcsde

Script or automate feature class creation in ESRI/ArcSDE

I'm looking for info on how to write SQL scripts to automate the creation of a versioned feature class in ArcSDE I want to be able to automate the process itself as well as put the scripts under version control. Can anyone point me to a resource that explains how to do this? Is this even possible? It seems like there are lots of interre...