Exam Prep 070-451: Chapter 1: The struggle

Task scheduler incorrectly locks the running account of scheduled tasks in Windows Server 2008, 7, Vista

When creating or modifying tasks in Windows Server 2008, you may get the following message after entering the credentials of the account which will run the task:

An error has occurred for task <taskname>.  Error message: The following error was reported: The referenced account is currently locked out and may not be logged on to..

 

Login failed for user 'NT Authority\SYSTEM'. Reason: Failed to open the explicitly specified database.

We had an issue where this message was appearing in the SQL Server error log every 5 minutes.

It can occur when SCOM (Microsoft Systems Center Operations Manager) attempts to poll SQL Server database information, but is not correctly configured.

To resolve this, create an SCOM-specific SQL server account with permissions on each database, then configure SCOM to use that account.

Missing ODBC Drivers on Windows Server 2008 (64-Bit)

If ODBC drivers appear to be missing on a 64-bit system, it's due to the administrative tools ODBC interface being specific to 64-bit drivers.

You can load the 32-bit ODBC driver interface using this command:

c:\Windows\SysWOW64\odbcad32.exe

For more information, refer to BigSQL.

Dynamically generate SQL Server backup date/time format


	Select CONVERT(Varchar(4), DATEPART(yy, getDate())) +
	CASE WHEN LEN(DATEPART(mm, getDate())) = 1
	THEN '0' + CONVERT(Varchar(2),DATEPART(mm, getDate()))
	ELSE CONVERT(Varchar(2),DATEPART(mm, getDate())) END
	+
	CASE WHEN LEN(DATEPART(dd, getDate())) = 1
	THEN '0' + CONVERT(Varchar(2),DATEPART(dd, getDate()))
	ELSE CONVERT(Varchar(2),DATEPART(dd, getDate())) END

 

Resolving the error message "[87, 22] The value for the attribute is not valid : progid" during installation of SQL Server Reporting Services

During the installation of SQL Server Reporting Services, you may receive the following error:

[87, 22] The value for the attribute is not valid : progid

The window will be titled: Windows Script Component - file://c:\windows\system32\iisschlp.wsc

iisschlp.wsc is the IIS script helper object.

initerrlog: Access is denied

After changing the SQL Server startup parameters through configuration manager, you may receive the following error:

initerrlog: Could not open error log file '$PATH'.  Operating system error = 5 (Access is denied).

$PATH is the directory of your SQL Server error logs.

This error may persist even if the directory exists and the permissions are set correctly (the SQL Service account should have full control over the specified directory).

Installing SQL Server service packs and cumulative update packs in a clustered environment

There are some misconceptions about the update process when dealing with a failover cluster.  If the appropriate services are running on each node, you do not have to run the installation on the passive nodes.  The installer will update the components that are node-specific (client tools, SSIS, etc) on the passive nodes first, before completing the cluster-aware components (SQL Services, SSAS) and local components on the active node.

Date Flattening (Removing the time from a existing date field)

Date Flattening in SQL Server 2005/2008.


Select DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0)


 

Cursor Syntax

Quick reference for cursor code.

Syndicate content