create table permission denied in database 'master'

后端 未结 7 2235
挽巷
挽巷 2020-12-15 09:31

I have installed the free version of sql server 2008 (sql server management studio express edition) on my PC. After installation I get the following error

cr         


        
相关标签:
7条回答
  • 2020-12-15 09:45

    You should use sp_addsrvrolemember to add your user into role 'sysadmin'. Here is link that helped me to solve this problem: http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/76fc84f9-437c-4e71-ba3d-3c9ae794a7c4/

    0 讨论(0)
  • 2020-12-15 09:45

    If your table actually exists in a different database (not master), you will need to switch to that database. A GUI option to change the database reference is shown below.

    0 讨论(0)
  • 2020-12-15 09:45

    I was also facing the same problem. After putting in a great effort I came across this beautiful link

    http://www.metatexis.net/manual_server/errorwhenusingmssqlservernamedpipesprovidercouldnotopenaconnectiontosqlserver.htm

    The problem with my Sql Server was that I could login using USER-NAME account but not USER-NAME\SQLEXPRESS account. USER-NAME server had just Guest permissions whereas USER-NAME\SQLEXPRESS has complete permissions. You can check that by executing this query.

    select user_name()
    

    I went on to check whether my service is running or not. You can do that by clicking start and typing in "services.msc". Open that and search for "SQL Server (SQLEXPRESS)". Start it if its not already started.

    In my case it was disabled. I right clicked it. Went to properties and changed "Startup type" to "Automatic".

    After doing all this I started Sql Server Management Studio again and connected using USER-NAME\SQLEXPRESS and it worked.

    Cheers,

    0 讨论(0)
  • 2020-12-15 09:56

    I've read the error can be caused by UAC (on older versions of SQL Server Express). Try right-clicking on SQL Studio and running as administrator.

    If that doesn't work there's supposedly a fix here for the same issue. Probably worth a try.

    Script to add the current user to the SQL Server 'sysadmin' role

    0 讨论(0)
  • 2020-12-15 09:56

    I had the sam eproblem even though I was logged in as master. I was showing logged in as "guest", when I used 'select user_name();'. I used 'USE ,Database>' clause before script an dit really worked. I hope this works for some of you too.

    0 讨论(0)
  • 2020-12-15 09:57

    If you got the same error in Sql server 2008 management studio than below link will resolve this error after so much i found this and check answer by blipsalt http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/76fc84f9-437c-4e71-ba3d-3c9ae794a7c4/

    0 讨论(0)
提交回复
热议问题