ITPub博客

首页 > 数据库 > SQL Server > sqlserver2008初步认识

sqlserver2008初步认识

原创 SQL Server 作者:tolilong 时间:2014-01-20 19:52:47 0 删除 编辑

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,存储类型

 QQ图片20140120184435.jpg

 

QQ截图20140120184724.png

QQ截图20140120184740.png

QQ截图20140120185115.png

QQ截图20140120185712.png

QQ截图20140120190009.png

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24237320/viewspace-1073246/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-07-13

  • 博文量
    406
  • 访问量
    1009819