Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23

Thread: MSSQL: Second user trying to connect generates: Cannot open user default database.

  1. #16
    Join Date
    Sep 2002
    Posts
    5,938
    Different partition is fine as long as on sql server's local disk. My question for you is that file spider-lab.mdf is in C:\Documents and Settings\Adam\My Documents\Visual Studio 2005\Projects\spider-lab-2\DB on sql server or not.

  2. #17
    Join Date
    Apr 2007
    Posts
    9
    No, SQL server resides here: C:\Program Files\Microsoft SQL Server.

    Is it necessary for attached file to be located at server root?

  3. #18
    Join Date
    Sep 2002
    Posts
    5,938
    Not necessary in C:\Program Files\Microsoft SQL Server, but has to be on sql server's local disk. You still didn't tell us which machine your .mdf file is on.

  4. #19
    Join Date
    Apr 2007
    Posts
    9
    Mdf is on my local disk, as is SQL server.

  5. #20
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    SQLExpress creates a directory per user in "c:\Documents and Settings\[user name]\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS" to store some information. Delete this directory and try again

  6. #21
    Join Date
    Sep 2002
    Posts
    5,938
    So you want to connect to sql instance on your pc? Possible to move the mdf file to other folder with shorter path?

  7. #22
    Join Date
    Nov 2007
    Posts
    1
    Hi all
    i have the same Error
    i'm working on solution conains Wendows Services and Wendows Application
    when i run the both Applications the Result is the same Error
    "Cannot open user default database. "

    Regards

  8. #23
    Join Date
    Sep 2002
    Posts
    5,938
    What's default db for the user? Is that db online? Does the user have permission in that db?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •