SqlServer的一个函数DATABASEPROPERTYEX,查询内部信息

本文涉及的产品
云数据库 RDS SQL Server,基础系列 2核4GB
RDS SQL Server Serverless,2-4RCU 50GB 3个月
推荐场景:
简介: http://msdn.microsoft.com/zh-cn/library/ms186823.aspx DATABASEPROPERTYEX (Transact-SQL) SQL Server 2012 ...
http://msdn.microsoft.com/zh-cn/library/ms186823.aspx

DATABASEPROPERTYEX (Transact-SQL)

返回指定数据库的指定数据库选项或属性的当前设置。

主题链接图标Transact-SQL 语法约定

DATABASEPROPERTYEX ( database , property )
database

database is nvarchar(128)." data-guid="ad7b96045d5a8dc5a240ee5d54dfe440">表示要为其返回命名属性信息的数据库的名称。 database 的数据类型为 nvarchar(128)

property

表示要返回的数据库属性的名称的表达式。 property is varchar(128), and can be one of the following values." data-guid="7a9e798800e9f0196d56ff93e53d5eaf">property 的数据类型为 varchar(128),它可以为以下值之一。 sql_variant." data-guid="32ed1b2345f55b485697ac0f9e6908b5">返回类型为 sql_variant下表显示了各属性值的基本数据类型。

注意注意

如果数据库未启动,则 SQL Server 通过直接访问数据库而不是通过从元数据检索值而检索到的属性将返回 NULL。 即,数据库的 AUTO_CLOSE 设置为 ON,或者数据库已脱机。

属性

说明

返回的值

Collation

数据库的默认排序规则名称。

排序规则名称

NULL = 数据库没有启动。

nvarchar(128)" data-guid="5aa24eeb0e82a38981bf2f9c2e25c3dc">基本数据类型:nvarchar(128)

ComparisonStyle

排序规则的 Windows 比较样式。 ComparisonStyle 是通过使用以下值计算得到的位图。

样式

忽略大小写

1

忽略重音

2

忽略 Kana

65536

忽略宽度

131072

例如,196609 的默认值是将忽略大小写、忽略 Kana 和忽略宽度选项合并在一起的结果。

返回比较样式。

对所有二进制排序规则均返回 0。

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsAnsiNullDefault

数据库遵循 ISO 规则,允许 Null 值。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsAnsiNullsEnabled

所有与 Null 的比较将取值为未知。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsAnsiPaddingEnabled

在比较或插入前,字符串将被填充到相同长度。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsAnsiWarningsEnabled

如果发生了标准错误条件,则将发出错误消息或警告消息。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsArithmeticAbortEnabled

如果执行查询时发生溢出或被零除错误,则将结束查询。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsAutoClose

在最后一个用户退出后,数据库完全关闭并释放资源。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsAutoCreateStatistics

查询优化器根据需要创建单列统计信息以提高查询性能。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsAutoShrink

可以定期自动收缩数据库文件。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsAutoUpdateStatistics

当查询使用现有统计信息并且该统计信息可能过期时,查询优化器将更新该统计信息。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsCloseCursorsOnCommitEnabled

提交事务时打开的游标已关闭。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsFulltextEnabled

支持对数据库进行全文和语义索引。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

注意注意

此属性的值无效。 用户数据库始终启用全文搜索。 SQL Server 的未来版本中将删除此列。 请不要在新的开发工作中使用此列,并尽快修改当前还在使用任何这些列的应用程序。

IsInStandBy

数据库以只读方式联机,并允许还原日志。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsLocalCursorsDefault

游标声明默认为 LOCAL。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsMergePublished

如果安装了复制,则可以发布数据库表供合并复制。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsNullConcat

Null 串联操作数产生 NULL。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsNumericRoundAbortEnabled

表达式中缺少精度时将产生错误。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsParameterizationForced

PARAMETERIZATION 数据库 SET 选项为 FORCED。

1 = TRUE

0 = FALSE

NULL = 输入无效

IsQuotedIdentifiersEnabled

可对标识符使用英文双引号。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsPublished

如果安装了复制,可以发布数据库表供快照复制或事务复制。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsRecursiveTriggersEnabled

已启用触发器递归触发。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsSubscribed

数据库已订阅发布。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsSyncWithBackup

数据库为发布数据库或分发数据库,并且在还原时不用中断事务复制。

1 = TRUE

0 = FALSE

NULL = 输入无效

int" data-guid="20fa395cb3d20e644d269aa47c74b48e">基本数据类型:int

IsTornPageDetectionEnabled

管理员在2009年8月13日编辑了该文章文章。 -->

阅读(842) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册

表情'; tpl += '
'; tpl += ''; tpl += ''; $('.z_move_comment').html(''); $(this).parents('.Blog_right1_8').find('.z_move_comment').html(tpl).show(); }); //引用的评论提交 $('#quota_sbumit').live('click' , function(){ if(isOnLine == '' ) { //showErrorMsg('登录之后才能进行此操作' , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', '/site/login.html'); return false; } var bid = $(this).attr('bid'); var tid = $(this).attr('tid');//被引用人的id var qid = $(this).attr('cid');//引用的id var url = $(this).attr('url'); var text = $('#rmsg').val(); var tname = $(this).attr('tname'); if(text == '' || text=='文明上网,理性发言...') { showErrorMsg('评论内容不能为空!' , '消息提示'); return false; } else { if(mb_strlen(text) > 1000){ showErrorMsg('评论内容不能超过500个汉字' , '消息提示'); return false; } } $.ajax({ type: "post", url: url , data: {'bid': bid , 'to' : tid , 'qid' : qid , 'text': text , 'tname' : tname }, dataType: 'json', success: function(data){ if(data.code == 1){ var tpl = '
'; tpl+= ' '; tpl+= '
'; tpl+= '

' + data.info.username + '' + data.info.dateline + '

'; tpl+= '

' + data.info.quota.username + ':'+ data.info.quota.content + '

'; tpl+= '

' + data.info.content + '

回复 |  删除 |  举报
'; tpl+= ' '; tpl+= '
'; $('#replyList .Blog_right1_8:first').before(tpl); $('.z_move_comment').html('').hide(); } else if(data.code == -1){ //showErrorMsg(data.info , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', '/site/login.html'); } }, error: function(){//请求出错处理 } }); }); //底部发表评论 $('#submitmsg').click(function(){ if(allowComment == 1) { showErrorMsg('该博文不允许评论' , '消息提示'); return false; } var bid = $(this).attr('bid'); var toid = $(this).attr('toid'); var text = $('#reply').val(); var url = $(this).attr('url'); if(text == '' || text=='文明上网,理性发言...') { showErrorMsg('评论内容不能为空!' , '消息提示'); return false; } else { if(mb_strlen(text) > 1000){ showErrorMsg('评论内容不能超过500个汉字' , '消息提示'); return false; } } $.ajax({ type: "post", url: url , data: {'bid': bid , 'to' : toid ,'text': text}, dataType: 'json', success: function(data){ if(data.code == 1) { var tpl = '
'; tpl += ' '; tpl += '
'; tpl += '

' + data.info.username + '' + data.info.dateline + '

'; tpl += '

' + data.info.content + '

'; tpl += '
回复 |   删除 |   举报
'; tpl += ' '; tpl += '
'; $('.Blog_tit3:first').after(tpl); $('#reply').val('文明上网,理性发言...'); } else if(data.code == -1) { showErrorMsg(data.info , '消息提示'); } }, error: function(){//请求出错处理 } }); }); //底部评论重置 $('#reset_comment').click(function(){ $('#reply').val('文明上网,理性发言...'); }); //取消回复 $('#qx_comment').live('click' , function(){ $('.z_move_comment').html('').hide(); }); $('#rmsg, #reply').live({ focus:function(){ if($(this).val() == '文明上网,理性发言...'){ $(this).val(''); } }, blur:function(){ if($(this).val() == ''){ $(this).val('文明上网,理性发言...'); } } }); //删除留言确认 $('.comment_del_mark').live('click' , function(){ var url = $(this).attr('url'); asyncbox.confirm('删除留言','确认', function(action){ if(action == 'ok') { location.href = url; } }); }); //删除时间确认 $('.del_article_id').click(function(){ var delurl = $(this).attr('delurl'); asyncbox.confirm('删除文章','确认', function(action){ if(action == 'ok') { location.href = delurl; } }); }); /* //字数限制 $('#rmsg, #reply').live('keyup', function(){ var id = $(this).attr('id'); var left = Util.calWbText($(this).val(), 500); var eid = '#errmsg'; if(id == 'reply') eid = '#rerrmsg'; if (left >= 0) $(eid).html('您还可以输入' + left + '字'); else $(eid).html('您已超出' + Math.abs(left) + ''); }); */ //加载表情 $('#face').qqFace({id : 'facebox1', assign : 'reply', path : '/image/qqface/'}); $('#mface').qqFace({id : 'facebox', assign : 'rmsg', path:'/image/qqface/'}); /* $('#class_one_id').change(function(){ alert(123213); var id = parseInt($(this).val() , 10); if(id == 0) return false; $('.hidden_son_class span').each(function( index , dom ){ if( dom.attr('cid') == id ) { } }); }); */ //转载文章 var turn_url = "/blog/viewClassPart.html"; $('#repost_bar').click(function(){ if(isOnLine == '' ) { //showErrorMsg('登录之后才能进行此操作' , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', '/site/login.html'); return false; } var id = $(this).attr('bid'); asyncbox.open({ id : 'turn_class_thickbox', url : turn_url, title : '转载文章', width : 330, height : 131, scroll : 'no', data : { 'id' : id }, callback : function(action){ if(action == 'close'){ $.cover(false); } } }); }); /* //转发文章 $('#repost_bar').live('click' , function(){ if(isOnLine == '' ) { //showErrorMsg('登录之后才能进行此操作' , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', '/site/login.html'); return false; } var bid = $(this).attr('bid'); var url = $(this).attr('url'); asyncbox.confirm('转载文章','确认', function(action){ if(action == 'ok'){ $.ajax({ type:"POST", url:url, data: { 'bid' : bid }, dataType: 'json', success:function(msg){ if(msg.error == 0){ showSucceedMsg('转发成功!', '消息提示'); }else if(msg.error == 1){ //location.href = '/index.php?r=site/login'; showErrorMsg('操作失败,您需要先登录!', '消息提示', '/site/login.html'); }else{ showErrorMsg(msg.error_content, '消息提示'); } } }); } }); }); */ });
相关实践学习
使用SQL语句管理索引
本次实验主要介绍如何在RDS-SQLServer数据库中,使用SQL语句管理索引。
SQL Server on Linux入门教程
SQL Server数据库一直只提供Windows下的版本。2016年微软宣布推出可运行在Linux系统下的SQL Server数据库,该版本目前还是早期预览版本。本课程主要介绍SQLServer On Linux的基本知识。 相关的阿里云产品:云数据库RDS SQL Server版 RDS SQL Server不仅拥有高可用架构和任意时间点的数据恢复功能,强力支撑各种企业应用,同时也包含了微软的License费用,减少额外支出。 了解产品详情: https://www.aliyun.com/product/rds/sqlserver
目录
相关文章
|
26天前
|
SQL 索引
在 SQL Server 中使用 STRING_AGG 函数
【8月更文挑战第5天】
303 2
在 SQL Server 中使用 STRING_AGG 函数
|
17天前
|
SQL Java 数据库
jsp中使用Servlet查询SQLSERVER数据库中的表的信息,并且打印在屏幕上
该博客文章介绍了在JSP应用中使用Servlet查询SQL Server数据库的表信息,并通过JavaBean封装图书信息,将查询结果展示在Web页面上的方法。
jsp中使用Servlet查询SQLSERVER数据库中的表的信息,并且打印在屏幕上
|
23天前
|
SQL 数据库
|
26天前
|
SQL 缓存 BI
在 SQL Server 中使用 SPACE 函数
【8月更文挑战第5天】
62 6
在 SQL Server 中使用 SPACE 函数
|
22天前
|
SQL 数据采集 数据处理
如何在 SQL Server 中使用 LEN 函数
【8月更文挑战第9天】
87 1
如何在 SQL Server 中使用 LEN 函数
|
26天前
|
SQL 数据格式
在 SQL Server 中使用 STR 函数
【8月更文挑战第5天】
98 3
在 SQL Server 中使用 STR 函数
|
17天前
|
SQL Java 数据库连接
JDBC连接SQL Server2008 完成增加、删除、查询、修改等基本信息基本格式及示例代码
这篇文章提供了使用JDBC连接SQL Server 2008数据库进行增加、删除、查询和修改操作的基本步骤和示例代码。
|
23天前
|
SQL 监控 索引
如何在 SQL Server 中使用 `PATINDEX` 函数
【8月更文挑战第8天】
146 9
|
23天前
|
SQL 关系型数据库 MySQL
如何在 SQL Server 中使用 `REPLACE` 函数
【8月更文挑战第8天】
296 9
|
2月前
|
SQL 关系型数据库 数据库
关系型数据库SQLserver查询数据
【7月更文挑战第28天】
33 4
下一篇
云函数