General Error Messages (Volume 2)

SP_HELPDB error, it is not running properly –

The exact error that you may see is something like the following:

Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot insert the value NULL into column ”, table ”; column does not allow nulls. INSERT fails.The statement has been terminated.

Cause : This is caused by missing owner of a database.

Please run the following query in Query Analyser.

select name, suser_sname(sid) from master.dbo.sysdatabases where suser_sname(sid) is null


SELECT name, suser_sname(sid), convert(nvarchar(11), crdate),dbid, cmptlevel FROM master.dbo.sysdatabases

Remember, If Null is reported run the following to generate the query to fix the issue.

SELECT ‘USE ‘ + name + ‘; EXEC sp_changedbowner ”sa”;’
FROM master.dbo.sysdatabases WHERE suser_sname(sid) IS NULL

This would generate Query to change the dbowner for problem database.

USE Mydatabase; EXEC sp_changedbowner ‘sa’;
USE Report; EXEC sp_changedbowner ‘sa’;


SQL SERVER – Fix : Error 701 There is insufficient system memory to run this query

Solution : We need to first check configuration for both min server memory (MB) and max server memory (MB). All you need to increase the max server memory (MB) value.

Just check for the configuration /size of the virtual memory paging file. If possible, increase that.

SQL Server 2005: You may check for the latest hotfix in order to resolve this issue.

You may also try using following DBCC Commands can be used to free memory:



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: