Additional Articles


External Article

Using PowerShell to Manage SQL Server

The purpose of this article is to demonstrate a custom scripting framework which enables the management of SQLServer databases from a Windows PowerShell session and also to extend Powershell’s flexibility by creating a set of commands customized to our needs. I will call this framework comprised of a library of modules and functions specialized to manage SQLServer the DBA profile.

2011-06-06

3,307 reads

External Article

SQL Server Agent Jobs without an Operator

I work in a fairly large and unwieldy SQL Server shop. Our environment is the wild west. I have DBAs and Developers on my team that create SQL Server Agent Jobs all of the time and there is never an operator setup to email anyone based on a failure condition. I know the right solution here is to "tame the wild west" by locking down the environment and setting up a change management process, but I think that is a topic for another day. Can you give me some idea of how to identify the new recently created SQL Server Agent Jobs and Jobs without an operator setup to email us for a failure condition? I would like to receive emails when either of these conditions occur. Check out the solution to this tip to learn how.

2011-06-03

4,386 reads

External Article

Determine SQL Server memory use by database and object

For many people, the way that SQL Server uses memory can be a bit of an enigma. A large percentage of the memory your SQL Server instance utilizes is consumed by buffer pool (essentially, data). Without a lot of digging, it can be hard to tell which of your databases consume the most buffer pool memory, and even more so, which objects within those databases. This information can be quite useful, for example, if you are considering an application change to split your database across multiple servers, or trying to identify databases that are candidates for consolidation.

2011-06-01

4,834 reads

External Article

Using Extended Events to troubleshoot SQL Server issues

As a DBA, you'll encounter elusive performance, connectivity and locking problems that you'll need to troubleshoot. There are many tools that you can use such as Profiler. In addition to these tools, SQL Server 2008 offers extended events ("XEvents"), which you can use as a powerful tracing system. By default, the "system_health" extended events session is always on, and can provide you help to locate the source of trouble much faster.

2011-05-31

3,337 reads

External Article

Onboarding SQL Server Private Cloud Environment

This guide outlines the major considerations that must be taken into account when onboarding Microsoft® SQL Server® environments into a private cloud infrastructure.There is a strong trend in IT to virtualize servers whenever possible, driven by:1. Standardization2. Manageability3. IT agility and efficiency4. Consolidating servers reduces hardware, energy, and datacenter space utilization costs5. Virtualized environments allow new Disaster Recovery strategiesThe Hyper-V™ role in Windows Server® 2008 R2 provides a robust and cost-effective virtualization foundation to deliver these scenarios.However, there is significant risk in virtualizing SQL Server environments without giving careful consideration to the workloads being virtualized and the requirements of the server applications running on a Hyper-V environment.

2011-05-27

1,919 reads

External Article

PATINDEX Workbench

The PATINDEX function of SQL Server packs powerful magic, but it is easy to get it wrong. Phil Factor returns to the Workbench format to give a tutorial of examples, samples and cookbook ideas to demonstrate the ways that this underrated function can be of practical use. It is intended to be pasted into SSMS and used as a basis for experiment.

2011-05-23

5,331 reads

Blogs

Who’s the Winningest Coach (with AI Help)

By

I was listening to the radio the other day and the hosts were discussing...

Learning from Mistakes: T-SQL Tuesday #194

By

We’re a week late, once again my fault. I was still coming out of...

Stupid Things I Did With AI: ASCII Art

By

I ran across this article recently (https://www.gatesnotes.com/meet-bill/source-code/reader/microsoft-original-source-code) and it has a great opening piece...

Read the latest Blogs

Forums

Basic Always On Groups Randomly Stop Synchronizing

By Leo.Miller

In one of my environments I have 3 pairs of Always On SQL 2022...

Learning From Breakage

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Learning From Breakage

Python in Action to Auto-Generate an Optimized PostgreSQL Index Strategy

By sabyda

Comments posted to this topic are about the item Python in Action to Auto-Generate...

Visit the forum

Question of the Day

Adding and Dropping Columns I

I have this table in my SQL Server 2022 database:

CREATE TABLE [dbo].[CityList]
(
[CityNameID] [int] NOT NULL IDENTITY(1, 1),
[CityName] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
I decide to add two new columns for the StateProvince and Country. What code should I use?

See possible answers