MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 23rd, 2003, 04:34 AM
buggirl buggirl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Sweden
Posts: 6 buggirl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question user rights

Can anyone tell me how to give users rights to create tables, see data and so on?
I'm new to MS SQL Server 2000 and can't quite figure it out by myself.

Reply With Quote
  #2  
Old October 5th, 2003, 07:19 AM
juanito juanito is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 19 juanito User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
My friend Buggirls.
To give to "some" users the rigths to handle a database, you have to create and authentification proccess. Julie Meloni has a very good explained tutorial @ :

http://www.zend.com/zend/tut/authen...on.php#Heading8

Easy to understand, the best way is to create a table with the name, username and passwords of the users with rights to handle the table.

Best regards

ciao. Juanelo Von Seattle

Reply With Quote
  #3  
Old October 5th, 2003, 12:00 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,335 Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level)Scorpions4ever User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 12 h 42 m 29 sec
Reputation Power: 662
Here's how to do what you want in SQL Server 2000 using Enterprise Manager. I assume you know how to add logins already -- let me know if you don't. 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.

Hope this helps
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month

Last edited by Scorpions4ever : October 5th, 2003 at 12:12 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > user rights


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway