Thursday 2 August 2012

How System Database Works In SQL Server


As a DBA, we must know the system database functions, how it works, and whats the use of these system databases in SQL Server. 
What is Master Database In SQL Server?
Records all the system-level information for an instance of SQL Server. In SQL Server 2005, the Master database is the logical repository for the system objects residing in the sys schema. In SQL Server 2000 and previous editions of SQL Server, the Master database physically stored all of the system objects. The first database in the SQL Server startup process. In SQL Server 2005, needs to reside in the same directory as the Resource database.
Functions:
1. Per instance configurations
2. Databases residing on the instance
3. Files for each database
4. Linked\Remote servers
5. Endpoints
6. Logins
What is Resource Database In SQL Server?
The Resource database is responsible for physically storing all of the SQL Server 2005 system objects. This database has been created to improve the upgrade and rollback of SQL Server system objects with the ability to overwrite only this database.

Functions:
1. System object definition

Additional Information 
1. It was Introduced in SQL Server 2005 to help manage the upgrade and rollback of system objects.
2. Prior to SQL Server 2005 the system related data was stored in the master database.
3. Read-only database that is not accessible via the SQL Server 2005 tool set.
4. The database ID for the Resource database is 32767.
5. The Resource database does not have an entry in master.sys.databases
What is TempDB Database In SQL Server?
Temporary database to store temporary tables (#temptable or ##temptale), table variables, cursors, work tables, row versioning, create or rebuild indexes sorted in TempDB, etc. Each time the SQL Server instance is restarted all objects in this database are destroyed, so permanent objects cannot be created in this database.
Functions: 
1. Manage temporary objects listed in the purpose above

Additional Information:
Each time a SQL Server instance is rebooted, the TempDB database is reset to its original state. 
What Is Model Database In SQL Server:
Template database for all user defined databases

Functions: 
1. Objects
2. Columns
3. Users

Additional Information
User defined tables, stored procedures, user defined data types, and etc can be created in the Model database and will exist in all future user defined databases. The database configurations such as the recovery model for the Model database are applied to future user defined databases.
What Is MSDB Database In SQL Server?
Primary database to manage the SQL Server Agent configurations.
Functions: 
1. SQL Server Agent Jobs, Operators and Alerts.
2. DTS Package storage in SQL Server 7.0 and 2000.
3. SSIS Package storage in SQL Server 2005
What Is Distribution Database In SQL Server?
Primary data to support SQL Server replication.
Functions: 
1. Database responsible for the replication meta data.
2. Supports the data for transaction replication between the publisher and subscriber(s) 
What is ReportServer Database In SQL Server?
Primary database for Reporting Services to store the meta data and object definitions 
Functions 
1. Reports security
2. Job schedules and running jobs
3. Report notifications
4. Report execution history 
What Is ReportServerTempDB In SQL Server?
Temporary storage for Reporting Services 
Functions
1. Session information
2. Cache

No comments:

Post a Comment