Forum

SQL 2005 Yetkileri,...
 
Bildirimler
Hepsini Temizle

SQL 2005 Yetkileri, Birkaç Soru

2 Yazılar
2 Üyeler
0 Likes
489 Görüntüleme
(@FatihDemir)
Gönderiler: 8
Active Member
Konu başlatıcı
 

S.A arkadaşlar.. 

Yeni bir konu açmamak için eski konuları taradım, fakat tam olarak bulamadım sorularımın cevabını.. Benim bir Sql projem var, erişimi C# üzeriden yapıyorum.. Bu projede, bir admin kullanıcı olacak, bir de normal kullanıcı.. Benim sorularım şunlar:

1) SQL'e windows authentication ile bağlanıldığında yetki dağılımı yapılabiliyor mu, yoksa sadece sql server authentication ile mi bağlanmak lazım?

2) Eğer  sql server authentication ile bağlanmak gerekiyorsa, kulanıcı ismimi ve şifremi  unutmuşum, tekrar elde edebilir miyim? : ))

3) Yetki verme olayını nasıl halledebilirim, kısaca anlatabilirseniz sevinirim.. 

 
Gönderildi : 27/05/2009 00:06

(@mesutsariyar)
Gönderiler: 2515
Co-Founder
 

1- Her iki türde de db üzerinde yetki dağılımı yapılabilir. User, sql dışında win uygulamalarını da kullanıyor ise hesap win auth olur.


2- Resetlersiniz.


3- Bu konuda bir link ten alıntı verebilirim;


Here's how to assign permissions to a login:

For creating databases
0. Go into Enterprise Manager
1. Expand the Server Group
2. Expand the server
3. Expand security and then click on Server Roles
4. You should see several roles (Bulk Insert, Disk admin, Setup admin etc.) including one called "Database Creators". Double click on Database Creator and add the logins for this role. Note that the login should have already been created previously.

For reading/manipulating data -- Method A -- permissions for individual user.
0. Go into Enterprise Manager
1. Expand the Server Group
2. Expand the server
3. Expand the Databases and then expand the database that you want to set up the permissions for.
4. Select Users and select the user that you want to give permissions to.
5. Right click on the user and select Properties. In the dialog box that comes up, click the Permissions button and you should be presented with another dialog box with a list of tables, stored procedures, views etc. You can set the permissions on various tables for this login from here.

For reading/manipulating data -- Method B -- permissions for a database role.
0. Go into Enterprise Manager
1. Expand the Server Group
2. Expand the server
3. Expand the Databases and then expand the database that you want to set up the permissions for.
4. Select Roles and you should see a list of roles on the right pane.
5. Some of the predefined roles (e.g.) db_datareader may already do what you're looking for. However, you may not want to give read rights to all tables. In this case, what you want to do is create a new role. Right click on the right pane and select "New Database Role...". Set the role as a Standard Role and add any logins here, if you like (you can also add the logins to the role later on). Then click OK to create the new role.
6. Right click on the new role you just created and select Properties. Then click on the Permissions button and set up the permissions for this role.
7. You can also assign more users/logins to this role later on from the Properties dialog box.

So, which is preferable, method A or B. Method A is a little shorter for one user. However, method B is much more preferable, especially if you have multiple users. With method A, you'd have to manually repeat all the assigning permissions steps for every new login. With method B, you can simply assign a new login to a role and have it get all the permissions of that role instantly. Note that you can also assign the same login to multiple roles.


  http://forums.devshed.com/ms-sql-development-95/user-rights-85952.html


 

 
Gönderildi : 27/05/2009 11:41

Paylaş: