Click execute worksunlike sql server management studio
70 CHAPTER 2 ■ INTRODUCING RELATIONAL DATABASES
6. Expand the Databases node in Object Explorer, and then expand the Players database.
9. Expand the Security node, and then expand the Users node to see that the user has been added to the database (you may need to refresh the list from the context menu for the Logins node) as shown in Figure 2-46.
How It Works
In this relatively short example, you’ve performed three different security tasks:
Setting up security correctly in SQL Server 2005 is not a trivial task. The graphical tools make it very easy to create logins and users, but also make it dangerously very easy to delete logins and roles. The main thrust of setting your security settings should be to give users the minimum permission that you can.
You’ve given the band account the minimum privileges possible. The account can query and modify the contents of the tables within the database, but it has no permissions to alter the structure of the database. That’s a permission that you should not give to anyone.
2. In the query box at the top of the MySQL Query Browser window, enter the following query:
GRANT SELECT, UPDATE, INSERT, DELETE ON players.* TO band IDENTIFIED BY 'letmein';
This one query performs all three steps that are required to access the Players database in one query. It creates the login, gives the login access rights to the Players database, and then grants the correct permission within the database.
You can break the query down to four parts:



