January 5, 2015 at 7:24 am
when i click on the modify option on a stored procedure it is not opening for editing as earlier. it opens as if for scripting.
for example i clicked modify procedure on stored proc. "text" and the result is as follows. someone please help
/****** Object: StoredProcedure [dbo].[test] Script Date: 05/01/2015 7:50:08 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[test]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'-- =============================================
-- Author:<Author,,Name>
-- Create date: <Create Date,,>
-- Description:<Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[test]
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
select * from room
-- Insert statements for procedure here
END
'
END
January 5, 2015 at 7:33 am
'Scripting' is how stored procedures are modified – it is the only way.
January 5, 2015 at 7:35 am
i bleieve you recently modified this location in SSMS, which decides whether something is scripted with a if not exists selection:
it may have been modified as a patch or something, but it definitely was modified, if it was not doing it before:

just toggle it back and it wills cript the wya it did before.
Lowell
January 5, 2015 at 7:35 am
Ah, now I understand.
Go to Tools/Options in SSMS. Select SQL Server Object Explorer / Scripting.
Set 'Check for object existence' to False.
January 5, 2015 at 10:36 pm
Thank you Lowell ..i did as you explained and now it works.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply