This site uses cookies to deliver our services. By using this site, you acknowledge that you have read and understand our Cookie and Privacy policy. Your use of Kontext website is subject to this policy. Allow Cookies and Dismiss

SQL

All about SQL Server...

[SQL Server 2012] 使用自带功能简化SQL

796 views   0 comments last modified about 6 years ago

在低版本SQL Server中,对于一些常用的查询功能,我们可能需要运用复杂的逻辑,如临时表,游标等等来实现,这样可能会导致代码难维护,同时产生性能问题。本文将简述用自带的功能去简单的实现这些操作。 注意:一些功能仅在SQL Server 2012以及以上版本支持。 1.查询分页 (OFFSET, FETCH) 在很多Web应用程序中,我们需要实现分页功能,在过去,我们往往通过top语句实现或者通过ROW_NUMBER;在2012中加入了FETECH以及OFFSET标准SQL中支持的功能。下面的例子是查询第11到20行数据: ...

View detail

将远程 Sql Server 服务器上的数据库备份到本地的方法

626 views   0 comments last modified about 10 years ago

首先,必须知道数据库服务器的地址(IP),连接用户名和密码、其次,可以按照下面几种方式进行:

View detail

SQL Server 附加没有日志文件ldf的数据库mdf的方法

758 views   0 comments last modified about 10 years ago

Keywords: how to attach database without log file

View detail

因为数据库正在使用,所以未能获得对数据库的排它访问权 解决办法

234 views   0 comments last modified about 11 years ago

恢复数据库的时候遇到这个错误解决办法

View detail

数据库设计有关范式点滴摘录

192 views   0 comments last modified about 10 years ago

Note1:满足范式要求的数据库设计是结构清晰的,同时可避免数据冗余和操作异常。这并意味着不符合范式要求的设计一定是错误的,在数据库表中存在1:1或1:N关系这种较特殊的情况下,合并导致的不符合范式要求反而是合理的。

View detail

SQL Server Denali_Exception has been thrown by the target of an invocation Solution

2338 views   3 comments last modified about 7 years ago

Issue After I installed Visual Studio 2011 Developer Preview, the error “Exception has been thrown by the target of an invocation” will be thrown when I try to lunch SQL Server Management Studio. Microsoft Connect site has a relevant issue: ...

View detail

Useful T-SQLs (Part I)

316 views   0 comments last modified about 6 years ago

There are a lot of useful T-SQLs we can use in daily work to make things simple. Check transaction log files space usage DBCC SQLPERF (LOGSPACE); Backup Server Certificate ...

View detail

Working with SQL Server Compact 4.0 using Entity Framework 6 and ADO.NET

11315 views   0 comments last modified about 5 years ago

SQL Server Compact 4.0 (CE 4.0) is a free SQL Server embedded database ideal for building standalone and occasionally connected applications for mobile devices, desktops, Web clients and others. In one of my projects, I used it as the database for logging errors, which assumes the errors will onl...

View detail

Create OLAP Project using SSAS

887 views   0 comments last modified about 5 years ago

Serial: An Introduction to SQL Server Features Case Scenario In the previous articles of this serial, I’ve introduced how to use SQL Server as database for online transaction proces...

View detail

Create ETL Project for Collecting Sales Data using SSIS

2028 views   0 comments last modified about 5 years ago

Serial: An Introduction to SQL Server Features Case Scenario For this ETL project, the requirements are listed below: Sales data will be pushed to specified shared fold...

View detail