Unexplained error -2147217873

  • Hi

    Could anybody help

    Colleagues are using a bespoke system with a back end SQL database, and, all of a sudden - when trying to log on to the Db - are getting one of the following errors

    DATETIME: 22-Aug-2007 08:21:26|| DESCRIPTION: Cannot insert the value NULL into column 'owner', table 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________0001000000E9'; column does not allow nulls. INSERT fails.|| SOURCE: Microsoft OLE DB Provider for SQL Server|| COMPONENT: FWStfMaint|| ERRORNO: -2147217873|| PROCEDURE: FWCurrentUser: Logon Method|| CODEBLOCK: Error trying to connect to herts_trainingdatabase|| USFMESSAGE:  || APPLICATION: Symphony Version 2|| ATTENDANCENO: || PATIENTID: || PCNAME: 2K-PCT-MIU-SQL1|| SERVERNAME: || LOGGEDUSER: SymphonyAdmin|| SITE: Herts and Essex MIU|| BUILDNO: 2.17.5|| OS: Windows 2000 Version 5.0 Build 2195|| DBTYPE: || DBVERSION: 2.3.4|| MDACVERSION: 2.8||

    or

    DATETIME: 22-Aug-2007 08:20:42|| DESCRIPTION: Cannot insert the value NULL into column '', table ''; column does not allow nulls. INSERT fails.|| SOURCE: Microsoft OLE DB Provider for SQL Server|| COMPONENT: FWStfMaint|| ERRORNO: -2147217873|| PROCEDURE: FWCurrentUser: Logon Method|| CODEBLOCK: Error trying to connect to herts_livedatabase|| USFMESSAGE:  || APPLICATION: Symphony Version 2|| ATTENDANCENO: || PATIENTID: || PCNAME: 2K-PCT-MIU-SQL1|| SERVERNAME: || LOGGEDUSER: SymphonyAdmin|| SITE: Herts and Essex MIU|| BUILDNO: 2.17.5|| OS: Windows 2000 Version 5.0 Build 2195|| DBTYPE: || DBVERSION: 2.3.4|| MDACVERSION: 2.8||

    Could anybody assist in resolving this error please

    Thanks

    Gary 

  • Pretty sure this has to do with having a database without an owner - this can happen if you recently restored/attached database, or did you maybe drop a user?

    Have a look at

    select name, suser_sname(sid) from master..sysdatabases

    you'll want to use sp_changedbowner  to fix the issue, take a look in BOL for the syntax.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • based on error message it seems to me that you are trying to enter data in the column that doesn't accept NULL. in tempdb.dbo.#spdbdesc

  • Hi

    Try out this link it extensively talks about the null problem with SYSNAME datatype , that you might be facing.

    http://www.sqlmonster.com/Uwe/Threads/List.aspx/sql-server/5631/SP-helplogin

    Regards

    Avijeet

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply