Quantcast
Channel: CodeSection,代码区,SQL Server(mssql)数据库 技术分享 - CodeSec
Browsing all 3160 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Forcing Parallelism T-SQL Tuesday

T-SQL Tuesday is a monthly event where SQL Server bloggers write a post based on a subject chosen by the month’s host. This month’s host is Brent Ozar ( b / t ) and this months topic is SQL Server...

View Article


Image may be NSFW.
Clik here to view.

SQL Server moving system databases Part 2 master

I decided not to participate in the Rhinelander Hodag Muskie Challenge this past year. While I enjoyed the experience in 2015, I didn’t feel compelled to try again quite yet. Having caught no fish, it...

View Article


Image may be NSFW.
Clik here to view.

SQL SERVER TDE Effects on TempDB’s Slow Performance

I am a big supporter of the fact that testing and playing with new features should not be done on production environments. It can prove to be harmful, even after you tried to clean up the system....

View Article

Finding and Cleaning Up Old SQL Server Job Log Files

Problem Due to SQL Server sprawl, you may have hundreds of servers that may be accumulating job logs that you are unaware of. You may have HUNDREDS of THOUSANDS of job log files floating about. It...

View Article

Image may be NSFW.
Clik here to view.

Simplify Enterprise Application Integration with JAMS

By:Jeremy Kadlec || Related Tips:More >SQL Server Agent Problem Our organization spends significant time and money on integrating applications (ERP, CRM, cloud, mainframe, custom, etc.) across our...

View Article


Image may be NSFW.
Clik here to view.

T-SQL Tuesday #86 : My Favorite Connect Items

This month's T-SQL Tuesday topic is " SQL Server Bugs & Enhancement Requests ." This is a topic near and dear to my heart; for several years I was a huge proponent of the Connect system. For a...

View Article

Image may be NSFW.
Clik here to view.

T-SQL Tuesday #86 : Sorting a Stacked Chart

This month's T-SQL Tuesday topic is " SQL Server Bugs & Enhancement Requests ." My T-SQL Tuesday post is about a request for Power BI, which may be a little on the edge of SQL Server as far as...

View Article

Image may be NSFW.
Clik here to view.

T-SQL Tuesday #86 : What The Heck Is Wrong With My String/Binary Data?

This month's T-SQL Tuesday is hosted by Brent Ozar ( b / t ), and is about those wonderful Connect requests that we want fixed/added in SQL Server. Aaron Bertrand (b/ t ) reminded me of one of my...

View Article


#TSQL2SDAY: Sing a song of unsigned ints

Occasionally we do as we are told. And when Brent Ozar tells us that we should celebrate the first T-SQL Tuesday of 2017 by writing about SQL Server bugs and enhancement requests, the only appropriate...

View Article


Image may be NSFW.
Clik here to view.

T-SQL Tuesday 86: SQL Server Bugs & Enhancement Requests

Let’s kick off the new year with a T-SQL Tuesday! This month’s edition is hosted by Brent Ozar: Announcing T-SQL Tuesday #86: SQL Server Bugs & Enhancement Requests Brent wants us to blog about...

View Article

jOOQ 3.10 will Support SQL Server’s Table Valued Parameters

SQL Server has this nice feature called table-valued parameters (TVP) , where users can pass table variables to a stored procedure for bulk data processing. This is particularly nice when the stored...

View Article

Image may be NSFW.
Clik here to view.

The SQL Genie (T-SQL Tuesday #086)

At some point a long time ago, when I was first getting serious about SQL Server, I became aware of an open secret . You see, there was this special Microsoft alias called “sqlwish.” Those in the know...

View Article

Image may be NSFW.
Clik here to view.

#TSQL2sday: System-Maintained LastUpdatedDate, LastUpdatedBy Columns

For this month’s T-SQL Tuesday , we’re talking about interesting Connect requests to fix or change SQL Server behavior. T-SQL Tuesday In our Senior DBA Class, one of the exercises involves figuring...

View Article


Image may be NSFW.
Clik here to view.

SQL Server 2005作业设置定时任务

公司有一个老项目由于直接把终端拍摄的图片以二进制的形式保存到数据库中,数据库比较大所以需要经常删除这些冗余数据,手动删除费时费力,项目组长让我把这些操作变成自动的,每天执行一次,只保留最近两个月的图片数据。查阅了相关的资料,找到了解决方案,在此做一个记录,以便有同样需求的人和自己查阅。现在我们通过一个非常简单的示例来演示如何设置定时任务:有一张员工表,我们定时往里面添加一条数据。通过示例来了解如何使...

View Article

Image may be NSFW.
Clik here to view.

SQLServer地址搜索性能优化

这是一个很久以前的例子,现在在整理资料时无意发现,就拿出来再改写分享。1.需求 1.1 基本需求: 根据输入的地址关键字,搜索出完整的地址路径,耗时要控制在几十毫秒内。 1.2 数据库地址表结构和数据: 表TBAddress  表数据  1.3 例子: e.g. 给出一个字符串如“广 大”,找出地址全路径中包含有“广”...

View Article


Image may be NSFW.
Clik here to view.

sqlServer实现去除字符串空格

 说起去除字符串首尾空格大家肯定第一个想到trim()函数,不过在sqlserver中是没有这个函数的,却而代之的是ltrim()和rtrim()两个函数。看到名字所有人都 知道做什么用的了,ltrim()去除字符串左边的空格,rtrim()去除字符串右边的空格,要去除首尾空格同时使用这个两个函数就好了。测试:select ltrim(' test ') --去除左边的空格 select...

View Article

SQL Server 远程连接服务器详细配置(sp_addlinkedserver)

远程链接服务器详细配置--建立连接服务器EXEC sp_addlinkedserver '远程服务器IP','SQL Server'--标注存储EXEC sp_addlinkedserver@server = 'server', --链接服务器的本地名称。也允许使用实例名称,例如MYSERVER\SQL1@srvproduct = 'product_name' --OLE...

View Article


Image may be NSFW.
Clik here to view.

SQLServer2005创建定时作业任务

SQLServer定时作业任务:即数据库自动按照定时执行的作业任务,具有周期性不需要人工干预的特点创建步骤:(使用最高权限的账户登录--sa)一、启动SQL Server代理(SQL Server Agent)  二、新建作业  三、设置作业常规属性四、设置作业步骤 五、设置作业计划六、点击"确定" 完成作业设置以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。

View Article

SQL Server:触发器实例详解

1. 概述触发器是一种特殊的存储过程,它不能被显式地调用,而是在往表中插入记录p更新记录或者删除记录时被自动地激活。 所以触发器可以用来实现对表实施复杂的完整性约束。2. 触发器的分类SQL Server2000提供了两种触发器:“Instead of” 和“After” 触发器。一个表或视图的每一个修改动作(Insert、Update和Delete)都可以有一个“Instead of”...

View Article

Oracle 删除用户和表空间详细介绍

Oracle 删除用户和表空间Oracle 使用时间长了, 新增了许多user 和tablespace. 需要清理一下对于单个user和tablespace 来说, 可以使用如下命令来完成。 步骤一:  删除userdrop user ×× cascade说明: 删除了user,只是删除了该user下的schema objects,是不会删除相应的tablespace的。步骤二:...

View Article
Browsing all 3160 articles
Browse latest View live