首页 > 数据库 > SQL Server > sqlserver2008初步认识
1,resouce database
SQL Server 2005 added the Resource database. This database contains all the read-only critical
system tables, metadata, and stored procedures that SQL Server needs to run. It does not contain any information about your instance or your databases, because it is only written to during an installation of a new service pack. The Resource database contains all the physical tables and stored procedures referenced logically by other databases. The database can be found by default in C:\Program Files\Microsoft SQLServer\MSSQL10.MSSQLSERVER\MSSQL\Binn.mdf and .ldf, and there is only one Resource database per instance.
SELECT serverproperty('resourceversion') ResourceDBVersion,
serverproperty('resourcelastupdatedatetime') LastUpdateDate
2,The master Database
The master database contains the metadata about your databases (database configuration and file location),logins, and configuration information about the instance.
select * from sys.databases
3,tempdb Database
The tempdb database is similar to the operating system paging file. It’s used to hold temporary objects created by users, temporary objects needed by the database engine, and row-version information
4,model Database
model is a system database that serves as a template when SQL Server creates a new database.
5,msdb Database
msdb is a system database that contains information used by SQL Server agent, log shipping, SSIS, andthe backup and restore system for the relational database engine.
6,Schemas
Schemas enable you to group database objects together.
7,查看列类型
select o.name table_name ,c.name column_name,TYPE_NAME(c.user_type_id) as column_type
from sys.columns c,sys.objects o
where c.object_id=o.object_id and o.name='a'
8,存储类型
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24237320/viewspace-1073246/ ,如需转载,请注明出处,否则将追究法律责任。