Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
leduke79
Starting Member
2 Posts |
Posted - 2008-05-14 : 10:14:44
|
| HiI'm not a sql server savvy, so I need assistance on the following two scenarios:A customer runs a script like this (slightly larger, but I ripped away the meat)---------------------------------------create database test_databasegoUSE [test_database]exec sp_changedbowner 'sa'use master;gosp_grantlogin 'server01\CUSTOM_ADMIN';gouse test_database;go-- lots of table creations, where one of the tables are TEST_TABLEsp_addrole 'ADMIN_ROLE';Gosp_grantdbaccess @loginame = 'server01\CUSTOM_ADMIN', @name_in_db = 'USER_ADMIN';gosp_addrolemember @rolename ='ADMIN_ROLE' , @membername = 'USER_ADMIN';GoGRANT SELECT , UPDATE , INSERT , DELETE ON [dbo].[TEST_TABLE] TO [ADMIN_ROLE]GO---------------------------Now, if a person is added to the server01\CUSTOM_ADMIN group, he/she should be able to do the following: (let's say it's a he)- Create a test.udl-file (win xp). Set a provider to sql server.- On the connection-tab enter hostname of database server in the Data Source-field and use windows NT Integrated security.- When he now test the connection, it should work, since he has access to the database.- Also, using the dropdown "3. Enter the initial catalog to use:", he should see SOME datatables. Not ALL, not none. The ones that he has access to.So, if TEST_DATABASE is the only access that server01\CUSTOM_ADMIN has, that database and only that one should show, right?In my customers scenario, some databases show (irrelevant ones), but not TEST_DATABASE. In my test, I still get ALL databases. Even after I rip the guy out of the Administrators-group and Users-group. He's only a member of the CUSTOM_ADMIN-group on server01. "Test connection" succeeds, and all the databases on the server shows. What I hope for is following questions like "He's probably sysadmin, check it" etc, so that I can systematically (using your brains) filter out the reasons for these scenarios to happen.Thanks in advance. |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-05-14 : 22:43:40
|
| Which sql tool do yo use? |
 |
|
|
leduke79
Starting Member
2 Posts |
Posted - 2008-05-16 : 17:55:58
|
| SQL Server 2005 Management Studio |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-05-17 : 17:27:26
|
| Did you double check member of sysadmin role? |
 |
|
|
|
|
|
|
|