Vous êtes sur la page 1sur 3

Master Database:

----------------
This database stores all critical information such as server specific configurat
ion information, user login accounts,
running processes, system error messages, system stored procedures etc. It also
records the existence of other
databases and the location of the primary files that contain the initialization
information for the user databases.
If this database is corrupted then you can use the utility rebuildm.exe to rebui
ld the master database and
then restore the other user databases accordingly. So it.s always preferable to
have a recent backup of this database.
sysaltfiles
syslockinfo
syscacheobjects
syslogins
syscharsets
sysmessages
sysconfigures
sysoledbusers
syscurconfigs
sysperfinfo
sysdatabases
sysprocesses
sysdevices
sysremotelogins
syslanguages
sysservers

Model Database:
---------------
This database acts as a template for the new databases i.e. whenever you create
a new database the database objects
present in this database get copied onto the new database. For example if you cr
eate a new database without specifying
any size i.e. Create database <d/b name> statement then SQL allocates this datab
ase the default size of model
d/b i.e. 0.75 MB so that the objects in the model database are copied onto the n
ew database. If you want to perform
some common operations on all user databases then you can include those objects
such as tables, procedures etc so that
the new database also contains them.
Msdb Database:
--------------
This is one of the system databases that play an important role in SQL server's
management and maintenance. It contains
some system defined tables that are specific to this database only. The Msdb dat
abase contains task-scheduling,
exception handling, alert management and system operator information i.e. it hol
ds the information of all the operators
such as email addresses or pager numbers and history information about all the b
ackups and restore operations

SQL server agent table in MSDB database:


---------------------------------------
sysalerts
sysjobsteps
syscategories
sysnotifications
sysdownloadlist
sysoperators
sysjobhistory
systargetservergroupmembers
sysjobs
systargetservergroups
sysjobschedules
systargetservers
sysjobservers
systaskids

Tables in MSDB database:


-----------------------
backupfile restorefile
backupmediafamily restorefilegroup
backupmediaset restorehistory
backupset

Tempdb Database:
----------------
As the name suggests this database stores all the temporary tables and the tempo
rary results generated by group by, order by, distinct clause etc. The temporary
data resides on the tempdb database till the user is connected to the SQL serve
r. All the temporary data and tables related to the user get dropped once the us
er logs out from the SQL Server. All the global variables lose their values afte
r SQL Server shuts down or SQL Server crashes. Tempdb auto grows as needed and e
ach time the system is started; tempdb is reset to its default size (i.e. 8.0 MB
for data file and 0.5MB for log file). Because Tempdb is created every time SQL
Server is started, the model database must always exist on a SQL Server system.
Unlike the earlier versions of SQL Server, the databases are not stored on the d
evices but they are stored directly in the files that can grow independently of
each other so now there is no restriction of having master and model database in
a single file (i.e. master device w.r.t earlier version) which sometimes caused
problems with space. But in SQL Server 7.0 you have no problems of space becaus
e all of these databases have their own set of files that can grow independently
of each other.

If the temp DB is full then there 2 solutions..


1.Stop and start the SQL services.
2.Make the database in single user mode and shrink the tempdb using dbc shrinkdb
.
**We cannot take the backup of Temp DB, because it is a session level.
TempDB will be recreated every time the SQL server started.

Tables in every database:


syscolumns
sysindexkeys
syscomments
sysmembers
sysconstraints
sysobjects
sysdepends
syspermissions
sysfilegroups
sysprotects
sysfiles
sysreferences
sysforeignkeys
systypes
sysfulltextcatalogs
sysusers
sysindexes

Vous aimerez peut-être aussi