随笔分类 - SQL SERVER
摘要:默认情况下登录用户除了看到自己拥有管理权限的数据库外。还可以看到其他数据库,在点击打开时会提示没有权限。如下设置可使该用户只能看到自己拥有管理权限的数据库,而看不到其他没有权限的数据库。 (1)取消默认可查看任何数据库 DENY VIEW any DATABASE TO PUBLIC; -- 没有进
阅读全文
摘要:制表符: CHAR(9)换行符: CHAR(10)回车符: CHAR(13)
阅读全文
摘要:获取被锁的对象select request_session_id as spid,OBJECT_NAME(resource_associated_entity_id) as tableNamefrom sys.dm_tran_lockswhere resource_type='OBJECT'解锁KI...
阅读全文
摘要:--删除外键alter table HelpTextInfo drop constraint HelpTextInfo_Helptype_FK1--增加外键alter table HelpTextInfo add constraint HelpTextInfo_Helptype_FK1 fore...
阅读全文
摘要:select distinct object_name(id) from syscomments where id in (select id from sysobjects where type in('V','P')) and text like '%tablename%' 其中sys...
阅读全文
摘要:http://www.cnblogs.com/yuanhang
阅读全文

浙公网安备 33010602011771号