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

执行sql脚本语句的方法 sql sql语句 SQLServer sql脚本语句

执行sql脚本语句的方法。 首要步骤(一般可省略): 开启mysql服务(默认是开机时就自动运行了): 控制面板-->管理工具-->服务,在里面找到名称为mysql的项,双击就可看它的服务状态是启动还是停止,把它设为启动 连接mysql: 在命令行下输入 mysql -h localhost -u root...

View Article


Image may be NSFW.
Clik here to view.

Backing Up SQL Server Databases is Easier in PowerShell than T-SQL

Period. End of Sentence. Yes, I’m serious. See for yourself. Get-SqlDatabase -ServerInstance localhost |Where { $_.Name -ne 'tempdb' } |Backup-SqlDatabase With that short command I can backup every...

View Article


Image may be NSFW.
Clik here to view.

Aggregation transformation component in SSIS

This is the scenario faced by a candidate when he had repeated values in his SQL Server records as shown in the image down below. If we try to run the package it will throw us an error, Error: The...

View Article

SQL Server Firewall Settings: A Complete Guide

SQL server is a database management system developed by Microsoft and it is used to manage and store information on the SQL database. A database is a collection ofdatathat is organised in such a way so...

View Article

Image may be NSFW.
Clik here to view.

Calculation is SSAS (SQL Server Analysis Service)

The error here occurred while doing the SSAS calculations. Error: Below image is the snapshot from SSAS cube where we are doing calculation and while we are dragging and dropping the measure &...

View Article


Image may be NSFW.
Clik here to view.

Deployment Automation for SQL Server Integration Services (SSIS)

In my first article on Project Deployment in SSIS 2012 ‘Setup, Project Creation and Deployment’ , I described the basics of the project deployment model for SSIS. I then showed how to deploy a project...

View Article

Image may be NSFW.
Clik here to view.

How to Find a Gap in a Sequence using SQL SERVER

In this puzzle, we’re going to learn how to find a gap in a sequence using SQL Server. I was recently reviewing my bank statement and noticed they flagged the start of a missing check number with...

View Article

Image may be NSFW.
Clik here to view.

Why won’t my SQL Logins work?

I recently had an interesting time getting the SQL Auth logins on a new instance working. I was doing a side by side upgrade and the only server principals used by the application were SQL Server...

View Article


SQL Server 2016 a Year Review

SQL Server 2016 It is the first week of the new year. It is around this time that I like to reflect on the year gone by and look forward to the year ahead. From a SQL Server perceptive, 2016 was a very...

View Article


Image may be NSFW.
Clik here to view.

Encrypting SQL Server: Transparent Data Encryption (TDE)

With the release of SQL Server 2008, Microsoft expanded the database engine’s security capabilities by adding Transparent Data Encryption (TDE), a built-in feature for encrypting data at rest. TDE...

View Article

Image may be NSFW.
Clik here to view.

SQL SERVER The Log Scan Number Passed to Log Scan in Database ‘master’ is n ...

If you have landed on this blog by searching below error, then I must tell you that your SQL Server service is not getting started. Let us learn in this blog how to fixThe Log Scan Number Passed to...

View Article

Image may be NSFW.
Clik here to view.

[译]SQL Server AlwaysON从入门到进阶(3)――基础架构

本文属于 SQL Server AlwaysON从入门到进阶 系列文章 前言: 本文将更加深入地讲解WSFC所需的核心组件。由于AlwaysOn和FCI都需要基于WSFC之上,因此我们首先要了解在windows群集发生了什么。不仅可以优化SQL Server的高可用设计和部署高,也可以为后续问题侦测过程提供支持。 本节将涉及以下内容: Windows Server Active Directory...

View Article

Image may be NSFW.
Clik here to view.

Checking Time Zones in SQL Server

I was building some basic queries around time zone manipulation and I am happy to say that I enjoyed myself as I found a way to get a time based on a geographic region. This new feature is available to...

View Article


Getting Started with Scrum for SQL Server Development Projects

By:Nat Sundar || Related Tips:More > Application Development Problem We are embarking on a new SQL Server project initiative with Agile/Scrum methodologies. To get started, what is a Daily Scrum...

View Article

Image may be NSFW.
Clik here to view.

Export images from MS SQL Server database without programming

As you probably know images can be stored directly in database, e.g. in the following table: CREATE TABLE [dbo].[Images]( [id] [uniqueidentifier] NOT NULL, [name] [nvarchar](255) NOT NULL, [data]...

View Article


Friday Reading 2017-01-13

Ahh, is it really Friday the 13th?!! So before Jason gets me, I’ll be reading… A whole day of PowerShell & SQL Join Rob Sewell and Chrissey LeMaire at SQL Sat Vienna on the 20th of Jan for a...

View Article

SQL Server存储过程同时返回分页结果集和总数

前言      好长时间没摸数据库了,周末在家写了个报表的存储过程,一时间对使用存储过程实现分页的同时并计算出记录总数不知道怎么更好的去实现。按照我们正常的业务逻辑,存储过程数据首先是分页,其次接受若干查询条件,返回分页结果集的同时还需要返回记录总数给客户端。      我对于这样一个业务存储过程总结如下:1、内核层,通常也就是要查询的字段或者要计算的字段,这部分单独拿出来。  2、查询条件层。...

View Article


用jdom创建中文的xml文件的方法

实例如下:package test;import java.io.File;public class DOMTest { private String outFile = "c:\\abc\\people.xml"; public static void main(String[] args) { new DOMTest(); } public DOMTest() { try { File file...

View Article

SQL server 2008 更改登录验证方式的方法

前言:之前在敲学生的时候也遇到过这个问题,但是当时没有能及时总结,导致这次遇到问题还要重新去查,所以今天就做个总结,方便自己也帮助他人!    如果在安装过程中选择“windows 身份验证模式”,则 sa 登录名将被禁用。如果稍后将身份验证模式更改为“SQL Server 和 Windows 身份验证模式”,则 sa 登录名仍处于禁用状态。若要启用 sa 登录帐户,请使用 ALTER LOGIN...

View Article

Image may be NSFW.
Clik here to view.

关于SQL Server 2008忘记sa密码修改sa密码的方法图解

1、 先用Window身份验证方式登陆进去,选择数据库实例,右键选择属性――安全性:把服务器身份验证选项从“Window身份验证模式”改为“SQLServer和Window身份验证模式”。点击确定,关闭当前对象资源管理器。  2、 重新用Window验证方式登陆,在左边的树结构中选择“数据库”下面的“安全性”选项――登录名――sa,右键属性――在“SQLServer身份验证”中输入要设置的sa密码。...

View Article
Browsing all 3160 articles
Browse latest View live