Errors attempting to create a table in tempdb

  • I am getting the following message when users try to create a temporary table in tempdb from our VB Application:

    CREATE TABLE permission denied for tempdb owner dbo

    Help!!

  • Sounds like you're trying to create "permanent" tables in TempDB, so you need to do:

    use tempdb

    grant create table to public

    But, because it's TempDB, this permission will disappear upon SQL Server restart, so you might want to incorporate it into a startup procedure.


    Cheers,
    - Mark

  • use this:

    create table #mytmptable (<etc>)

    or the double ##

    as mentioned, if you want "perm" temporary tables for general working purposes, then I would rethink what your trying to do here. Perhaps post your thoughts for further discussion.

    Cheers

    Ck

    Chris Kempster

    http://www.chriskempster.com

    Author of "SQL Server 2k for the Oracle DBA"


    Chris Kempster
    www.chriskempster.com
    Author of "SQL Server Backup, Recovery & Troubleshooting"
    Author of "SQL Server 2k for the Oracle DBA"

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

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