August 12, 2010 at 2:07 am
On one of my DB Servers which is using SQL Server 2005, public server role is missing, can anybody let me know what might be the root cause of it?
Also i have one stored procedure, before the stored procedure starts it has the following piece of code:
USE [Database Name]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create procedure proce_name
as
begin
T-SQL
end
When i again click on the stored procedure name and select modify, the block of code above create procedure statement disappears.
Please could someone help me on this?
August 12, 2010 at 12:57 pm
singhsatnam84 (8/12/2010)
Also i have one stored procedure, before the stored procedure starts it has the following piece of code:USE [Database Name]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create procedure proce_name
as
begin
T-SQL
end
When i again click on the stored procedure name and select modify, the block of code above create procedure statement disappears.
The code for your stored procedure doesn't start until the word "CREATE". Everything above that is setup code. You are specifying your database, then setting some standard settings to keep things consistant. These are NOT part of your procedure so won't show up when you modify it.
I wouldn't worry a whole lot about the public role. I've never heard anyone recommend using it.
Kenneth
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
August 12, 2010 at 1:06 pm
If you want SSMS to generate the extra stuff, go to the Tools menu, select Options, go to SQL Server Object Explorer and then Scripting underneath that. You can set exactly what you do and don't want it to script for you.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply