Technical Article

Bulk Insert WMIC output to table w/ xp_cmdshell

This is an example of retrieving WMIC results using the xp_cmdshell proc, and inserting the results into a table.Specifically, this script retrieves disk info from the LogicalDisk class, but WMIC provides thousands of other properties. WMIC does require it be ran from a Windows 2003 server, but can query other Windows 2000 servers when executed […]

(1)

You rated this post out of 5. Change rating

2006-08-04 (first published: )

813 reads

Blogs

Advice I Like: Pyramid Schemes

By

If someone is trying to convince you it’s not a pyramid scheme, it’s a...

Using Prompt AI for a Travel Data Analysis

By

I was looking back at my year and decided to see if SQL Prompt...

FinOps for Kubernetes: Leveraging OpenCost, KubeGreen, and Kubecost for Cost Efficiency

By

In the era of cloud-native applications, Kubernetes has become the default standard platform for...

Read the latest Blogs

Forums

Database file shrink issue.

By Tac11

Hi experts, I have a 3+ TB database on a 2019 sql server which...

The North Star for the Year

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The North Star for the...

Multiple Escape Characters

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Multiple Escape Characters

Visit the forum

Question of the Day

Multiple Escape Characters

In SQL Server 2025, I run this code (in a database with the appropriate collation):

SELECT UNISTR('%*3041%*308A%*304C%*3068 and good night', '%*') AS 'A Classic';
What is returned?

See possible answers