Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Extend Alter Procedure command

Author  Topic 

dbradley
Starting Member

9 Posts

Posted - 2007-06-27 : 16:44:12
Is there any way to extend the Alter Procedure command or fire somekind of event when it is executed in SQL Server 2005?

Thanks,

David

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-06-27 : 16:54:28
Could you elaborate? What problem are you trying to solve?

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

dbradley
Starting Member

9 Posts

Posted - 2007-06-27 : 17:07:15
I am working at a place where they use embedded sql in applications. I have given them reasons of why using stored procedures would be better but they argue that there is no source control beyond scripts. I don't think this is a good idea to extend the Alter Procedure command but was just curious if it could be done.

My thinking is that I could add some code to write the previous version of a procedure to a table so that it could be retreived if needed.


Thanks,

David
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-06-27 : 17:13:40
Isn't that what your backups are for? And we do use source control for our objects, including stored procedures. So what problem are they encountering with source control?

It not possible to extend ALTER PROC to do this. You could provide them a template to use, I suppose.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

dbradley
Starting Member

9 Posts

Posted - 2007-06-27 : 17:23:51
They backup once a week (every Sunday) but could roll out new versions in between.

I am a contractor and have to walk lightly if you know what I mean.


Thanks,

David
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-06-27 : 17:39:58
So why do they think that source control is not an option for stored procedures?

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

dbradley
Starting Member

9 Posts

Posted - 2007-06-27 : 17:44:30
Since it is not integrated into the Management Studio they fear that someone could change something without them being able to tell who did it. They also could loose a revision between backups.

If it was up to me I would use backups and scripts but they feel that is not a good solution.


Thanks,

David
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-06-27 : 17:48:30
My developers have it integrated into Management Studio. I'm not sure of all of the logistics involved, but I do know that they work directly in Visual Studio with source control and with SQL Server.

Here's how things work as far as knowing that objects make it into source control. Developers are resonpsible for getting their objects into source control. We then have processes that extra the files from source controls to form a build. That build is then installed and tested on the test server. Once testing is complete, that build is deployed to production. No objects make it into production unless it is part of a build and the only way to get it into a build is if the object is in source control.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

dbradley
Starting Member

9 Posts

Posted - 2007-06-27 : 18:03:58
I agree that depending on the developer to get it into Source Safe is a nessesary step. They have to do that with scripts which represent the stored procedures. My boss argues that the procedures can be changed without a script ever being created or checked in.

Thank you for your replies,

David
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-06-27 : 18:07:14
That is true in our case as well, but only in a development environment. If you have a strict deployment process that only deploys objects to other environments from official builds that were made from source control, then you know all objects and their changes are in source control that need to be. Developers should only have elevated permissions in development anyway, so there should be no way to "sneak" in changes to the other environments.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -