Added new columns which now will not accept updates as sa

  • Hi A developer here has added two new columns ORIGINAL_STATUS & NEW_STATUS ( both varchar(15) ) as sa in development. Now when he goes to update rows the updates do not occur, and no error is reported. He can, however, update the other columns in the table. All of this is as SA . Another symtom is a general doesn't return on those new columns.

    Any suggestions as it's not obvious to me.

    Thanks in Advance

    Adonia

  • I would say to drop the columns and re-create them again. Then select top 5 * and see if the columns are there.

    You said "no errors" - check the error log as well.

    Generally speacking, it is not a good practice to use sa account, instead create sysadmin or db_owner accounts for who may need this type of access.

  • ... and lock down the production database... Developers should not have SA privs in the production database and they should not be promoting their own code. Look what happens when they do 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • you check whether there are two tables with same name and with different users.

    iam sure that might be the reason for your querry.

  • dgvsbabu (11/21/2007)


    you check whether there are two tables with same name and with different users.

    iam sure that might be the reason for your querry.

    What is the definition for a "table user"? You can have two or more objects with the same name in the same database only if the objects are created under different schemas, in which case you have to qualify the object name with the schema name each type when accessed.

  • Thanks for the replies. I will confirm tomorrow if we have a solution.

    Just to clarify only I have SA password in production, so unsure why you'd think otherwise. In development the developers have access to sa as a lot of the legacy applications and their associated dbs where created in pre-history using the sa account (something I'm working to get us away from). this is a slow laborious process of change

    Regards Adonia

Viewing 6 posts - 1 through 5 (of 5 total)

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