Results 1 to 5 of 5

Thread: Pinning in SQLSERVER

  1. #1
    Join Date
    Jun 2003
    Posts
    1

    Pinning in SQLSERVER

    Is it possible to pin datbase objects such as tables,stored procedures,functions in sqlserver database similar to oracle?If we can can anybody suggest the command to do it in SQLSERVER.

    THANKS

  2. #2
    Join Date
    Sep 2002
    Posts
    169
    sp_tableoption 'mytable', 'pintable', true
    will pin a table.

    I don't know of any way to pin other object types

  3. #3
    Join Date
    Sep 2002
    Location
    Amsterdam
    Posts
    53
    SET @db_id = DB_ID('myDB')
    SET @tbl_id = OBJECT_ID('myDB..table1')

    DBCC PINTABLE (@db_id, @tbl_id)

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Be careful. If you don't have enough memory on the server, may affect overall performance.

  5. #5
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Pinning is only recommended for small static tables like code tables which are frequently used.

    You can monitor the performance of your application after pinning tables you want and see what difference it makes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •