随笔分类 -  Sqlserver

数据库整理碎片
摘要:USE BookFactoryDECLARE @TableName varchar(255) DECLARE TableCursor CURSOR FOR SELECT TABLE_NAME FROM information_schema.tables WHERE table_type = 'base table' and [TABLE_NAME] <> 'sysdiagrams'... 阅读全文
posted @ 2010-12-09 12:17 Staid 阅读(276) 评论(0) 推荐(0)
整理碎片
摘要:USE BookFactoryDECLARE @TableName varchar(255) DECLARE TableCursor CURSOR FOR SELECT TABLE_NAME FROM information_schema.tables WHERE table_type = 'base table' and [TABLE_NAME] <> 'sysdiagrams'OP... 阅读全文
posted @ 2010-12-09 11:26 Staid 阅读(179) 评论(0) 推荐(0)
重新建立索引脚本
摘要:代码 阅读全文
posted @ 2010-12-09 10:51 Staid 阅读(269) 评论(0) 推荐(0)
获取表所有属性的几个系统表
摘要:--@TableCode为表名ALTER PROC [dbo].[USP__RETURNCOLUMBYOBJECT](@TableCode VARCHAR(MAX))ASBEGINselect sys.columns.name, sys.types.name, sys.columns.max_length, sys.columns.is_nullable,(selectcount(*) from ... 阅读全文
posted @ 2010-07-05 18:06 Staid 阅读(171) 评论(0) 推荐(0)
.Net 执行sqlcmd
摘要:遇到这样一个问题:程序实现创建sqlserver 端点,添加webmethod,删除webmethod,如果直接用ado.net 的sqlhelp 实现,总是报错,后来想到了用sqlcmd,如下代码:被的调用方法:public static string ExeCommand(string commandText) { Process p = new Process(); p.StartInfo.... 阅读全文
posted @ 2010-06-10 21:12 Staid 阅读(436) 评论(0) 推荐(0)
Service Broker
摘要:????? 阅读全文
posted @ 2010-06-03 18:20 Staid 阅读(97) 评论(0) 推荐(0)
sqlserver 把对象发布成webservice遇到的问题
摘要:1、两种验证A.windows验证。确保是windows用户,且能访问sqlserver。新建用户必须成功登录过windows。B.证书验证。比较麻烦,不建议使用。 阅读全文
posted @ 2010-06-01 10:31 Staid 阅读(336) 评论(0) 推荐(0)