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

Image may be NSFW.
Clik here to view.

Introduction to PowerShell with SQL Server Using Invoke-SQLCMD

One of the most valuable tools I’ve seen added to my toolkit over the years is PowerShell. While I had gotten very adept at writing some pretty complex CMD files, PowerShell has opened up whole new...

View Article


Image may be NSFW.
Clik here to view.

Implement a Slowly Changing Type 2 Dimension in SQL Server Integration...

By: Koen Verbeeck || Related Tips:More > Integration Services Development Problem We’d like to keep history in our data warehouse for several dimensions. We use SQL Server Integration Services...

View Article


Image may be NSFW.
Clik here to view.

Understanding SQL Server Connection Pooling in ADO.NET

By: Artemakis Artemiou || Related Tips:More > Application Development Problem This tip will help you to better understand what connection pooling is in the data access world. Also, after reading...

View Article

Image may be NSFW.
Clik here to view.

SQL Server Encryption, What’s The Key Hierarchy All About?

I’m sure that we all know that SQL Server includes all sorts of interesting functionality to allow us to encrypt our data and like with all encryption techniques, that data is encrypted using keys. In...

View Article

Recovery_Pending State After Moving SQL Server Files

The scripts I ran to edit the rest of the databases looked similar to the below: ALTERDATABASEmsdbMODIFYFILE(NAME=‘MSDBDat’,FILENAME=‘M:\mssql\Data\MSDBDat.mdf’);...

View Article


Image may be NSFW.
Clik here to view.

ISACA Class: Auditing SQL Server in Every Way Possible

ISACA Class: Auditing SQL Server in Every Way Possible K. Brian Kelley Posted on 9 August 2018 Comments At this year’s TechnoSecurity and Digital Forensics Conference I gave a 1 hour presentation on...

View Article

Image may be NSFW.
Clik here to view.

Script to Retrieve All Error Numbers and Messages from the SQL Server Error Log

By: Eduardo Pivaral || Related Tips:More >Monitoring Problem The undocumented functionxp_readerrorlog provides us the ability to read the SQL Server error log using T-SQL and perform some basic...

View Article

Image may be NSFW.
Clik here to view.

Create Tabular Model Sample from SQL Server Database - Part 1

By: Haroon Ashraf || Related Tips: > Analysis Services Development Problem As a SQL Server business intelligence developer, I would like to work directly on a tabular analysis services project...

View Article


Manipulate a SQL recordset row with ROW_NUMBER,CTE and CASE

Question:How can I write a query to return a recordset and do something to a specific row? I understand this is a presentation issue - because the obvious answer is to return the recordset and then do...

View Article


Image may be NSFW.
Clik here to view.

Compare Execution Plans in SQL Server

Database Administrator always makes an effort to tune SQL Server query performance. The first step in tuning query performance is to analyze the execution plan of a query. Upon some conditions, SQL...

View Article

Is sp_execute_external_script Replacing CLR?

Solomon Rutzky makes me invoke Betteridge’s Law of Headlines : With the additional (and annoying) configuration step required to get SQLCLR Assemblies to load starting in SQL Server 2017, some people...

View Article

Image may be NSFW.
Clik here to view.

How to Move and Configure tempdb Files

Every SQL Server instance relies heavily on tempdb to function. Because of this it is important to properly setup and configure tempdb. If you work on a system with a sub optimal tempdb setup then you...

View Article

Image may be NSFW.
Clik here to view.

The First 3 Things I Look At on a SQL Server

1. Are backups and CHECKDB being done?Before I step out on the wire, I want to know if there’s a safety net. If there’s a recoverability risk, I don’t stop here I keep looking because the rest of the...

View Article


The Worst Day

I challenged people to write about their daily work a few weeks ago. I haven’t see a lot of posts, but I am still hopeful some of you will document your day, as Iris Classon has done a few times ....

View Article

T-SQL Rename Logical and Physical Database Files

I used to get really nervous about renaming database files, which I think is an appropriate response. Changing the attributes of the database’s physical objects does sound a bit scary on the surface,...

View Article


SQL Server Generate Database Script

This post is showing you how to generate the scripts for all the database structure in a SQL Server. You can right click the database in SQL Server Management Studio for sure but in that way you can...

View Article

Incorrect column date format in SQL Server

I'm inserting some data from my C# program into SQL Server 2012. I have column in my table that is datetime type. My C# code: string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); // returns...

View Article


Image may be NSFW.
Clik here to view.

[Video] Office Hours 2018/8/8 (With Transcriptions)

This week, Brent, Tara, Erik, and Richie discuss troubleshooting port blocking, page life expectancy issues, problems with turning off CPU schedulers, coordinating two jobs across servers, adding...

View Article

Image may be NSFW.
Clik here to view.

Fastest Way to Find Row Count of All Tables From All Databases in SQL Server

There are many times you as DBA or Developer needs to get all row count from all tables or row count of all tables from all Databases in a SQL Server. You may need a quick way to count the number of...

View Article

Image may be NSFW.
Clik here to view.

SQL: The T-SQL SIGN function and what's in a return type?

When you've worked with a product like SQL Server for a long time, and more importantly, are one of the odd people who've read a great amount of the documentation simply for interest, it feels really...

View Article
Browsing all 3160 articles
Browse latest View live