With in a SP Truncate dbo.table table-name permissions..
From: venkat (vgaddam@us.imshealth.com)
Date: 07/18/02
- Next message: Andrew J. Kelly: "Re: With in a SP Truncate dbo.table table-name permissions.."
- Previous message: sardinka: "Re: User id"
- Next in thread: Andrew J. Kelly: "Re: With in a SP Truncate dbo.table table-name permissions.."
- Reply: Andrew J. Kelly: "Re: With in a SP Truncate dbo.table table-name permissions.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "venkat" <vgaddam@us.imshealth.com> Date: Thu, 18 Jul 2002 06:38:00 -0700
Hi,
I have procedure with in the procedure I there is a
Truncate dbo.table table-name. According to sql server
books on line. If i give execute permission to this
procedure to a user that user should be able to execute
this procedure with out any other permissions on the
table. But that’s not true, it gives error does not have a
truncate table permissions on the table. I know it works
fine if I give "db_ddladmin" permissions on that user.
But I cannot give this permission on the production
database to a normal user.
If anybody has the solution please let me know.
SQL Server Books on line:
Qualifying Names Inside Stored Procedures
Inside a stored procedure, object names used with
statements (for example, SELECT or INSERT) that are not
user-qualified default to the owner of the stored
procedure. If a user who creates a stored procedure does
not qualify the name of the tables referenced in SELECT,
INSERT, UPDATE, or DELETE statements within the stored
procedure, access to those tables through the stored
procedure is restricted by default to the creator of the
procedure.
Object names used with the statements ALTER TABLE, CREATE
TABLE, DROP TABLE, TRUNCATE TABLE, CREATE INDEX, DROP
INDEX, UPDATE STATISTICS, and DBCC must be qualified with
the name of the object owner if other users are to use of
the stored procedure. For example, Mary, who owns table
marytab, must qualify the name of her table when it is
used with one of these statements if she wants other users
to be able to execute the stored procedure in which the
table is used.
This rule is necessary because object names are resolved
when the stored procedure is run. If marytab is not
qualified and John tries to execute the procedure, SQL
Server looks for a table called marytab owned by John.
Thanks a millions
Venkat
gaddamv@hotmail.com
610 834 5241
- Next message: Andrew J. Kelly: "Re: With in a SP Truncate dbo.table table-name permissions.."
- Previous message: sardinka: "Re: User id"
- Next in thread: Andrew J. Kelly: "Re: With in a SP Truncate dbo.table table-name permissions.."
- Reply: Andrew J. Kelly: "Re: With in a SP Truncate dbo.table table-name permissions.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|