Managing and Monitoring SQL Server 2000 Security

written by: Andrew McLaren; article published: year 2006, month 08;


In: Categories » Computers and technology » Databases » Managing and Monitoring SQL Server 2000 Security

Authentication There are two methods of authentication offered SQL Server 2000, Windows authentication and SQL Server authentication. Windows authentication allows the SQL server authentication to be integrated directly with security on a Windows 2000/NT system. Authentication will depend on the security mode that SQL Server 2000 runs under, Windows Authentication mode, or Mixed Mode.

If you are running SQL Server 2000, you will need to configure the SQL server to run in mixed mode to allow the non-Windows 2000/NT clients to connect where it will interact with computers running operating systems other than Windows 2000 or Windows NT. Mixed mode allows clients who are not operating Windows 2000/NT to connect to a SQL 2000 server using SQL Server authentication.

If you are running in a fully Windows 2000/NT environment then you should configure the SQL server to run under the Windows Authentication security mode. In Windows Authentication mode the SQL server relies on Windows 2000/NT for security. While running under the Windows Authentication Mode, a server can utilize security features such as password aging, complexity requirements, and encryption. The SQL server grants access based on the Windows authentication of the user.

Auditing The basis of auditing in SQL Server 2000 is the server side SQL Trace and the client side viewing utilities. Auditing is configured using the SQL Profiler. With the SQL Profiler you can create a custom auditing scheme that allows you to audit nearly every event that is applied to server data and security. SQL Server 2000 allows login auditing similar to auditing available on Windows 2000/NT. Administrators can select the level of auditing that they require via the Enterprise Manager. Auditing keeps track of whenever a user is successful or unsuccessful in their attempt to log on.

C2 auditing is a special type of auditing required by some government agencies that requires that every event occurring be logged. SQL 2000 Server is capable of C2 auditing, but the overhead for maintaining this level of auditing is very high.

Creating Logins Logins are used to prevent intentional or unintentional tampering from unauthorized users. Each login has a set of sub-accounts that are linked to it that provide aliases for it. Logins can be created in three ways; in SQL Server 2000, through the Enterprise Manager, or by using T-SQL commands.

Users A user is defined for a particular database and linked to a login via a sub-account. Users can be created through the Enterprise Manager, the Login Wizard or through the use of T-SQL. Once a user is created, permissions should be assigned to that reflect the job for which it was created. Permissions are assigned to a specific user login. There are two types of permissions that can be assigned to a user. Server permissions are granted to allow certain users to perform database administration tasks. Database permissions are used to control access to database objects.

Permissions and Ownership of Database Objects Every object in a SQL database has a user who is designated as an owner or dbo. When an object is first created, the only person who has the ability to perform any operations on the object is the dbo. The dbo will grant other users permission to perform certain operations on the object. For a user to be able to manipulate, perform operations on, or even see a database object the user must have permissions to do so. Permissions on tables and views are:

  • INSERT
  • UPDATE
  • DELETE
  • SELECT
  • REFERENCES

Alternatively, the owner of a database object may assign ALL permissions to grant a user all of the above. A user must have the appropriate permissions before they can execute the corresponding statement. Owners of a stored procedure can grant EXECUTE permission to a user to enable the user to run the stored procedure.

Database Roles The task of managing permissions to many database users can be simplified through the use of database roles. Using database roles allows like permissions to be assigned to many users without having them being individually assigned. Roles can be created and managed using the Enterprise Manager or through the use of T-SQL Statements. There are several predefined roles that are established when SQL Server 2000 is installed:

  • sysadmin: performs any server activity
  • dbcreator: creates and alter databases
  • diskadmin: manages disk files
  • setupadmin: manages linked servers and startup procedures
  • bulkadmin: performs bulk inserts
  • serveradmin: sets any server option and shut down the database
  • securityadmin: manages logins and create database permissions
  • processadmin: manages SQL processes

Other roles can be defined and altered by the administrator after installation. Fixed roles cannot be modified.

Managing Security through Other Means Security can be managed through other means through limiting access to objects that could affect sensitive data. Like permissions, access to functions and stored procedures can be explicitly restricted or explicitly granted. In addition there are several system stored procedures that allow an administrator to manage security more easily:

  • sp_grantlogin Allows a Windows 2000/NT user to connect with Windows authentication
  • sp_addapprole Adds an application security role
  • sp_changeobjectowner Changes the owner of an object in a database
  • sp_changedbowner Changes the owner of a database
  • sp_defaultlanguage Changes the default language of a login
  • sp_addlogin Adds a SQL Server login that uses SQL Server Authentication
  • sp_helplogins Supplies information about logins and users associated to the database
  • sp_addrolemember Adds a security account as a member of an existing database role
  • sp_grantdbaccess Adds a security account to a database and allows an administrator to grant permissions

Maintaining security and protecting information from triggers that may negatively alter sensitive information can be achieved by establishing constraints. Properly established constraints can ensure that data integrity and security is maintained across a database.

legal disclaimer

1) Our website is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringements, please read the Terms of service and contact us to investigate the problem.
2) The E-articles directory team is not responsible for inaccuracies, falsehoods, or any other types of misinformation this tutorial may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here. Please read the Terms of service

Useful tools and features

Translate this article to...    Send this article to you or to a friend

Link to this article from your page   
If you like this article (tutorial), please link to it from your web page using the information above. Linking to this page, this is the only way to help us improve our service, the same time providing your visitors with a way to improve their online experience.

related articles

1. Tips for Designing a Better SQL Database
Keeping the following subjects in mind helps ensure that your database design and updates go smoothly. Don’t design a database that copes with the norm. Tempting as it is to design a database that covers most situations, doing so is dangerous. The unexpected happens just when you least expect it, so make sure you design your database to cover all situations that could arise, or at least ensure that it can cope with the unusual situations. Even if a client tells you not to worry about the possibility of two people attem...

2. Why and When to Use a Database
When there are a huge number of alternative ways to store data, why should you trouble yourself creating a database? What advantages does a database hold? The main advantage is fast and efficient data retrieval. A database helps you to organize your data in alogical manner. Database management systems are fine-tuned to rapidly retrieve the data you want in the way you want it. Databases also enable you to break data into specific parts. Retrieving data from a database is called querying. You’ll often see the term SQL query, which brief...

3. Creating SQL Server 2000 Databases
Attaching and Detaching Databases Detaching/attaching is used in moving a database between computers or physical disks. When a database is detached, the links from the server to the data files and transaction logs are removed. When you attach a database, you re-establish those links. When you detach and re-attach, you eliminate the need to restore the database backup manually. When a database is reattached, all files that have changed location must be specified. Filegroups Filegroups ar...

4. Developing Notification Services Applications in SQL server 2005
The process for developing Notification Services applications begins with defining the rules that govern how the application works. Next, you must compile the application. Then you need to construct an interface that allows the user to add subscriptions to the application. Finally, you’ll need to add any custom components that may be needed by the application. Let’s look at each of these steps in more detail. Defining the Application The Notification Services developer uses a combination of XML...

5. SQL Server Service Broker Activation
SQL Server Service Broker activation is another unique feature of the SQL Server Service Broker subsystem. Activation enables you to create a stored procedure that is associated with a given input queue. The purpose of the stored procedure is to automatically process messages from that queue. As each new message comes in, the associated stored procedure is automatically executed to handle the incoming messages. If the stored procedure encounters an error, it can throw an exception and be automatically recycled. ...

6. SQL Server 2005 Administrative Tools
This article gives you an overview of the SQL Server 2005 administrative tools, including: Profiler enhancements Database Tuning Advisor Assisted editors Profiler Enhancements With SQL Server 2005, Profiler gets an overhaul as well. The new Profiler now supports the ability to trace both SSIS and Analysis Services commands. SQL Server 2000 was limited to tracing relational database calls only. By having these capabilities, you can use these ...

7. Notification Services in SQL server 2005
A Notification Services application is a software layer that sits between an information source and the intended recipient of that information. The Notification Services application monitors certain predefined events and can intelligently filter and route the information about those events to a variety of different target devices using a personalized delivery schedule. Notification Services applications consist of three basic components: events, subscriptions, and notifications. Events In a Notificatio...

8. Understanding CLR and SQL Server 2005 Database Engine
The integration of the CLR with SQL Server extends the capability of SQL Server in several important ways. While T-SQL, the existing data access and manipulation language, is well suited for set-oriented data access operations, it also has limitations. Designed more than a decade ago, T-SQL is a procedural language, not an object-oriented language. The integration of the CLR with SQL Server 2005 brings with it the ability to create database objects using modern object-oriented languages like VB.NET and C#. While thes...

9. BI Development Studio in SQL Server 2005
While SQL Server Management Studio is used to develop relational database projects and administer and configure existing objects in SQL Server 2005, the new Business Intelligence (BI) Development Studio is used to create Business Intelligence solutions. Unlike the SQL Server Management Studio, the BI Development Studio is not really designed to be an administrative tool. You use the BI Development Studio to work with Analysis Services projects, to develop and deploy Reporting Services reports, and to design Int...