Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / October 2005

Tip: Looking for answers? Try searching our database.

Permissions lost after alter table-valued function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Micle - 05 Oct 2005 13:24 GMT
create function dbo.tfFoo()
returns @t table
(
ID int
)
as
begin
insert into @t(ID)
values(1);

return;
end
GO
grant select on dbo.tfFoo to public
GO
select object_id('dbo.tfFoo')
select id from syspermissions where id = object_id('dbo.tfFoo')
select id from sysprotects where id = object_id('dbo.tfFoo')
GO
alter function dbo.tfFoo()
returns @t table
(
ID int
)
as
begin
insert into @t(ID)
values(1);

return;
end
GO
select object_id('dbo.tfFoo')
select id from syspermissions where id = object_id('dbo.tfFoo')
select id from sysprotects where id = object_id('dbo.tfFoo')
GO
drop function dbo.tfFoo
GO

Result

-----------
661785615

(1 row(s) affected)

id
-----------
661785615

(1 row(s) affected)

id
-----------
661785615

(1 row(s) affected)

-----------
661785615

(1 row(s) affected)

id
-----------

(0 row(s) affected)

id
-----------

(0 row(s) affected)

Permissions are lost.

Micle.
Dan Guzman - 05 Oct 2005 13:33 GMT
This looks like the bug described in MSKB 888530:

http://support.microsoft.com/default.aspx?scid=kb;en-us;888530

Signature

Hope this helps.

Dan Guzman
SQL Server MVP

> create function dbo.tfFoo()
> returns @t table
[quoted text clipped - 72 lines]
>
> Micle.
Micle - 05 Oct 2005 13:40 GMT
Hi!

Applies to section in bug description:

Microsoft SQL Server Standard Edition.

Our version:

select @@version

Result:

Microsoft SQL Server  2000 - 8.00.2040 (Intel X86)
May 13 2005 18:33:17
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: )

Micle.

> This looks like the bug described in MSKB 888530:
>
[quoted text clipped - 76 lines]
>>
>> Micle.
Dan Guzman - 05 Oct 2005 14:13 GMT
I believe the applies to list should include the other SQL 2000 editions as
well.  I submitted this feedback using the form at the bottom of the page.

Signature

Hope this helps.

Dan Guzman
SQL Server MVP

> Hi!
>
[quoted text clipped - 95 lines]
>>>
>>> Micle.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.