Database Archive missing FK

  • Bonjour à tous,

    je vais bientôt démarrer un projet d'archivage de données pour alléger la base de production.

    Dans la configuration spécifique de la base d'archivage, il a été décidé qu'elle ne contiendrait pas de clés étrangères (FK), ce qui fragilise davantage la base.

    En effet, un TRUNCATE TABLE pourrait être effectué sur toutes les tables sans restriction.

    Je sais qu'il est important de gérer cela côté sécurité, mais j'aimerais connaître votre avis sur l'utilisation de vues indexées pour protéger ces données.

    https://learn.microsoft.com/en-us/sql/t-sql/statements/truncate-table-transact-sql?view=sql-server-ver16

    Qu'en pensez-vous ?

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • Between updates, just set the database to "Read Only".  As an alternative, you can create individual File Groups with one or more Files in each and set those File Groups to "Read Only" and only set them to "Read/Write" during data updates or additions.

     

    --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)

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

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