"User does not have permission to perform this action"

  • Hi All.

    Was wondering if somebody can help me 🙂

    I am building an app with Visual Basic 2005 Express.

    My app requires connection to a local MDF file that i created with SQL

    Server 2005 Express. On my Desktop the following connection string works fine:

    Dim con As New SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Test.mdf;Integrated Security=True;User Instance=true;")

    I am able to manipulate and do pretty much everything on the database.

    I have tried the code on my laptop that has the exact same software, login profile etc but when i try to connect to the database i get "User does not have permission to perform this action".

    I also opened a new project on the laptop and tried to create a new mdf file via Add New Data source and i get the same error.

    As most of my development takes place on my laptop this is going to be a problem.

    Am i missing something? :crazy:

    Any help would be much appreciated.

    Scott.

  • Make sure the laptop WinNT user is mapped to a login on the SQL Server Express instance, and this login is a user of the database, and the user has appropriate permissions in that database.

    I guess the login exists but the database user either does not exist or is not permitted to connect to the database.

    How was the database created? If you restored the database on the laptop from a backup then perhaps user/login mappings are incorrect. Look up the sp_change_users_login system procedure in Books Online.

    ML

    ---
    Matija Lah, SQL Server MVP
    http://milambda.blogspot.com

  • my computer name: home

    my login name: mano

    when I install SQL Server 2005- user name displaying as home\mano

    I am trying to drop login but sql is displaying this message: User does not have permission to perform this action

    why is this? I verified the user settings- my login name- mano is Administrator on my computer (name: home).

    Is there any other setting to do? Thanks

  • What permissions do you have on the SQL Server instance?

    ML

    ---
    Matija Lah, SQL Server MVP
    http://milambda.blogspot.com

  • resolved this issue.

    logged into SQL Server with sa

    assigned sysadmin to my user

    connected to SQL Server and did the same ooperation. It passed !!!

    Thanks for your response.

Viewing 5 posts - 1 through 4 (of 4 total)

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