CREATE TABLE permission denied in database 'tempdb'

后端 未结 6 1101
野的像风
野的像风 2021-02-18 17:45

First time I installed SQL Server Management Studio Express and Visual Studio 2005 on my system. Now I am trying to create table by using below script. But if once I execute I a

6条回答
  •  隐瞒了意图╮
    2021-02-18 18:28

    I'm not sure if this answer will be helpful, but I experienced a similar problem and this is how I solved it. The issue I was experiencing was due to the fact that my 'create table' was defaulting to tempdb and I needed to specify the database name. As others have stated, I checked with my DB access operators to make sure I had create table permissions. Since I had the necessary permissions already, I came up with the solution below.

    The following returned the tempdb error:

    driver={SQL Server};server=YOUR_SERVER_NAME;trusted_connection=true
    

    Once I included the database name, the code worked fine. Here is the code that worked for me:

    driver={SQL Server};server=YOUR_SERVER_NAME;database=YOUR_DATABASE_NAME;trusted_connection=true'
    

    I hope this post is helpful!

提交回复
热议问题