随笔分类 -  SqlServer

1 2 下一页
Consuming JSON Strings in SQL Server
摘要:https://www.simple-talk.com/sql/t-sql-programming/consuming-json-strings-in-sql-server/Consuming JSON Strings in SQL Server15 November 2010byPhil Fact... 阅读全文
posted @ 2015-07-03 16:12 Alan Yang 阅读(268) 评论(0) 推荐(0) 编辑
B树
摘要:http://www.cnblogs.com/oldhorse/archive/2009/11/16/1604009.htmlB树即二叉搜索树: 1.所有非叶子结点至多拥有两个儿子(Left和Right); 2.所有结点存储一个关键字; 3.非叶子结点的左指针指向小于其关键字的子树,右指针指向大于其关键字的子树;如: B树的搜索,从根结点开始,如果查询的关键字与结点的关键字相等,那么就命中;否则,如果查询关键字比结点关键字小,就进入左儿子;如果比结点关键字大,就进入右儿子;如果左儿子或右儿子的指针为空,则报告找不到相应的关键字;如果B树的所有非叶子结点的左右子树的结点数目均保持差不多(平衡), 阅读全文
posted @ 2013-07-10 23:25 Alan Yang 阅读(153) 评论(0) 推荐(0) 编辑
不要用把无序GUID既作为主键又作为聚集索引【转】
摘要:http://www.cnblogs.com/zhouruifu/archive/2012/04/18/2454088.html我一直想当然的认为用GUID做主键没什么大不了,不就是比int多了12位而已吗?而且现在都是SQL Server 2008, 2012时代了,应该更不是问题了吧?而且微软很多项目也是用GUID做主键啊?Sharepoint, ASP.NET SQL Server Membership Provider默认的表等等。而且还有许多而且......果真这样吗?直到我读了这两篇文章后GUIDs as PRIMARY KEYs and/or the clustering key 阅读全文
posted @ 2013-06-15 10:55 Alan Yang 阅读(424) 评论(0) 推荐(0) 编辑
Why you want to be restrictive with shrink of database files [From karaszi]
摘要:From: http://www.karaszi.com/SQLServer/info_dont_shrink.aspOverviewIf you want the really short story, then check out this analogy - hopefully you come back here and read the full story. Introduced in SQL Server 7.0 was the ability automatically grow and to shrink the physical size of database data 阅读全文
posted @ 2012-10-24 11:01 Alan Yang 阅读(265) 评论(0) 推荐(0) 编辑
Microsoft SQL Server Compact 4.0 is available for download
摘要:SQL CE Team SQL CE Team6,285 Points320Recent AchievementsNew Blog RaterBlog Conversation StarterNew Blog CommentatorView Profile12 Jan 2011 6:03 AM Comments2The SQL Server Compact team is happy to announce that the next version of Microsoft SQL Server Compact 4.0 has been released, and is available 阅读全文
posted @ 2012-07-31 19:50 Alan Yang 阅读(711) 评论(0) 推荐(0) 编辑
Sql Server Compact 4.0部署注意事项 ---by 小尾鱼的池塘
摘要:Sql Server Compact 4.0部署注意事项 By: 小尾鱼的池塘:http://www.cnblogs.com/xiaoweiyu/Sql Server Compact 4.0相比3.5版本增强了很多,支持Entity Framework 4.1,对于轻量级应用来讲,使用Sql Server Compact 4.0是个很好的选择,而且部署相当方便,不需要Sql Server Compact 4.0的安装包,仅需要发布相关的dll以及web.config配置即可。开发环境下,需要安装vs2010 sp1Microsoft SQL Server Compact 4.0 Visual 阅读全文
posted @ 2012-07-31 19:18 Alan Yang 阅读(212) 评论(0) 推荐(0) 编辑
VS 2010 SP1 and SQL CE ----- by ScottGu
摘要:VS 2010 SP1 and SQL CE Last month we released the Beta of VS 2010 Service Pack 1 (SP1). You can learn more about the VS 2010 SP1 Beta from Jason Zander’s two blog posts about it, and from Scott Hanselman’s blog post that covers some of the new capabilities enabled with it. You can download and insta 阅读全文
posted @ 2012-07-31 19:17 Alan Yang 阅读(423) 评论(0) 推荐(0) 编辑
更改SQL Server 2008数据库登录方式 [转]
摘要:如果在安装过程中选择“Windows 身份验证模式”,则 sa 登录名将被禁用。如果稍后将身份验证模式更改为“SQL Server 和 Windows 身份验证模式”,则 sa 登录名仍处于禁用状态。若要启用 sa 登录帐户,请使用 ALTER LOGIN 语句。安全说明:sa 帐户是一个广为人知的 SQL Server 帐户,并且经常成为恶意用户的攻击目标。除非您的应用程序需要使用 sa 帐户,否则请不要启用它。为 sa 登录名使用一个强密码非常重要。sa 登录名只能使用 SQL Server 身份验证连接到服务器。更改安全身份验证模式在 SQL Server Management Stu. 阅读全文
posted @ 2011-11-23 17:33 Alan Yang 阅读(1699) 评论(0) 推荐(0) 编辑
Renaming the Physical Filename for Datafiles in SQL Server 2008
摘要:using T SQLALTER DATABASEdatabaseName SET OFFLINEGOALTER DATABASE databaseNAme MODIFY FILE (NAME =db, FILENAME = 'C:\ProgramFiles\Microsoft SQL Server\MSSQL.2\MSSQL\Data\db.mdf')GO--if changing log file name ALTER DATABASE databaseNAme MODIFY FILE (NAME = db_log, FILENAME ='C:\Program Fi 阅读全文
posted @ 2011-09-27 12:06 Alan Yang 阅读(221) 评论(0) 推荐(0) 编辑
关于缓慢变化维度 slowly changing dimensions [转]
摘要:关于缓慢变化维度 slowly changing dimensions 维度建模的数据仓库中,有一个概念叫Slowly Changing Dimensions,中文一般翻译成“缓慢变化维”,经常被简写为SCD。缓慢变化维的提出是因为在现实世界中,维度的属性并不是静态的,它会随着时间 的流失发生缓慢的变化。这种随时间发生变化的维度我们一般称之为缓慢变化维,并且把处理维度表的历史变化信息的问题称为处理缓慢变化维的问题,有时也简称 为处理SCD的问题。本文则是探讨数据仓库缓慢变化维的方案解决。 缓慢变化维定义 Wikipedia中的定义: Dimension is a term in data m. 阅读全文
posted @ 2011-05-26 15:32 Alan Yang 阅读(477) 评论(0) 推荐(0) 编辑
在T-SQL语句中访问远程数据库(openrowset/opendatasource/openquery) [转]
摘要:Original Link:http://www.cnblogs.com/OpenCoder/archive/2010/03/18/1689321.html1、启用Ad Hoc Distributed Queries在使用openrowset/opendatasource前搜先要启用Ad Hoc Distributed Queries服务,因为这个服务不安全所以SqlServer默认是关闭的启用Ad Hoc Distributed Queries的方法SQL Server 阻止了对组件 'Ad Hoc Distributed Queries' 的 STATEMENT'O 阅读全文
posted @ 2011-05-12 10:40 Alan Yang 阅读(370) 评论(0) 推荐(0) 编辑
SSRS 2008 报表表头不连续
摘要:COLUMN HEADINGS DO NOT REPEAT IN SSRS 2008I've just stumbled upon an odd issue with the Tablix control in SSRS 2008. I deployed a report on a server a few weeks ago and it is now reporting on enough data to make it span multiple pages. I wanted the column headings to appear on all pages, not just th 阅读全文
posted @ 2011-02-17 10:49 Alan Yang 阅读(618) 评论(2) 推荐(0) 编辑
SQL: difference between inner and outer join
摘要:Assuming you're joining on columns with no duplicates, which is by far the most common case:An inner join of A and B gives the result of A intersect B, i.e. the inner part of a venn diagram intersection.An outer join of A and B gives the results of A union B, i.e. the outer parts of a venn diagram u 阅读全文
posted @ 2011-01-18 15:04 Alan Yang 阅读(340) 评论(0) 推荐(0) 编辑
查找数据库中重复数据T-SQL
摘要:查找数据库中重复数据T-SQL========第一篇=========在一张表中某个字段下面有重复记录,有很多方法,但是有一个方法,是比较高效的,如下语句:select data_guid from adam_entity_datas a where a.rowid (select min(b.rowid) from adam_entity_datas b where b.data_guid = a.data_guid)如果表中有大量数据,但是重复数据比较少,那么可以用下面的语句提高效率select data_guid from adam_entity_datas where data_g 阅读全文
posted @ 2010-12-22 18:20 Alan Yang 阅读(4189) 评论(2) 推荐(1) 编辑
SSRS2008报表导出到EXCEL正常,打印后折行。
摘要:SSRS2008报表导出到EXCEL正常,打印后折行。简单解决方案是直接调整SIZE和Margin。微软发布的SQL SERVER 2008 SP2 宣称已经修复此问题,下面是MS原帖,再下面是这之前喷微软的口水贴。MS原帖: FIX: The margins are not retained in a report when the report is exported to Excel on a server that is running SQL Server 2008, and then you preview the report in ExcelConsider the follo 阅读全文
posted @ 2010-12-14 11:47 Alan Yang 阅读(990) 评论(0) 推荐(0) 编辑
Porting a sql server report directly to pdf or excel
摘要:PORTING A SQL SERVER REPORTING SERVICES 2005 REPORT DIRECTLY TO PDF OR EXCELExporting a SQL Server Reporting Services 2005 (SSRS) Report Directly to PDF/Excel is a handy way of generating high quality... 阅读全文
posted @ 2010-11-04 11:15 Alan Yang 阅读(325) 评论(0) 推荐(0) 编辑
报表导出CSV,XML时,Textbox显示Name,而不隐藏。
摘要:Textbox.DataElementOutputSQL Server 2008 R2TheTextbox.DataElementOutputelement specifies whether aTextboxshould appear in a data (XML, CSV) rendering. This element is optional. If this element is pres... 阅读全文
posted @ 2010-10-13 16:05 Alan Yang 阅读(559) 评论(0) 推荐(0) 编辑
SQL大全
摘要:作者:Sunny Peng出处:http://www.cnblogs.com/psunny/1. 设置内存选项2. 实用文件及文件组3. 调整temp数据库的文件属性4. 日期概念理解中的一些测试5. CINVERT在日期转换中的使用示例6. SET DATEFORMAT对日期处理的影响7. SET LANGUAGE对日期处理的影响示例8. 日期格式化处理9. 日期推算处理10. 特殊日期加减函数... 阅读全文
posted @ 2010-09-06 18:06 Alan Yang 阅读(261) 评论(3) 推荐(0) 编辑
Report Header invisible in Reportviewer but visible in pdf and print layout.
摘要:I met a wired problem when using SSRS in vs2008.In the report page header, a textbox call a reportItem which connected to DB to retrive data in page body. The problem is the textbox shows blank in pag... 阅读全文
posted @ 2010-09-01 11:07 Alan Yang 阅读(341) 评论(0) 推荐(0) 编辑
Repeating Tablix Headers In SSRS 2008
摘要:Repeating Tablix Headers In SSRS 2008PublishedbyNickonMarch 11, 2009inUncategorized.So I’ve been trying to figure out haw to repeat headers in a Tablix. I don’t do a lot of SSRS stuff and ... 阅读全文
posted @ 2010-08-31 18:04 Alan Yang 阅读(265) 评论(0) 推荐(0) 编辑

1 2 下一页