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

SSMA for Oracle 7.0 ― What’s New ― Using In-Memory OLTP in SQL Server 2016

Posted byBill Ramos | On October 14th, 2016 | InDatabase Migration,SQL Server | Tags:database migration, DB2 , In-Memory OLTP , MS SQL Server , oracle , sql server , SSMA This continues our video blog...

View Article


The 2016 Home Lab

Everyone needs a home lab. At least, everyone that works in technology and wants to grow their career or get better at their craft. I’d hope that’s most of you, but if not, that’s fine. If you’re happy...

View Article


Image may be NSFW.
Clik here to view.

Difference between JOIN and INNER JOIN in Sql Server

Frankly speaking, in Sql Server there is no difference between JOIN and INNER JOIN . They produce the same result and also the same performance. Let us prove with examples that there is no difference...

View Article

Image may be NSFW.
Clik here to view.

Sql Server Error: Incorrect time syntax in time string used with WAITFOR

ERROR SCENARIO We can get this exception if we try to execute statement like below to to SLEEP or WAIT for 90 seconds WAITFOR DELAY '00:00:90.000' RESULT: Msg 148, Level 15, State 1, Line 1 Incorrect...

View Article

转载一批 SQL Server 2008 R2、SQL Server 2012 下载地址

迅雷可下载,开始几十秒查找资源可能很慢,但过了这小段时间之后就非常快。 此资料为网上收集,有细化。 ↓↓↓↓↓↓↓↓↓↓SQL Server 2008 R2 ↓↓↓↓↓↓↓↓↓↓ SQL Server 2008 R2 Enterprise...

View Article


Image may be NSFW.
Clik here to view.

Spring security实现登陆和权限角色控制

 随笔简介  1、spring版本:4.3.2.RELEASE+spring security 版本:4.1.2.RELEASE(其它不做说明)  2、所展示内容全部用注解配置  3、springmvc已经配置好,不作说明  4、会涉及到springmvc,spel,el的东西,不熟悉的同学可以先去看一下这方面内容,特别是springmvc...

View Article

Image may be NSFW.
Clik here to view.

用 SQL Server 的 FileStream 实现新方式数据库存储文件

附件,有两种存储方式:一是以二进制存储在数据库中,二是存储在文件夹中。 法一优点是好管理,比如便于权限判断,没权限的不能读取附件,缺点是性能低下;法二是性能好,但不方便权限判断(虽然能够做到,但麻烦些)。 有没有结合二者优点的第三种方式呢?有,这在 SQL Server 2008开始就已经实现了。 第一步、启用 FileStream 在 SQL Server配置管理器/Configuration...

View Article

SQLServer基础

SQL Server基础前提:创建表create table stuhome(son char(12) not null,father_name varchar(50) not null,mum_name varchar(50))一、创建标的内容1、使用INSERT INTO 表名称 VALUES (值1, 值2,….)insert into student values('1002','张三',...

View Article


Image may be NSFW.
Clik here to view.

SQLServer中的内连接

内连接是查询的重点,也是数据库学习的重点。 待查询的是scott数据库中的三个表: emp表: dept表: salgrade表: 1、select .... from A ,B的用法--emp是14行8列,dept是5行3列select * from emp,dept; --输出结果是70行11列产生的结果是笛卡尔积: 2、select .... from A, B where...

View Article


Image may be NSFW.
Clik here to view.

SqlServer订阅发布

数据库同步方式有很多种,这里利用数据库发布和订阅的方式来完成数据库的同步技术. 发布订阅分为两个步骤:1、发布。2订阅。首先在数据源数据库服务器上对需要同步的数据进行发布,然后在目标数据库服务器上对上述发布进行订阅。发布可以发布一张表的部分数据,也可以对整张表进行发布,还可以是存储过程等等 创建发布 在lis生产库上创建发布,发布的具体过程如下: 1、展开SQL Server 2008 服务器下的...

View Article

Image may be NSFW.
Clik here to view.

SQLServer2005实现负载均衡

简介 公司一个存量系统需要做数据库负载均衡,数据做负载均衡要考虑的问题比较多,系统离不开数据库的支撑。信息系统的背后用于保存和处理最终结果的地方就是数据库。因此数据库系统就变得尤为重要,这意味着如果数据库如果面临问题,则意味着整个应用系统也会面临挑战,从而带来严重的损失和后果。...

View Article

SQLServer大量数据秒级插入/新增/删除

1.快速保存,该方法有四个参数,第一个参数为数据库连接,第二个参数为需要保存的DataTable,该参数的TableName属性需要设置为数据库中目标数据表的表名,第三个参数为输出参数,如果保存过程中发生错误则错误信息会输出在这个参数里面,第四个参数为可选参数,是否保持连接为打开状态。 /// /// 快速保存数据,自动识别insert和update /// ///需要保存的源数据表...

View Article

Image may be NSFW.
Clik here to view.

【SQLServer】sql优化:从300秒+到10秒

今天客户反馈有一个报表运行超时。 于是登录到系统上,查到运行缓慢报表的对应sql,代码如下:SELECT f_temp_biz_date AS f_temp_biz_date , o_id2 AS o_id2 , o_id3 AS o_id3 , o_id4 AS o_id4 , storeChannel_id2 AS storeChannel_id2 , storeChannel_id3 AS...

View Article


SQLServer事务的隔离级别

传统隔离级别隔离级别确定了并发用户读取或者写入的行为。读取者可以是任何选择数据的语句,默认情况下使用共享锁。写入者是任何对表进行修改的语句,并且需要一个排它锁。SQL Server支持4个基于悲观并发控制(锁定)的传统隔离级别:READ UNCOMMITTED,READ COMMITTED, REPEATABLE...

View Article

Image may be NSFW.
Clik here to view.

SQLServer统计信息更新时采样百分比对数据预估准确性的影响

统计信息基础 首先说一个老掉牙的话题,统计信息的更新阈值: 1,表格从没有数据变成有大于等于1条数据。 2,对于数据量小于500行的表格,当统计信息的第一个字段数据累计变化量大于500以后。 3,对于数据量大于500行的表格,当统计信息的第一个字段数据累计变化量大于500 + (20%×表格数据总量)以后。 触发统计信息后,rowmodct归0 关于统计信息“过期”的问题...

View Article


VS2013缺少报表工具

问题1:缺少报表设计工具――即rdlc无法打开设计器 原因:缺少SQL Server Data Tools(SSDT)工具 解决:安装ssdt即可 SSDT下载地址: https://msdn.microsoft.com/library/mt204009.aspx 参考(英):...

View Article

Image may be NSFW.
Clik here to view.

The Complete Beginner’s Guide to DROP IF EXISTS in SQL SERVER

In the Series of SQL SERVER 2016 journey , this is our new article. In this article, we are sharing a new cool feature which introduced in SQL SERVER 2016 which is DROP IF EXISTS (DIE) . In our...

View Article


Image may be NSFW.
Clik here to view.

When was Domain Account Password Changed in SQL Server? Interview Question of...

If you are a DBA for quite some time, then at least once you must have encountered below error aboutDomain Account Password. Error 1069: The service did not start due to a logon failure. Question:When...

View Article

Python版Mssql爆破小脚本

mssql python版本爆破小脚本,需要安装 MSSQL-python.exe 可以看出代码量很少,用法:保存代码为MssqlDatabaseBlasting.py,cmd切换到 MssqlDatabaseBlasting.py路径下,并 执行 MssqlDatabaseBlasting.py即可开始破解import pymssqlcommon_weak_password =...

View Article

SQL分页查询方式汇总

需求:查询表dbo.Message,每页10条,查询第2页1:TOP()SELECT TOP(20) * FROM dbo.Message WHERE Code NOT IN(SELECT TOP(10) Code FROM dbo.Message)2:BETWEEN * AND * , Row_Number() OVER(ORDER BY *) AS rowNumSELECT...

View Article
Browsing all 3160 articles
Browse latest View live