VIII.3.5. Implementing Security

Because you're up to speed on all the clever SQL Server security possibilities, it's time to put them to the test. To begin, you figure out who can already access your server and databases. After you know that, you can grant access to your database server and databases and then set specific permissions on particular objects.

While you're free to use the character-based SQLCMD utility in concert with SQL Server's numerous administrative stored procedures, the graphical SQL Server Management Studio is a much more productive venue for this type of work. Consequently, that's where we illustrate our examples for the balance of the chapter.

VIII.3.5.1. Getting a login list

Just as a login allows you to access a computer, a SQL Server login allows people (or processes) to connect to your database system. Here's how to get a full list of authorized logins:

  1. Start the SQL Server Management Studio.

  2. Connect to your database server.

  3. Expand the Security folder.

  4. Open the Logins folder.

That's all there is to it. All these people or processes can log in to your system.

VIII.3.5.2. Getting a user list

It's not enough to just log in to a SQL Server system. You also need permission to connect to, and work with, one or more databases. The following steps show how you can tell who is allowed to do this:

  1. Start the SQL Server Management Studio.

  2. Connect to your database server.

  3. Expand the Databases folder.

  4. Open the specific folder for the database that you want to check.

Get Microsoft® SQL Server™ 2008 All-In-One Desk Reference For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.