Fix: SQL agent wont start on Windows 2003 Cluster, Event 53

The Problem

SQL Agent won’t start on a Windows cluster for a particular instance

The Symptoms

Seen in Windows Application log
 
Event: 53 Source: SQLAgent$CF3Common Category: Failover
 
[sqagtres] OnlineThread: Error 6 bringing resource online.
[sqagtres] OnlineThread: ResUtilSetResourceServiceEnvironment failed (status 6)
 
The Cause
 
In Cluster Administrator, the SQL Server Agent had lost its dependency upon the SQL server resource for the affected instance.
 
The Solution
 
Add the SQL Server dependency, bring SQL Server Agent online in Cluster Administrator

SQL Query to determine Blackberry MDS Services administration password

I was troubleshooting a Blackberry Manager problem today that required the BES MDS credentials.  The admin thought he knew what the credentials were, but wasn’t sure.  So I wrote the following SQL query and ran it against the Blackberry Enterprise Server’s BesMgmt database to get the user name and password:  

Use BesMgmt
select
WSAdminUserName, WSAdminPassword
from dbo.MDSAGConfig
 
Replace BesMgmt with the name of your BES database if you are not using the default database name.
 
See RIM KB15618 for additional details on how to reset the BES MDS Services administration password.

FIX: Event ID: 57860 “An error occurred while attempting to log in to the following server… SQL error number: “0011″ is seen when backing up a server with SQL installed

Exact Error Message

Event ID: 57860 Source: Backup Exec Type: Error Description: An error occurred while attempting to log in to the following server: “SERVERNAME”. SQL error number: “0011″. SQL error message: “[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
 
Details:
 
This error will occur when performing any type of backup on a server running Microsoft SQL Server or Microsoft SQL Server Desktop Engine (MSDE), even if the SQL Agent Backup is not being performed. “bedssql2.dll” will always be initialized and loaded on every server that is running the “Backup Exec Remote Agent Service ” whether the SQL agent and license is installed or not.
 
Cause:
 
One or more SQL Databases are corrupted on the remote machine, or the SQL database no longer exists on the remote machine.

Workaround:

Perform the following to resolve this issue:

1. On the SQL server, stop the Backup Exec Remote Agent Service from Windows Control Panel > Services.

2. If SQL is installed on the media server (i.e. if SQL is on the same machine as Backup Exec), within Windows Explorer browse to the installation directory for Backup Exec, which by default is:

\Program Files\VERITAS\Backup Exec\NT

for Backup Exec version 11d and above, the default location is 

\Program Files\Symantec\Backup Exec\
 
If SQL is installed on a remote server, browse to the installation directory for the Remote Agent:

\Program Files\VERITAS\Backup Exec\RANT

for 11d and above:

\Program Files\Symantec\Backup Exec\RAWS

3. Rename the bedssql2.dll file to bedssql2.old

4. Start the Backup Exec services

If the SQL/MSDE is installed on a Remote Server:

1. Stop Remote Agent service on the remote server.
2. Rename the bedssql2.dll file to bedssql2.old on the remote server.
3. Start the Remote Agent service.
4. Re-Start the Backup Exec services on the media server.
5. Run the Backup job and check the result.

WARNING:  Renaming the bedssql2.dll will effectively disable the SQL agent on the server it is renamed upon.  If the SQL agent is purchased in the future, the issue with the corrupt database(s) must be resolved first, and backup of the SQL servers on which the bedssql2.dll was changed is desired – the bedssql2.old file MUST be renamed back to bedssql2.dll. 

How to change the SQL sa password from a command prompt

To change the SQL sa password from a command prompt:

Start a command prompt by typing StartRuncmd

Enter the following commands, pressing Enter after each line

OSQL -S yourservername -E
    1> EXEC sp_password NULL, ‘yourpassword’, ’sa’
    2> GO

Where yourservername is the name of your server and yourpassword is the new sa account password.  Type exit twice to return to the server desktop. 

This works in SQL 2005, I don’t have access to other versions so I can’t say if it will or won’t work other versions of SQL.

Posted in howto. Tags: , , , . 2 Comments »

Howto: Determine the SQL 2000 Version

KB 321185 describes how to determine the version of SQL Server you are running. To determine which version of SQL you are running, enter the following into the SQL Query Analyzer:

SELECT  SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

The results are:

The product version (for example, 8.00.534).
The product level (for example, “RTM” or “SP2″).
The edition (for example, “Standard Edition”). For example, the result looks similar to:8.00.534 RTM Standard Edition

The following table lists the Sqlservr.exe version number:

Release Sqlserver.exe
RTM 2000.80.194.0
SQL Server 2000 SP1 2000.80.384.0
SQL Server 2000 SP2 2000.80.534.0
SQL Server 2000 SP3 2000.80.760.0
SQL Server 2000 SP3a 2000.80.760.0
SQL Server 2000 SP4 2000.8.00.203

Notice SQL Server 2000 SP3 and SP3a have the same version of sqlserver.exe. SP3 is no longer available, and if you already have SP3 installed you do not need to apply SP3a. The changes made to SP3a were in the setup program, not in the actual Service Pack. There is a newer version of MDAC in SP3a, but you can download that separately.

Posted in howto. Tags: , , . 1 Comment »

Sonicwall Viewpoint 4.1 Installation Error: SQL Server does not exist or access denied

At one of my client locations we use Sonicwall’s Viewpoint reporting system to gather usage data from the Sonicwall firewall and content filter.  Viewpoint is a pita to upgrade or move to a new machine, and I treat the program with care, since it’s very easy to unintentionally break. I was upgrading from an old version (2.9) only because I could no longer access the administrative interface through a web browser to run reports.

One very important thing to know about Viewpoint is it will not install properly on a machine that had any previous instances of SQL Server or MSDE on it.  Plus, if you want to use SQL Server instead of MSDE for the Viewpoint database, Sonicwall will not provide you technical support.

After much trial and error I found that just removing prior SQL/MSDE instances was not enough to make the installation a success.  I would complete phase 1 of the installation, only to have phase 2 fail with the following error:

SQL Server does not exist or access denied

I searched the Sonicwall tech support web site and forums, but could only find one document that addressed this error, and of course it didn’t work (not a big suprise, if you’ve ever dealt with Sonicwall tech support you know what I mean)

In order to complete the Viewpoint 4.1 Installation I had to:

1) Uninstall the SQL/MSDE from Add/Remove Programs and any other software that used SQL/MSDE.  In my case, I had a copy of Dell’s IT Assistant, a part of the OpenManage Management Station.  Reboot.

2) Use MyUninstaller to remove Microsoft SQL Server Express 2005, even though the uninstallation process in step 1 had removed it from Add/Remove Programs.

3) Delete the sgmsconfig.xml from the root of the installation drive (C:\ in my case)

4) Rename all of the remaining Viewpoint and SQL/MSDE directories on the hard drive

5) Reboot, then run the Viewpoint installer.  I was able install without problems, but phase 2 takes a looooong time, and I thought the machine was locked up.  Be patient.

I did find one glitch during the installation – even though I was asked what password I wanted to use for the Viewpoint login, it was not applied.  I had to use the default login and password, which you can find in the Viewpoint 4.1 Administrator’s Guide.

You may find Some of the Microsoft Knowledge Base articles I found helpful if you are having SQL/MSDE uninstallation problems:

KB 311762 – How to identify which MSI file was used for an existing MSDE installation

KB 823467 – BUG: You cannot start the SQL Server Agent Service for an instance of SQL Server or the SQL Server 2000 Desktop Engine that has the same instance name as a previously uninstalled instance of the SQL Server 2000 Desktop Engine (Windows)

KB 317619 – FIX: Cannot Remove Microsoft SQL Server 2000 Desktop Engine After You Upgrade to MSDE 2000 SP2

KB 320873 – How to manually remove a Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) instance

KB 909967 – How to uninstall an instance of SQL Server 2005 manually

Aaron also has a detailed procedure for removing SQL Express manually.  It also seems that the SQL Express uninstaller requires the .NET framework 2.0, so if you don’t have the .NET 2.0 framework, you may need to install it prior to uninstalling SQL Express.