1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Database and server triggers on DDL statements CREATE, ALTER and DROP are not supported...

Discussão em 'Outras Linguagens' iniciado por Stack, Setembro 28, 2024 às 16:22.

  1. Stack

    Stack Membro Participativo

    I am getting this error when i try to drop a memory optimized table. i am using a sql server 2016 sp1

    Database and server triggers on DDL statements CREATE, ALTER and DROP are not supported with memory optimized tables.

    I have dropped the sec policy and the 2nd index. I can't drop the spidfilter as you have to have 1 index for the MOT. Just to see if that made a difference. it did not.

    code is below:

    create table dbo.MOT_tmpTableName
    (
    Col1 int,
    Col2 int,
    Col3 smalldatetime,
    Col4 smalldatetime,
    Col5 varchar(25),
    Col6 date,
    Col7 smallint,
    Col8 smallint,
    Col9 smallint,
    Col10 smallint,

    SpidFilter smallint not null DEFAULT (@@spid),

    index nIX_SpidFilter nonclustered (SpidFilter),
    index nIX_Col1_Col2_Col3 nonclustered (Col1, Col2, Col3),

    CONSTRAINT CHK_MOT_tmpTableName_SpidFilter
    CHECK ( SpidFilter = @@spid ),
    )
    WITH
    (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_ONLY);
    go


    create security policy dbo.MOT_tmpTableName_SpidFilter_Policy
    ADD FILTER PREDICATE dbo.fn_SpidFilter(SpidFilter) ON dbo.MOT_tmpTableName
    WITH (STATE = ON);
    go


    i have asked around and other environments do not have this issue. I can't get the "Database and server triggers..." out of my head. What trigger is firing that is causing an error?

    Continue reading...

Compartilhe esta Página