Re: Create a read only stored procedure
From: Gregory A. Larsen (greg.larsen_at_netzero.com)
Date: 08/18/04
- Next message: Narayana Vyas Kondreddi: "Re: DTS works manually but not automatic"
- Previous message: Narayana Vyas Kondreddi: "Re: DTS doesn't log"
- In reply to: Aaron [SQL Server MVP]: "Re: Create a read only stored procedure"
- Next in thread: Heriberto: "Re: Create a read only stored procedure"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 18 Aug 2004 10:26:55 -0700
Oh, I finally figured out what you where talking about. Yes it is true you
can still change the stored procedure using the ALTER statement. Although
it is also true that you can't use EM to change it.
Here is the code to prove that the ALTER can still be used to change the
code.
sp_MS_upd_sysobj_category 1
go
create proc sp_that_users_cant_change
as
print 'Try to change this message'
go
sp_MS_upd_sysobj_category 2
go
exec sp_that_users_cant_change
go
alter proc sp_that_users_cant_change
as
print 'I changed it'
go
exec sp_that_users_cant_change
go
sp_MS_upd_sysobj_category 1
go
drop proc sp_that_users_cant_change
go
sp_MS_upd_sysobj_category 2
go
-- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---- Need SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message news:eqTj8RUhEHA.3932@TK2MSFTNGP09.phx.gbl... > This didn't work on my system Greg, I was able to alter the procedure > without getting a warning or error message. 8.00.952 > > -- > http://www.aspfaq.com/ > (Reverse address to reply.) > > > > > "Gregory A. Larsen" <greg.larsen@netzero.com> wrote in message > news:#TIrnMUhEHA.3320@TK2MSFTNGP11.phx.gbl... > > You can use the following undocumented method of making to create a system > > stored procedure. This should keep them from changing it. > > > > sp_MS_upd_sysobj_category 1 > > go > > create proc sp_that_users_cant_change > > as > > print 'Try to change this message' > > go > > sp_MS_upd_sysobj_category 2 > > > > -- > > > > -------------------------------------------------------------------------- > -- > > -------------------------------------------------------------------------- > -- > > ---- > > > > Need SQL Server Examples check out my website at > > http://www.geocities.com/sqlserverexamples > > "Heriberto" <heriberto@mathemathics.com.br> wrote in message > > news:O6NLiCUhEHA.2544@TK2MSFTNGP10.phx.gbl... > > > Hi, I would like to know how to create a stored procedure but not let > the > > > user edit it in Enterprise Manger like system's procedures. With the > > option > > > ENCRYPTION I cannot read it and my concern is just don't let the user > > change > > > it. > > > > > > Thanks > > > > > > > > > > > >
- Next message: Narayana Vyas Kondreddi: "Re: DTS works manually but not automatic"
- Previous message: Narayana Vyas Kondreddi: "Re: DTS doesn't log"
- In reply to: Aaron [SQL Server MVP]: "Re: Create a read only stored procedure"
- Next in thread: Heriberto: "Re: Create a read only stored procedure"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|