September 23, 2010 at 4:20 pm
Hi,
i have this strange thing going on. when i create a procedure in the master database it appears in the system stored procedures folder. can anyone explain me how this comes. maybe something to do with the user mapping?? platform: sql server 2005 64-bits enterprise / os : windows 2003 64-bits enterprise
kind regards,
Bryan
September 24, 2010 at 1:27 am
What is the name of that SP?
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
September 24, 2010 at 1:36 am
the name is random. not a specific name op this SP. let's call it test.
October 10, 2010 at 2:25 am
Is your problem resolved?
MJ
October 11, 2010 at 1:25 am
My problem is not solved yet. i hope someone can help me on this one. maybe it's a user issue??
so normally when you create a stored procedure in the master database it will not end up in the system stored procedures folder, but in my case it is.
kind regards,
Bryan
October 12, 2010 at 3:37 am
You're not prefacing the name of your procedure with sp_, are you? That's reserved for system stored procedures.
October 12, 2010 at 4:22 am
No not using sp_.....
October 12, 2010 at 3:05 pm
I've tested this on my SQL 2005 server and can't get it to save an object in System Stored procs.
Are you sure they are actually defined as system stored procs? In SQL 2005 the view is a bit misleading as there isn't a seperate User Stored Procs folder. All the user stored procs appear under "Stored Procedures", and there is a seperate "System Stored Procedures" folder on the same level, but it's at the top of the list, so it does look a bit like everythin is in that folder.
Cheers
Leo
Leo
Nothing in life is ever so complicated that with a little work it can't be made more complicated.
October 12, 2010 at 5:03 pm
October 12, 2010 at 5:32 pm
pavan_srirangam (10/12/2010)
what is the schema of your SP its not sys. right.if you give the name with sys. spname it creates in system store proc.
I tested this and it wouldn't let me create a stored proc with the sys. prefix.
Also if you look in System Stored Procs you will see stored procs owned by dbo, so this isn't definitive.
I've looked in sys.sysobjects and can't see any way of identifying a stored proc as belonging to the system stored procs. I'm not sure how SQL determines this, does anyone else?
Leo
Leo
Nothing in life is ever so complicated that with a little work it can't be made more complicated.
October 13, 2010 at 12:57 am
In sys.all_objects there is a field is_ms_shipped.
The management studio (2005 and 2008) put all the procedures (and extended procedures) in the system folder if this field is set to 1.
The only way to set this field to 1 is to use sp_ms_marksystemobject (use at your own risk).
April 5, 2011 at 5:53 pm
Hi,
I'm not sure if this post will explain anything that may help you.
cheers
martin.
May 19, 2011 at 2:16 pm
I am having the same issue as Bryan with this original post. Can anyone explain?
I just realized that any procedure I create is being stored in the System Stored Procedures folder. My platform is also 2005 64-bit Enterprise SP4 (my other servers are storing it correctly under the master stored procedures folder - they are not 64-bit Enterprise - using the exact same script)
I am creating a stored procedure like this:
USE [master]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Procedure [dbo].[XYZ]
....
Now that they are there I dont have the option to delete them via SSMS either.
I confirmed they are returned along with the system procedures with the query:
SELECT * FROM sys.objects where is_ms_shipped = 1
May 20, 2011 at 9:19 am
After posting I found the fix in another Forum titled SYSTEM STORED PROCEDURE QUESTION. Many Thanks to Jason! My server also had the sp_configure 'allow updates' incorrectly set to 1. When I followed his suggestion and created a stored procedure it now correctly goes in the correct folder. I, too, have no idea how this setting was set to 1.
His fix was to run the following:
sp_configure 'allow updates',0
reconfigure
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply