Our team just experienced for the first time the hassle of not having version control for our DB. How can we add stored procedures at the very least to version control? The cur
2nd solution from @Darryl didn't work as suggested by @Moe. I modified @Darryl's template and I got it working, and thought it would be nice to share it with everybody.
IF NOT EXISTS(SELECT name FROM sysobjects
WHERE name = '' AND type = 'P' AND uid = '1')
EXEC sp_executesql N'CREATE PROCEDURE dbo.
AS
BEGIN
select ''Not Implemented''
END
'
GO
ALTER PROCEDURE dbo.
AS
BEGIN
--Stored Procedure Code
End
This is really nice because I don't lose my stored procedure permissions.