locked
cannot find database login fail. RRS feed

  • Question

  • I had to database one on my local machine (LM) and one on the network machine (NM).

    NM had a website where users and had to login to access the data using SQL authentication.

    LM uses windows authentication. I updated LM  made a backup.

    detach NM and delete it. I copied the backup to  NW and then Attach it.

    now when users login they are seeing the message can't find database.

    Even if I know for a fact the database is there with the same name.

    Not sure what to do.

    Friday, August 8, 2014 1:20 AM

Answers

  • You need to give users access to the database. To make it easier you may add a role and give it required access for the database and then whichever want access you just need to include their login as a member of the created role. I assume they all use Windows authentication. If not, just create a new sql authetication account with required permissions and circulate it to them

    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by Charlie Liao Friday, August 15, 2014 9:45 AM
    Friday, August 8, 2014 3:25 AM
    Answerer
  • If i am guessing correctly then, This is a very common issue :-)

    you think that the because you use attached a database with the same user name then this is the same user :-) It is not.  two users with the same name and the same password in two instances are not the same user. you should search Google for: sql server orphaned users. those users that came from the other server named "orphaned users". they seem to be in the login list but there is no real user with the same ID configure in the server (there might be a different use with the same name and password which is not the same user since the ID is not the same)

    Fix the orphaned users as a start step :-)

    http://msdn.microsoft.com/en-us/library/ms175475.aspx


    [Personal Site] [Blog] [Facebook]signature

    Friday, August 8, 2014 7:54 AM

All replies

  • You need to give users access to the database. To make it easier you may add a role and give it required access for the database and then whichever want access you just need to include their login as a member of the created role. I assume they all use Windows authentication. If not, just create a new sql authetication account with required permissions and circulate it to them

    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by Charlie Liao Friday, August 15, 2014 9:45 AM
    Friday, August 8, 2014 3:25 AM
    Answerer
  • If i am guessing correctly then, This is a very common issue :-)

    you think that the because you use attached a database with the same user name then this is the same user :-) It is not.  two users with the same name and the same password in two instances are not the same user. you should search Google for: sql server orphaned users. those users that came from the other server named "orphaned users". they seem to be in the login list but there is no real user with the same ID configure in the server (there might be a different use with the same name and password which is not the same user since the ID is not the same)

    Fix the orphaned users as a start step :-)

    http://msdn.microsoft.com/en-us/library/ms175475.aspx


    [Personal Site] [Blog] [Facebook]signature

    Friday, August 8, 2014 7:54 AM