In SQLServer, why is granting permission not allowing the user to add the db correctly?
This is my setup:
- SQL Server 2005
- The user is already configured as a user on the server, but not on the database.
- GRANT Execute ON [GetOrders] TO [UserA] AS [dbo]
As you can see, I missed a step. I haven't added UserA to the database yet. This won't work and allows the object to be executed.
I believe that in 2000 he would have been wrong and would not have let me do it.
I now have all of these objects with the correct permissions, but users cannot see the database. To solve this problem, I have to remove users from the database, add them correctly and then grant permissions.
Why is this allowed and is there a way to prevent it or create it automatically when a new user is granted object rights.
thank.
source to share
This likely allowed DBAs to have the flexibility to change users and permissions when the database is not connected to your production server. I don't believe you need to re-add users. Take a look at this guy's script: http://www.lazycoder.com/weblog/2007/06/04/re-associate-sql-users-with-logins/
source to share