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

sql server if exists用法 数据库 SQL用法 数据库判断 数据库存在用法

1 判断数据库是否存在Sql代码 if exists (select * from sys.databases where name = ’数据库名’)drop database [数据库名] if exists (select * from sys.databases where name = ’数据库名’)drop database [数据库名]2 判断表是否存在 Sql代码if exists...

View Article


Image may be NSFW.
Clik here to view.

A Quick Look At Two New DMV Columns for Tuesday

I have learned over the years that some people really like it when I am verbose, long-winded, redundant and carry an otherwise small sentence on forever until you wonder to yourself, “Really, what it...

View Article


Image may be NSFW.
Clik here to view.

SQL SERVER FIX: Msg 7356, Level 16 The OLE DB provider “ASEOLEDB” for li ...

In SQL Server, we can create linked server to many other RDBMS. The providers to connect would generally publish by destination RBMS. In this client scenario, they were dealing with linked server to...

View Article

Musings on SESSION_CONTEXT()

Until an hour or two ago, I had written off the idea of contributing to this month’s T-SQL Tuesday, hosted by Matt Gordon with the theme of “Fixing Old Problems with Shiny New Toys”. I’ve lately had a...

View Article

SQL Server vs SQL Server v.Next

So, you ask "Why?" Well, firstly, because it is fun knowing. In this short article, I'll try to convince you that SQL Server on linux (v.Next) should not be discarded as a performance orientated...

View Article


Extending DevOps practices to SQL Server databases

Microsoft Data Platform MVP, Steve Jones, and Redgate's Arneh Eskandari, will show you how Redgate’s Database DevOps solution works to improve your database development and deployment processes. This...

View Article

Image may be NSFW.
Clik here to view.

Columnstore Indexes part 98 (“Null Expressions & String Aggregates”) ...

Continuation from the previous 97 parts, the whole series can be found at http://www.nikoport.com/columnstore/ . Continuing with the spirit of the previous blog post on the string data type...

View Article

Image may be NSFW.
Clik here to view.

What is Batch Requests/sec?

When I first look at a server, I want to know how busy it is, where its bottlenecks are, what is SQL Server waiting on and many other things. Batch Requests/sec is one of the data points that is used...

View Article


SQL Memory usage query and cachestore_sqlcp

Question:There was SQL Server memory issue with the Error 701 There is insufficient system memory in resource pool 'internal' to run this query. How can I troubleshoot the source of the error and...

View Article


PL/SQL编程基本概念 sql SQLServer SQL语句 SQL编程

/*============================================================================= pl/sql编程=============================================================================*/--pl/sql块的结构declare...

View Article

PL/SQL经典练习 sql SQLServer SQL语句 数据库学习

/*========================================================= PL/SQL编程=========================================================*/--先把scott里面的表弄到test表空间里面来CREATE TABLE EMP AS SELECT * FROM...

View Article

Image may be NSFW.
Clik here to view.

SQL Server 急救包(First Responder Kit)入门教程

如果你的SQL Server数据库运行起来十分缓慢甚至逐渐停止了,恰巧又赶上了你的数据库管理员在休假,你又不知道该如何是好,那么这篇文章会帮助你从学习使用SQL Server急救包(SQL Server First Responder Kit)开始解决问题。这个开源项目包含了一系列能够帮助数据管理员或者 临时数据管理员 的脚本,能够修复和调整SQL Server实例至正常状态。...

View Article

Who is overriding MAXDOP 1 on the instance?

In Monday’snewsletter I discussed an email question I’d been sent and promised to blog about it. The question was “how can latch waits for ACCESS_METHODS_DATASET_PARENT occur when the instance MAXDOP...

View Article


Image may be NSFW.
Clik here to view.

SQL SERVER FIX: Msg 15281- SQL Server Blocked Access to Procedure ‘sys.xp_cm ...

One of my blog readers pinged me on Skype and asked a simple question. I always thought I had a blog written about this error, but I was wrong. So, this blog is the outcome of a short interaction with...

View Article

Image may be NSFW.
Clik here to view.

Easily Import CSV Files with R in SQL Server 2016

Problem To load csv files with just T-SQL is often a headache depending on the contents and the format of the csv files. In fact, according to MSDN , SQL Server does not officially support csv file...

View Article


Resolution of Database Consistency Error in SQL Server

There are so many facilities and amenities in SQL Server along with built-in methods, which assist users in some bad situations. It is possible that sometimes SQL server put the users in annoying...

View Article

Image may be NSFW.
Clik here to view.

Create a Dynamic Pivot Table in SQL Server

In this puzzle, we’re going to learn how to create a dynamic pivot table using SQL Server. A dynamic pivot table is a great way to summarize data. And given that Business Intelligence is a hot topic,...

View Article


Image may be NSFW.
Clik here to view.

PowerShell One-Liner to Disable Active Directory Accounts and Log the Results...

The new PowerShell cmdlets that are part of the SQLServer PowerShell module that’s distributed as part of SSMS (SQL Server Management Studio) 2016 make it super easy to write the output of PowerShell...

View Article

Image may be NSFW.
Clik here to view.

SQL Server performance measure Disk Response Time

Introduction As DBAs, we all get to the point where we are asked to setup a new server for a particular environment. Setting up a new server is not a big thing but giving the answer to the question...

View Article

Dirty data, flogged cores: YES, Microsoft SQL Server R Services has its...

The R language has enjoyed a great reputation in statistical computing and graphics for decades. However, it is also known as something for statisticians. Born around the time of Java, php and python,...

View Article
Browsing all 3160 articles
Browse latest View live