SQL Server Reporting Services Cross Chart Filtering
By:Rahul Mehta || Related Tips: > Reporting Services Charts Problem A dashboard is full of charts presenting various visual informative data. SQL Server Reporting Services (SSRS) provides many...
View ArticleSQL Server会话KILL不掉,一直处于KILLED /ROLLBACK Status状态情形浅析
今天遇到一个很奇怪的情况,发现一个会话异常,这个会话只是在执行一个简单的存储过程,里面使用了链接服务器(Linked Server)查询另外一台服务器数据(存储过程里面没有任何显性事务、UPDATE、DELETE操作,只有几个简单的SELECT查询,其中有两个查询使用了链接服务器Linked...
View ArticleDo it right! Deploying SQL Server R Services on computers without Internet...
Reviewed by: Sanjay Mishra, Umachandar Jayachandran, Dimitri Furman, Jeannine Nelson-Takaki, Joe Sack, Kun Cheng One of the most exciting features in SQL Server 2016 is R Services (in-database) . This...
View ArticleSQL Server Backup and Restore Tutorial
[Total: 1 Average: 5/5] In that post let’s talk about one of the primary section in the daily life for each DBA this is SQL Server backup and restore tutorial. The greatest way to backup and restore...
View ArticleWhere Do You Run Your R Scripts?
I know most of you don’t work with the R language. In fact, plenty of you might not know anything about R other than a cursory understand of this as some sort of data analysis language. If you want to...
View ArticleSQL Server 2016 Stretch Database Using Filter_Predicate
If you’ve ever been faced with the need to archiveSQL Server data in order to save database space and/or improve query performance, you found that this would not be a simple task. Especially when the...
View ArticleWho owns your availability groups?
Question: Who owns your availability groups? The person who creates the AG becomes the owner by default. Did you know that you can (and probably should) change that the same as many of the other SQL...
View ArticleWorld’s Biggest SQL Server Event is Coming in 6 Days!
T his post is by Joseph Sirosh, Corporate Vice President of the Data Group at Microsoft. We are only 6 days away from PASS Summit 2016 ( @sqlpass ) which kicks off next Wednesday, October 26th, in...
View ArticleMigrating from SQL Server to Azure SQL Database using Bacpac Files
Reviewed by: Steven Green, Peng Song, Xiaochen Wu, Kun Cheng, Sanjay Mishra Introduction Database migration from SQL Server to Azure SQL Database is a process that many organizations must implement as...
View ArticleSQL server中字符串逗号分隔函数分享
继SQl -Function创建函数数据库输出的结果用逗号隔开,在开发中也有许多以参数的形式传入带逗号字条串参数(数据大时不建议这样做)例:查找姓名为“张三,李二” 的数据此时在数据库里就要对此参数做处理如图:函数代码如下CREATE FUNCTION [dbo].[fnSplitStr] ( @sText NVARCHAR(Max), @sDelim CHAR(1))RETURNS...
View ArticleSQL Server 利用触发器对多表视图进行更新的实现方法
其步骤就是:利用update操作触发器产生的2个虚拟表【inserted】用来存储修改的数据信息和【deleted】表,然后将对应的数据更新到对应数据表中的字段信息中;1.首先创建3个表:a.信息表:USE [SQL-LI]BEGIN TRANSACTION CHUANGJIAN_XINXIN_TAB --创建命名为【XINXIN_TAB】的数据表,同时不允许字段为空CREATE TABLE...
View ArticleSQl Function 创建函数实例介绍
在SQL中系统已为我们提供了很非常丰富的函数:例:聚会函数avg, sum,count,max,min 日期函数:Day,Month,Year等等 为我们日常开发节省很多时间 但是有一些特殊需求的话SQL 也提供自己创建函数的功能下面举一小例子:需求: 某一订单表 编号,订单号,产品名称 要知道 某一订单号的产品名称 名称之间用逗号(,)隔开 如下图:我们创建一个标题函数: StrName...
View ArticleSqlserver 自定义函数 Function使用介绍
一.FUNCTION: 在sqlserver2008中有3中自定义函数:标量函数/内联表值函数/多语句表值函数,首先总结下他们语法的异同点: 同点:1.创建定义是一样的: a, CREATE FUNCTION F_NAME(传入的参数名称 传入参数的类型) b,RETURNS 返回值类型 c,AS...
View ArticleSQL Function 自定义函数详解
目录产生背景(已经有了存储过程,为什么还要使用自定义函数)发展历史构成使用方法适用范围注意事项疑问 内容产生背景(已经有了存储过程,为什么还要使用自定义函数)与存储过程的区别(存在的意义):1. 能够在select等SQL语句中直接使用自定义函数,存储过程不行。2. 自定义函数可以调用其他函数,也可以调用自己(递归)3. 可以在表列和 CHECK...
View Article数据库 关键字一览表
数据库 关键字:为了避免在数据库表结构设计过程中使用系统保留关键字我们必须知道数据库存在哪些关键字,接下来会列出mysql、oracle、sqlserver三个数据库各自的保留关键字。Mysqlhttp://dev.mysql.com/doc/refman/5.7/en/keywords.html ACCESSIBLE (R) ACCOUNT[a] ACTION ADD (R) AFTER...
View ArticleSQL Server 实现数字辅助表实例代码
数字辅助表是一个连续整数的数列,通常用来实现多种不同的查询任务。大多分两类:足够大物理数字表和表函数,前者可以称为静态的,后者可以称为动态且按需生产。物理数字表 物理数字表通常存在一个物理表,表记录相对足够大,相关的T-SQL代码如下:IF OBJECT_ID(N'dbo.Nums', 'U') IS NOT NULLBEGIN DROP TABLE dbo.Nums;ENDGO CREATE...
View ArticleJava程序操作数据库SQLserver详解
数据库基本操作:增删改查(CRUD) crud介绍(增、删、改、查操作) CRUD 是指在做计算处理时的增加(Create) 、查询(Retrieve)(重新得到数据)、更新(Update)和删除(Delete)几个单记事的首字母简写。主要被用在描述软件系统中数据库或者持久层的基本操作功能。 Create new records Rctricvc cxisting rccords Update...
View ArticleDifference between GETDATE() vs SYSDATETIME() vs GETUTCDATE() in SQL Server
One of the commonquestion on Microsoft SQL Server interview is, what is the difference between GETDATE() , SYSDATETIME() , and GETUTCDATE() . Even though all three SQL Sever function returns the...
View ArticleReading, Writing, and Creating SQL Server Extended Properties
What I’d like to do in this article is to explain something about SQL Server extended properties, why they are so important, and illustrate some ways of working with them, scripting them, and...
View Article