Archive for the 'MSSQL' Category

SQL Integrity Check


No Comments »

admin on January 29th 2013 in MSSQL

How to connect to the WSUS SQL Database

1. Install SQL Management Studio on the Server
2. Run it and use following string as your server:

No Comments »

admin on November 29th 2012 in IT, MSSQL

WSUS Error 364–BITS HTTP 1.1 Range Requests

Error Message:
Content file download failed. Reason: The server does not support the necessary HTTP protocol. Background Intelligent Transfer Service (BITS) requires that the server support the Range protocol header.

You need to configure your firewall that it supports HTTP 1.1 ranges requests. Unfortunately I couldn’t reach our Firewall Administrator and I had to search for a temporary solution on my own.
You just need to change the settings, so that the BITS is working in foreground mode.

Temporary Solution Steps:
1. Install SQL Management Studio and run it
2. Connect to the DB:
3. Run following command on SUSDB:
UPDATE tbConfigurationC SET BitsDownloadPriorityForeground=1
4. Restart Windows Update Service

The solution above worked for me on Windows 2008 R2 Server. But actually you could probably also do it with the solution below.  The advantage of it would be that you don’t need to install SQL Management Studio on the Server.

Solution for Windows 2012:
1. Download and install following packages from Microsoft SQL Server 2012 SP1 Feature Pack
2.  Create a SQL query file “C:\Temp\WSUS_SetBitsDownloadForeground.sql” with following content:
UPDATE tbConfigurationC SET BitsDownloadPriorityForeground=1;
3. Run the query on the Windows Internal Database (WID):
C:\Program Files\Microsoft SQL Server\110\Tools\Binn>SQLCMD.EXE -S \\.\pipe\Microsoft##WID\tsql\query -i C:\Temp\WSUS_SetBitsDownloadForeground.sql
4. net stop wuauserv
5. net start wuauserv

No Comments »

admin on November 29th 2012 in IT, MSSQL, Windows Server

How can I determine SQL Server INstance Name?

Check in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names

No Comments »

admin on November 28th 2012 in IT, MSSQL

Quick and Dirty MS Database Analysis

This method queries all tables in a database and it displays the top 10 rows.

Get all tables with the following query:
SELECT name FROM ssysobjects WHERE type = ‘u’;

Copy&Paste it into Excel A Column and put following Formula into B Column for each row:
="SELECT TOP 10 * FROM " & A1 &";"

Result will be something like this:

Run this query in Microsoft Management Studio an analyse the result.

No Comments »

admin on February 4th 2012 in MSSQL

How to find out which SQL Server you are running

Just run a query with following command:

No Comments »

admin on February 7th 2011 in IT, MSSQL

Backup SQL Express 2005/2008

Unfortunately SQL Express 2005/2008 doesn’t come with a Backup Agent. So I searched the net for a couple of solutions to schedule it. There are some good TSQL scripts but a little program which you can run in Windows Task Planer. It is called ExpressMaint and can be downloaded here: Info ExpressMaint

No Comments »

admin on November 24th 2009 in MSSQL

MSSQL Login Failed

I tried to login to my SQL Server with a new user I created and got following error:
Login failed for user ‘root’. The user is not associated with a trusted SQL Server connection.

You need to activate MS Sql Authentication and Windows Authentication Mode:
1. Open MS SQL Server Manegement Studio
2. Right click on the server
3. Properties
4. Security
5. Change from Windows Authentication Mode to SQL Server and Windows Authentication mode

No Comments »

admin on May 11th 2008 in IT, MSSQL


I tried to remove the check_policy and check_expiration from a user and got following error in MS SQL Server:

I forgot to remove the must change password flag when I created the user. A simple SQL query to change the users password solved the problem:



No Comments »

admin on May 11th 2008 in IT, MSSQL

Version MS SQL Server

Here a simple MS Query to get the version of MS SQL Server:
select @@version

No Comments »

admin on May 6th 2008 in IT, MSSQL

Check out new movies online website. Download and buy movies now.