Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Re: [SQL2000] permissions to use view based on tables from many databases
By default when you add a user they do not have any permissions to do
anything.  So just make sure you don't add them to any of the server or
database roles.  Then simply GRANT them execute permission on that sp.

--
Andrew J. Kelly  SQL MVP


"Grzegorz Danowski" < gdn__na@serwerze__po
czta.onet.pl> wrote in message
 news:dteimk$1b7$1@in
ews.gazeta.pl...
> Hi
>
> I have two databases: Customers and Operations. In Customers database I
> have made a view based on a few tables from both Customers and Operations
> (left join - customers without any operations). In the same database
> (Customers) I have created a stored procedure based on the view. Finally
> I'd like to give to some users permission only to exec the stored
> procedure.
>
> Have I to add the users to Customers? If yes, please describe me how to
> limit the users privileges only to execution the stored procedure (no
> rights to open tables or view from Customers).
>
> Regards,
> Grzegorz
>
> Ps. I had sent the post on microsoft.public.sqlserver.security, but I had
> no answer.



Report this thread to moderator Post Follow-up to this message
Old Post
Andrew J. Kelly
02-21-06 12:23 PM


Re: [SQL2000] permissions to use view based on tables from many databases
Well, it works fine in situations when all tables are in the same database,
but it doesn't work when tables are in two databases. If user have no rights
to read source table from other database SQL Server shows error:
"SELECT permission denied on object 'CustomersData', database 'Customers',
owner 'dbo'."

Grzegorz


Użytkownik "Andrew J. Kelly" < sqlmvpnooospam@shadh
awk.com> napisał w
wiadomości news:%23Iia6cuNGHA.2336@TK2MSFTNGP12.phx.gbl...
> By default when you add a user they do not have any permissions to do
> anything.  So just make sure you don't add them to any of the server or
> database roles.  Then simply GRANT them execute permission on that sp.
>
> --
> Andrew J. Kelly  SQL MVP


Report this thread to moderator Post Follow-up to this message
Old Post
Grzegorz Danowski
02-21-06 02:23 PM


Re: [SQL2000] permissions to use view based on tables from many databases
Are the objects owned by the same owner in both db's?  If so you may have to
specify rights on the other tables.  Is Cross database Ownership chaining
turned on?

http://support.microsoft.com/?kbid=810474

--
Andrew J. Kelly  SQL MVP


"Grzegorz Danowski" < gdn__na@serwerze__po
czta.onet.pl> wrote in message
 news:dtf589$5h3$1@in
ews.gazeta.pl...
> Well, it works fine in situations when all tables are in the same
> database, but it doesn't work when tables are in two databases. If user
> have no rights to read source table from other database SQL Server shows
> error:
> "SELECT permission denied on object 'CustomersData', database 'Customers',
> owner 'dbo'."
>
> Grzegorz
>
>
> Użytkownik "Andrew J. Kelly" < sqlmvpnooospam@shadh
awk.com> napisał w
> wiadomości news:%23Iia6cuNGHA.2336@TK2MSFTNGP12.phx.gbl... 
>



Report this thread to moderator Post Follow-up to this message
Old Post
Andrew J. Kelly
02-21-06 02:23 PM


Re: [SQL2000] permissions to use view based on tables from many databases
Thanks, it works.
Grzegorz

Użytkownik "Andrew J. Kelly" < sqlmvpnooospam@shadh
awk.com> napisał w
wiadomości news:O07NN2uNGHA.2064@TK2MSFTNGP09.phx.gbl...
> Are the objects owned by the same owner in both db's?  If so you may have
> to specify rights on the other tables.  Is Cross database Ownership
> chaining turned on?
>
> http://support.microsoft.com/?kbid=810474
>
> --
> Andrew J. Kelly  SQL MVP
>
>
> "Grzegorz Danowski" < gdn__na@serwerze__po
czta.onet.pl> wrote in message
>  news:dtf589$5h3$1@in
ews.gazeta.pl... 
>
>


Report this thread to moderator Post Follow-up to this message
Old Post
Grzegorz Danowski
02-21-06 02:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 05:06 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006