没有合适的资源?快使用搜索试试~ 我知道了~
sp_dboption.txt
需积分: 50 33 下载量 137 浏览量
2019-05-17
17:02:03
上传
评论 1
收藏 13KB TXT 举报
温馨提示
试读
18页
sp_dboption函数命令SQLserver2008以上版本适用 SQLserver2008以上版本,不再支持sp_dboption函数,但你可以下载sp_dboption函数,在master直接执行,后面就可以使用sp_dboption函数命令
资源推荐
资源详情
资源评论
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
create procedure sp_dboption -- 1999/08/09 18:25
@dbname sysname = NULL, /* database name to change */
@optname varchar(35) = NULL, /* option name to turn on/off */
@optvalue varchar(10) = NULL /* true or false */
as
set nocount on
declare @dbid int /* dbid of the database */
declare @catvalue int /* number of category option */
declare @optcount int /* number of options like @optname */
declare @allstatopts int /* bit map off all options stored in sysdatqabases.status
** that can be set by sp_dboption. */
declare @alloptopts int /* bit map off all options stored in sysdatqabases.status
** that can be set by sp_dboption. */
declare @allcatopts int /* bit map off all options stored in sysdatqabases.category
** that can be set by sp_dboption. */
declare @exec_stmt nvarchar(550)
declare @fulloptname varchar(35)
declare @alt_optname varchar(50)
declare @alt_optvalue varchar(30)
/*
** If no @dbname given, just list the possible dboptions.
GO
SET ANSI_NULLS ON
GO
create procedure sp_dboption -- 1999/08/09 18:25
@dbname sysname = NULL, /* database name to change */
@optname varchar(35) = NULL, /* option name to turn on/off */
@optvalue varchar(10) = NULL /* true or false */
as
set nocount on
declare @dbid int /* dbid of the database */
declare @catvalue int /* number of category option */
declare @optcount int /* number of options like @optname */
declare @allstatopts int /* bit map off all options stored in sysdatqabases.status
** that can be set by sp_dboption. */
declare @alloptopts int /* bit map off all options stored in sysdatqabases.status
** that can be set by sp_dboption. */
declare @allcatopts int /* bit map off all options stored in sysdatqabases.category
** that can be set by sp_dboption. */
declare @exec_stmt nvarchar(550)
declare @fulloptname varchar(35)
declare @alt_optname varchar(50)
declare @alt_optvalue varchar(30)
/*
** If no @dbname given, just list the possible dboptions.
** Only certain status bits may be set or cleared by sp_dboption.
*/
/*
** Get bitmap of all options that can be set by sp_dboption.
*/
select @allstatopts=number from master.dbo.spt_values where type = 'D'
and name = 'ALL SETTABLE OPTIONS'
select @allcatopts=number from master.dbo.spt_values where type = 'DC'
and name = 'ALL SETTABLE OPTIONS'
select @alloptopts=number from master.dbo.spt_values where type = 'D2'
and name = 'ALL SETTABLE OPTIONS'
if @dbname is null
begin
select 'Settable database options:' = name
from master.dbo.spt_values
where (type = 'D'
and number & @allstatopts <> 0
and number not in (0,@allstatopts)) /* Eliminate non-option entries */
or (type = 'DC'
and number & @allcatopts <> 0
and number not in (0,@allcatopts))
or (type = 'D2'
and number & @alloptopts <> 0
and number not in (0,@alloptopts))
order by name
return (0)
*/
/*
** Get bitmap of all options that can be set by sp_dboption.
*/
select @allstatopts=number from master.dbo.spt_values where type = 'D'
and name = 'ALL SETTABLE OPTIONS'
select @allcatopts=number from master.dbo.spt_values where type = 'DC'
and name = 'ALL SETTABLE OPTIONS'
select @alloptopts=number from master.dbo.spt_values where type = 'D2'
and name = 'ALL SETTABLE OPTIONS'
if @dbname is null
begin
select 'Settable database options:' = name
from master.dbo.spt_values
where (type = 'D'
and number & @allstatopts <> 0
and number not in (0,@allstatopts)) /* Eliminate non-option entries */
or (type = 'DC'
and number & @allcatopts <> 0
and number not in (0,@allcatopts))
or (type = 'D2'
and number & @alloptopts <> 0
and number not in (0,@alloptopts))
order by name
return (0)
剩余17页未读,继续阅读
资源评论
chenyaohui3
- 粉丝: 1
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 机器学习和数据挖掘课程设计-米其林餐厅数据挖掘管理系统源码+使用文档说明.zip
- html html html展示我与ai的对化
- 数据结构课程设计-全国交通出行咨询模拟系统C语言实现源码.zip
- cef-binary-109.0.1+gcd5e37a+chromium-109.0.5414.8-windows32
- 基于C语言的全国交通咨询系统模拟源码.zip
- 正点原子HAL库 STM32F4 DMA(学习自用附源码)
- 炫酷代码雨,超级炫酷哦!!!
- 基于物联网MQTT协议的智能停车场管理系统
- POETIZE个人博客系统源码 - 最美博客
- 基于深度学习的行人检测系统源码+项目说明(YoloV3+Tensorflow).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功