Insert table from Excel to write SQL

How to Insert Into a Table Using Excel to Write SQL

Today I want to show off a quick trick I learned many years ago that is useful to this day.

The Scenario: you have a spreadsheet, CSV file, or some other delimited flat file and need to load that into a database. There are many options to load data into SQL Server; however, a quick method I am fond of is to use Microsoft Excel and manipulate the data to craft insert statements then paste into SSMS and execute.

Read on to see how to parse and load a CSV flat file, character delimited flat file, and columnar text.

Read More »

Database Corruption

SQL Server Database Corruption! Fixing and Preventing

In my previous post, SQL Server Database Corruption! Understanding and Diagnosing, we talked about database corruption. We discussed what it was so we could better understand the threat we face. Then we learned how to diagnose database corruption. Today we are going to talk about remediating and preventing database corruption.

If you haven’t already read the previous post please read it first.

Read More »

Database Corruption

SQL Server Database Corruption! Understanding and Diagnosing

Of all the things that can ruin your day as a DBA and possibly get you fired, database corruption ranks right up there with backups and security enforcement of the database. Database corruption can be a resume generating event! A corrupt database can affect system stability, lead to unnecessary downtime, and possibly the loss of some data. To manage the risk you must know what database corruption is, how to diagnose, how to fix, and how to prevent.

Read on to learn how to understand and diagnose database corruption.

UPDATE: Part 2 on Fixing Database Corruption

Read More »

SQL Saturday Houston #766

I’m Speaking – SQL Saturday Houston 2018!

On Saturday June 9th I’ll be speaking at SQL Saturday Houston. I am excited to be presenting a lively and practical session about Environmental SQL Server Troubleshooting.

When called in to diagnose a performance issue what are the 1st things you review? Many DBAs and developers make the mistake of diving straight into the code looking for an answer. However, often times the solution is not in the code but rather in the overall environment.

Environmental troubleshooting is often a quick and overlooked method for discovering and configuring SQL Server to perform at a higher level without the need for application change controls.

In this session we will discuss both performance pitfalls and optimizations that can be made to the system outside of code changes. We will diagnose configurations commonly misapplied and review best practices in SQL Server, Windows Server, and VMware!

 

RDU to IAH

If you want a preview of the talk and some supplemental info please look at these:

 

Read More »