New page size

  • Is it possible to set a new page size in SQL Server 2000???

    If so, how?

  • Pages are fixed at 8k. Steve Jones has a great article about row size and pages you might find helpful:

    http://www.sqlservercentral.com/columnists/sjones/pagesize.asp

    Why do you need to change the page size?

    Andy

  • I need to change the page size for one main reason. For each table, I have a restore table which is written to for updates and deletes using triggers. However, you can't access text datatypes using the inserted and deleted virtual tables in triggers so I wanted to make all of the large text fields varchar(8000) which is plenty large enough. However, if the page size is only 8k, this is clearly a problem if I have 2 or 3 large text fields.

    Understand?

  • You're better off using text columns since they only consist of a 16 byte pointer in the record, the actual data is stored in another table. For the few times when you need access to these in a trigger (usually for auditing) you can access them in an instead trigger (SQL2K only).

    Andy

  • How can I access them in an instead of trigger? Just with the inserted/deleted tables???

  • Yes. Instead of triggers are slightly different than after triggers in how they handle text.

    Andy

  • Excellent, thank you very much.

    Question. WHY! are the inserted/deleted tables handled differently in for/instead of triggers??? There must be a reason.

  • Previously, AFTER triggers couldn't touch text, ntext, and image columns for inserted or deleted. That behavior hasn't changed.

    Since the INSTEAD OF trigger interrupts a normal operation, I guess the SQL Server development team felt they had to handle those data type columns.

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

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

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