BUG: The permissions for a multi-statement table-valued function are not retained when you use the ALTER FUNCTION statement in SQL Server 2000 (888530)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
Bug #: 355483 (SQL Server 8.0) SYMPTOMSIn Microsoft SQL Server 2000, when you use an ALTER FUNCTION
statement to modify a multi-statement table-valued function, the permissions that you
previously granted for the multi-statement table-valued function are not retained after you execute the ALTER FUNCTION
statement.
Note Scalar and inline table-valued functions do not exhibit this problem.
WORKAROUNDTo work around this problem, you must use the GRANT statement to re-create the permissions for the multi-statement table-valued function after you have performed the ALTER FUNCTION
statement. To save the permissions that were previously defined for the multi-statement table-valued function, use the Generate SQL Scripts command. To do this, follow these steps: - Start Enterprise Manager.
- In the Console Root, expand Microsoft SQL Servers.
- Expand SQL Server Group, and then expand the server that contains the function that you are modifying.
- Expand Databases, and then expand the database that contains the function that you are modifying.
- Click User Defined Functions.
- Right-click the function that you want to save the permissions for, and then click All Tasks.
- Click Generate SQL Scripts, and then click the Options tab.
- Under Security Scripting Options, click the Script object-level permissions check box, and then click OK.
- In the File name text box, type FileName, and then click Save.
Note FileName is the name of the Transact-SQL script file.
You can copy the GRANT statements that you want to use from the Transact-SQL script file that you saved. Paste the GRANT statements in to the current ALTER FUNCTION Transact-SQL script that you are working on.
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed in the "Applies to" section.
Modification Type: | Minor | Last Reviewed: | 1/31/2005 |
---|
Keywords: | kbtshoot kbbug KB888530 kbAudDeveloper kbAudITPRO |
---|
|