Welcome to Sign in | Help

Re: DROP constrangere (SQL 2000 si SQL 2005)

  •  02-19-2008, 11:42 AM

    Re: DROP constrangere (SQL 2000 si SQL 2005)

    Merci pentru idee.
    Am o problema insa la aplicare pe un server de test ;)

    Am dat comanda

    UPDATE sysobjects
    SET name = 'PK_IDDomeniu'
    FROM sysobjects INNER JOIN
    (
    SELECT child.name, child.id as id FROM
        sysobjects parent
        INNER JOIN sysobjects child ON parent.id = child.parent_obj
    WHERE child.xtype = 'PK' AND parent.name = 'domenii'
    )rest ON sysobjects.id = rest.id

    Problema este ca primesc urmatoarea eroare.

    Msg 259, Level 16, State 1, Line 1
    Ad hoc updates to system catalogs are not allowed.

    Acu incerc sa vad ca poate scap de eroare :)

    Totusi ... pe SQL 2005 se poate sa faci update pe vederi sistem ???(eu stiam ca nu Hmm) si daca da ... daca exista o cale ca aceste comenzi sa fie valabile si pe SQL 2000

    sp_configure 'allow updates', 1
    reconfigure with override

    UPDATE sysobjects
    SET name = 'PK_IDDomeniu'
    FROM sysobjects INNER JOIN
    (
    SELECT child.name, child.id as id FROM
        sysobjects parent
        INNER JOIN sysobjects child ON parent.id = child.parent_obj
    WHERE child.xtype = 'PK' AND parent.name = 'domenii'
    )rest
    ON sysobjects.id = rest.id

    sp_configure 'allow updates', 0
    reconfigure with override

    dar nu cred ca pot sa schimb flagul de allow updates :(


    Daniel.




    MCP (C Sharp)
    Software Engineer,
    Cluj Napoca
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems