none
Arithmetic overflow error converting expression to data type bigint RRS feed

  • Question

  • I am attempting to setup a replication from SQL Server 2005 that will be read by SQL Server Compact Edition (beta).  I'm having trouble getting the Publication Wizard to create the Publication.  Sample table definition that I'm replicating:

    USE dbPSMAssist_Development;
    CREATE TABLE corporations (        
        id NUMERIC(19,0) IDENTITY(1964,1) NOT NULL PRIMARY KEY, 
     idWas NUMERIC(19,0) DEFAULT 0,
        logIsActive BIT DEFAULT 1,       
        vchNmCorp VARCHAR(75) NOT NULL,      

        vchStrtAddr1 VARCHAR(60) NOT NULL,    
        vchNmCity VARCHAR(50) NOT NULL,      
        vchNmState VARCHAR(2) NOT NULL,                     
        vchPostalCode VARCHAR(10) NOT NULL,                 
        vchPhnPrimary VARCHAR(16) NOT NULL,                 
    );
    CREATE INDEX ix_corporations_nm ON corporations(vchNmCorp, id);
    GO

    When the wizard gets to the step where it is creating the publication, I get the following error message:

    Arithmetic overflow error converting expression to data type bigint.  Changed database context to 'dbPSMAssist_Development'.  (Microsoft SQL Server, Error: 8115).

    I can find no information on what this error is or why I am receiving the error.  Any ideas on how to fix would be appreciated.

    Thanks in advance ...

    David L. Collison

       Any day above ground is a good day.

    Tuesday, January 9, 2007 2:49 PM

Answers

  • Greg ...

    This has to be due to the size of my key on the file.  I resized the field ID to NUMERIC(12,0) and now the replication wizard completes the setup properly.

    I would have anticipated the replication engine to utilize the definition - obviously it doesn't like big numbers.  Ok, I know it will take a long time to create that many records to worry about filling up the key at 12 digits let alone 19, but I like to plan ahead. ;-)

    Have a good one!

    David L. Collison
       Any day above ground is a good day!
    Wednesday, January 10, 2007 1:32 AM

All replies

  • We need more information - are you doing any filtering or joining of any articles that may cause this error?

    You can also do a profile trace of the publisher when you click on the OK button to complete the wizard so you can see what stored proc and statement it's failing on.  Let us know what you find.

    Tuesday, January 9, 2007 5:52 PM
    Moderator
  • Greg ...

    This has to be due to the size of my key on the file.  I resized the field ID to NUMERIC(12,0) and now the replication wizard completes the setup properly.

    I would have anticipated the replication engine to utilize the definition - obviously it doesn't like big numbers.  Ok, I know it will take a long time to create that many records to worry about filling up the key at 12 digits let alone 19, but I like to plan ahead. ;-)

    Have a good one!

    David L. Collison
       Any day above ground is a good day!
    Wednesday, January 10, 2007 1:32 AM