select * from sysconfigures
select * from sysconfigures where config='1539'
--0 1539 maximum degree of parallelism 3
update sysconfigures set value='1' where config='1539'
--不允许对系统目录进行即席更新。
sp_configure
--allow updates 0 1 0 0
--show advanced options 0 1 1 1
--allow updates 0 1 1 1
EXEC sp_configure 'allow updates', '1'
--下面这句不需要执行,因为默认的是1
EXEC sp_configure 'show advanced option', '1'
--下面的这句要执行,否则它只有等到重启时才会生效
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'max degree of parallelism' ,'1'
RECONFIGURE WITH OVERRIDE
以上为转载
其实 系统目录是不允许更改的 因为直接操作系统表的风险很大的
一般来说可以通过系统SP来完成所需的操作
比如 更改表名:
Sp_rename 存储过程可以修改当前数据库中用户对象的名称,如表、列、索引、存储过程等待。
语法如下:
Sp_rename[@objname=]'object_name',
[@newname=]'new_name'
[,[@objtype=]'object_type']
其中[@objtype=]'object_type'是要改名的对象的类型,其值可以为
'Column' 列
'Database' 数据库
'Index' 索引
'Userdatatype'用户自定义类型
'Object' 对象
值'Object'指代了系统表sysobjects中所有对象,如表、视图、存储过程、触发器、规则、约束等。'object'值为默认值。
例1:更改orders表的列p_id 名称为 products_id
exec sp_rename 'orders.[p_id]','product_id','column'
例2: 更改orders表的名称为p_orders
exec sp_rename 'orders','p_orders'