Archives for posts with tag: SQL

The Problem

The other day I was faced with a simple little issue to solve.  I had the Serial Number/Service Tag for a Dell server but I had no idea where it was physically located nor did I know the name of the server.  This would have not been a problem with our clients because we name our clients the same as the Service Tag.  But, our servers are named differently.

System Center Configuration Manager to the Rescue…Again!

So I decided to use SCCM reporting to solve this problem since SCCM collects all sorts of data anyway.  I created a custom report called Computers with a specific Dell ServiceTag.  The following is the SQL statement that I wrote.

SELECT SYS.Netbios_Name0, SYS.AD_Site_Name0, SYS.Operating_System_Name_and0
FROM v_GS_PC_BIOS BIOS
JOIN v_R_System SYS on SYS.ResourceID = BIOS.ResourceID
WHERE BIOS.SerialNumber0 LIKE @serialNumber
ORDER BY SYS.Netbios_Name0

  1. Click the Prompts button and add a prompt property
  2. Name: serialNumber and Prompt text: Serial Number
  3. Check the Provide a SQL statement box and enter the following:

    begin
    if (@__filterwildcard = '')
    select distinct SerialNumber0 from v_GS_PC_BIOS order by SerialNumber0
    else
    select distinct SerialNumber0 from v_GS_PC_BIOS
    WHERE SerialNumber0 like @__filterwildcard
    order by SerialNumber0
    end

That should do it.

Debriefing

We’re a Windows shop here.  So when the topic came up from our Application Developer to test out WordPress as the platform for our next website we knew that it would be the unconventional approach to doing things.  But, I’m always up for the challenge.  Since I could find no concise guide to getting this done I figured I’d share my approach with you all to ease some of the pain.

The Environment

  • The server is a VM running Windows Server 2008 R2 which is of course 64-bit.  This is now the standard O/S platform for all newly created servers in our environment.
  • The database server will not be SQL Server Express as we have a VM running SQL Server 2008 SP1 in our environment.  This guide is written for those who have this setup as most of the guides that you find around the web assume that installing SQL Server Express locally is acceptable.
  • Keep in mind that this installation is intended for a development environment and not for production.  It’s safe to assume that additional security measures will need to be taken before employing IIS, WordPress or any of the other components in a production environment. Read the rest of this entry »

And Event Viewer Says…

Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7024
Date: —
Time: —
User: N/A
Computer: —
Description: The SQL Server (<instance_name>) service terminated with service-specific error 17051 (0x429B).

So then I scurry on over to find out what the SQL Server logs are saying about all of this.  I go here: C:\Program Files\Microsoft SQL Server\MSSQL10.<instance_name>\MSSQL\Log and open the ERROR file. Read the rest of this entry »