Many people does know about system databases but no one remembers detailed version and get confuse in tricky questions. So I have put this in points
But all changes does not impact creation of tempdb. like no. of data and log file settings , initial size
Tempdb Database:
MSDB Database:
Prior to SQL Server 2005, it was actually possible to drop the msdb database, your SQL Server instance was still usable, but you couldn’t maintain any backup history, and you weren’t able to defi ne tasks, alerts, or jobs or set up replication. There is an undocumented tracefl ag that allows you to drop the msdb database,
Master Database :
- It keep track of the server installation as a whole and all other databases that are subsequently created
- Master database has system catalogs that keep information about below on the current instance
- disk space
- file allocations and usage
- system-wide configuration settings
- endpoints
- login accounts
- databases
4. The existence of other servers running SQL Server (for distributed operations)
Model Database:
It is simply a template database. Every time you create a new database, SQL Server makes a copy of model to form the basis of the new database. If you’d like every new database to start out with certain objects or permissions, you can put them in model, and all new databases inherit them. You can also change most properties of the model database by using the ALTER DATABASE command, and those property values then are used
by any new database you create.But all changes does not impact creation of tempdb. like no. of data and log file settings , initial size
Tempdb Database:
- The tempdb database is used as a workspace
- It is unique among SQL Server databases because it’s re-created—not recovered—every time SQL Server is restarted. It’s used for temporary tables explicitly created by users
- Its used for worktables that hold intermediate results created internally by SQL Server during query processing and sorting, for maintaining row versions used in snapshot
- Because the tempdb database is re-created, any objects or permissions that you create in the database are lost the next time you start your SQL Server instance.
- An alternative is to create the object in the model database, from which tempdb is copied. (Keep in mind that any objects that you create in the model database also are added to any new databases you
- If you want objects to exist only in tempdb, you can create a startup stored procedure that creates the objects every time your SQL Server instance starts
MSDB Database:
The msdb database is used by the SQL Server Agent service and other companion services, to perform scheduled activities such as
- Backups
- Replication tasks,
- Service Broker, which provides queuing and reliable messaging for SQL Server.
Prior to SQL Server 2005, it was actually possible to drop the msdb database, your SQL Server instance was still usable, but you couldn’t maintain any backup history, and you weren’t able to defi ne tasks, alerts, or jobs or set up replication. There is an undocumented tracefl ag that allows you to drop the msdb database,
Resource Database:
- The mssqlsystemresource database is a hidden database.
- It is usually referred to as the resource database.
- Executable system objects, such as system stored procedures and functions, are stored here.
- Microsoft created this database to allow very fast and safe upgrades.
- you can upgrade to a new service pack that introduces new system objects by simply replacing the resource database with a new one. you can’t see this database using any of the normal means for viewing databases, such as selecting from sys.databases or executing
- sp_helpdb. It also won’t show up in the system databases tree in the Object Explorer pane of
- SQL Server Management Studio, and it does not appear in the drop-down list of databases
- accessible from your query windows.
- You can see the files for this db in your default binn directory "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn".
- We can copy data and log file of resource database and attach it as normal database also.
No comments:
Post a Comment