Strategies for sql server performance tuning
The massive and exponential growth of database sizes requires new strategies for maintaining SQL Server performance. Therefore as data sets grow performance is maintained and also improved , but not to...
View ArticleSQL Server doubly linked lists revisited
It’s SQLbits this week, and I’m as excited as a query going through the compile semaphore for the first time, so I’m taking a break from the heavy stuff and gossiping about bugs instead. The thing...
View ArticleSQL SERVER Msg 3136, Level 16 This Differential Backup Cannot be Restored ...
I was trying to teach copy-only backups to my students and encountered below error related to differential backup. Msg 3136, Level 16, State 1, Line 28 This differential backup cannot be restored...
View ArticleFix SQL Server AlwaysOn Error: 35250 Failed to Join the Availability Group
By:Manvendra Singh || Related Tips:More > AlwaysOn Availability Problem Recently we had a project to configure SQL Server AlwaysOn Availability Groups between three nodes which were hosted on a...
View Article自定义sqlserver列名 sql SQLServer sqlserver列名 列名自定义
自定义sqlserver列名set @num2 = 20 while(1=1) begin if @num2 = 0 break else begin set @sql = N'alter table #a add ' + N'numName' + cast( @num2 as nvarchar(30)) + N' nvarchar(50)' exec (@sql) set @num2 =...
View Articlejava,hibernate和sqlserver对应的数据类型表 Hibernate Hibernate教程 sqlserver 数据 ...
java,hibernate和sqlserver对应的数据类型表。 java hibernate sqlserver byte、java.lang.Byte byte TINYINT short、java.lang.Short short SMALLINT int、java.lang.Integer integer INGEGER long、java.lang.Long long BIGINT...
View ArticleMybatis、ibatis动态SQL问题 sql SQLServer Mybatis 动态SQL问题
Mybatis、ibatis动态SQL问题。使用JDBC一个非常普遍的问题就是动态SQL。使用参数值、参数本身和数据列都是动态SQL,通常是非常困难的。典型的解决办法就是用上一堆 的IF-ELSE条件语句和一连串的字符串连接。对于这个问题,Ibatis提供了一套标准的相对比较清晰的方法来解决一个问题,这里有个简单的例子:<select id="getUserList"...
View Articlesql的聚合函数 sql SQLServer PGSQL 聚合函数
sql的聚合函数。聚合函数是对一组值执行计算并返回单一的值的函数。1. AVG 返回指定组中的平均值,空值被忽略。2. COUNT 返回指定组中项目的数量。 !!!使用时尽量不要用count(*)3. MAX 返回指定数据的最大值。4. MIN 返回指定数据的最小值。5. SUM 返回指定数据的和,只能用于数字列,空值被忽略。6. COUNT_BIG...
View Article生成sql包含comment列(powerDesigner16.5) sql SQLServer comment列
生成sql包含comment列(powerDesigner16.5)。 目的:生成的sql中包含comment。 意义:创建的表的sql中有说明文字,可以通过代码生成工具取到comment字段,自动中文注释及更有意义的事情。操作:1. 设置当未填写列备注时使用列名称作为备注生成SQL增加comment默认的pd没有生成注释,针对mysql5.0可以如下修改。在Database–>edit...
View ArticleSQL-批量插入和批量更新 sql SQLServer 批量插入 批量更新
SQL-批量插入和批量更新,最新总是有人问我sql优化的问题,大部分的原因就是更新实体集合或者更新,因为用的是持久化的框架,例如hibernate,EntityFrmwork,所有这里我总结一下如何在数据库中利用sql进行批量的插入或者更新批量插入表结构一样或类似如果两张表的结构一样,例如一个表的结构和另一个表的结构一样,只是其中一张是临时表,而另一张表是存储数据的表,我们需要进行一次表的迁移的话,...
View Articlepostgresql中integer字段的模糊查询 sql SQLServer postgresql 模糊查询
postgresql中integer字段的模糊查询。数据库中string类型的模糊查询很简单,integer类型的字段模糊查询没有简便方法。 postgresql可以使用如下方法:select * from task_requirementwhere 1=1and to_char(version,'999999999') like...
View Article为什么说LINQ要胜过SQL sql SQLServer SQL数据库 LINQ数据库
为什么说LINQ要胜过SQL。如果你还没有沉溺于 LINQ,就会想这有啥大惊小怪的。SQL 并没有坏掉,为什么还要对它进行修补呢? 为什么我们还需要另外一种查询语言呢?流行的说法是 LINQ 同 C#(或者 VB)集成在了一起,故而消除了编程语言和数据库之间配合上的鸿沟,同时为多个数据源的组合提供了单一的查询接口。虽然这些都是事实,但仅是故事的一部分。更重要的是:当要对数据库进行查询的时候,LINQ...
View ArticleConverting T-SQL strings to Proper Case, Camel Case, Snake Case, or Kebab Case
Often when I’m moving data around (usually with SSIS but also with just T-SQL), I need to take text that is all capitalized or simply has messed-up capitalization, and convert it to something that...
View ArticleSQL SERVER Unable to recycle Errorlog sp_cycle_errorlog OS error 1392
One of my clients contacted me and informed that they have a node production clustered server and they recently noticed that the nightly error log had stopped cycling ERRORLOGs. When we attempted to...
View ArticleExam material for Microsoft 70-768 Developing SQL Data Models
By:Daniel Calbimonte || Related Tips:More > Professional Development Certifications Problem I want to take Exam 70-768, however I did cannot find too much material on internet to help me study. Do...
View Article通过Oracle sql developer工具 从sqlserver迁移数据到oracle
序言 我们在实施过程中,会遇到学校其他业务系统使用的是sql server库情况;一般这样的系统在和我们的系统做数据迁移时,我们可以使用ODI来进行。有同事可能觉得ODI的安装、配置、使用等比较繁琐,这里我给大家介绍一个oracle免费工具Oracle sql developer;通过它我们可以简单、便捷地实现数据从sql server库到oracle库的迁移。 下面迁移使用的Oracle sql...
View Article程序猿是如何解决SQL Server占CPU100%的
文章目录 遇到的问题 使用SQLServer Profiler监控数据库 SQL1:查找最新的30条告警事件 SQL2:获取当前的总报警记录数 有哪些SQL语句会导致CPU过高? 查看SQL的查询计划 选择top记录时,尽量为order子句的字段建立索引 查看SQL语句CPU高的语句 通过建立相关索引来减少表扫描 其他优化手段 总结 遇到的问题...
View ArticleASP.NET Core: SQL Server based distributed cache
ASP.NET Core supports also distributed cache solutions. Out-of-box there is support for SQL Server and Redis based distributed caches. This blog post focuses to SQL Server based cache we can use when...
View ArticleTesting the Identity Column usage in SQL Server with PowerShell and dbatools
SQL Server uses identity columns to auto generate values, normally keys. When you create an identity column, it has a data type and that data type has a maximum number of values. BigInt...
View ArticleCDC functionality may break after upgrading to the latest CU for SQL Server...
Chris Skorlinski SQL Server Escalation Services This problem was brought to our attention recently by one of our customers. CDC LogScan job fails, possible Error Message: Log Scan process failed in...
View Article