Transfer Object screws up inserts! user issues?

  • I am a new DBA and  recently transfered a stored procedure from one server to another from the GUI interface of SQL Server, which transferred all dependent object, insluding several tables and user logins.

    The databases are identical in their structure and naming conventions. The databases and tables belong to "sa".

    Since the transfer, we have not been able to insert any data into the new re-created tables, and the message I am getting is :

    "Msg 515, Level 16, State 3

    Attempt to insert the value NULL into column 'mod_user', table 'cmn26data.dbo.person'; column does not allow nulls.  UPDATE fails.

    Command has been aborted."

    I checked the sysusers and syslogin tables and there does not seem to be a mismatch in the suid's of the users.

    Any ideas of what is going on??

    S.Zlatareva

  • I would check the code that calls the stored-procedure that INSERTs the data and validate that the mod_user parameter is being populated.

    Try running Profiler to catch the parameters and that may help as well.

     



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Thanks for the reponse.

    The code all looks fine, all variables are being assigned the proper values...and it does work on the server it came from by inserting into the table which, when transferred to the new database, does not accept inserts.

     The mod_user colum is populated with a function suser_name() so it cannot be null since I am logged on as "sa".

    I am quite preplexed!

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

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