User does not have permission to perform this action.

Posted on 2009-05-17
Last Modified: 2012-05-07
I have SQLExpress 2008 installed on my local machine running XP Pro SP 3.  I am loged in as Administrator. I am able to work with Visual Studio no problem. I am able to connect to the local instance of SQLExpress with SQL Managemant Studio but that is all that I could do. Anything else I try to do I get the error "User does not have permission to perform this action." Could anyone help me out on this

EXEC sp_grantlogin '(local)\[Administrator]'
Msg 15247, Level 16, State 1, Procedure sp_grantlogin, Line 13
User does not have permission to perform this action.

Question by:ruffone
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3

Expert Comment

ID: 24407256
You are connecting with what user credentials to SQL Expres Management Studio? Try connecting to it through windows authentication and then try.

Accepted Solution

bull_rider earned 250 total points
ID: 24407268
Can you try this in osql?

C:\>osql -E
1> use dbname
2> exec sp_grantdbaccess loginname
3> go

This you have to do through the command prompt. And replace loginname with the user name u r logged in and replace dbname with your database name.

Hope it helps.

Author Comment

ID: 24407402
thanks for your response bull_rider
I am loged in as the local administrator of the maching. This is what have me so puzzled. This is literally what I type in and what I got back. I am loged into the machine "HYMAN" as "Administrator". Administrator is the name of the administrator account. It is the only account on the system. I use it to do everything on the system. I am very pissed that SQLExpress cannot see that.

C:\ >SQLCMD.exe -S HYMAN\SQLExpress -E
1>EXEC sp_grantlogin '[HYMAN]\[Administrator]'
Msg 15247, Level 16, State 1, Server HYMAN\SQLEXPRESS, Procedure sp_grantlogin,
Line 13
User does not have permission to perform this action.
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.


Author Comment

ID: 24407432
when I try to type in the command you send I get this
C:\>osql -E
[SQL Server Native Client 10.0]Named Pipes Provider: Could not open a
connection to SQL Server [2].
[SQL Server Native Client 10.0]Login timeout expired
[SQL Server Native Client 10.0]A network-related or instance-specific error
has occurred while establishing a connection to SQL Server. Server is not
found or not accessible. Check if instance name is correct and if SQL Server
is configured to allow remote connections. For more information see SQL Server
Books Online.

Assisted Solution

cdaly33 earned 250 total points
ID: 24407551

Expert Comment

ID: 24408630
Then you can do one more thing, can you enable the Named Pipes in Sql Server surface area configuration and allow the remote connections as well there?

Author Comment

ID: 24408886
I do not understand what is going on why I can't login with Management Studio but I found that I could work quite successfully in Visual Studio using the database diagram. All I ever wanted was to be able to do my work. So I am happy. Thank you guys for responding when I was pulling my hair out

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Script to backup a Database Dayli on SQL Server Express 3 23
TSQL Challenge... 7 44
What is this datetime? 1 27
denied execute as 13 28
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question