sql database RRS feed

  • Question

  • User-1209852231 posted

    I can now add projects, assign users, etc...
    I am now investigating the database side of this project. It seems the data is being save in sql server .mdf file
    There is now a TimeTracker.mdf in the data folder of sql server but I can NOT create this database in the object explorer using attach database.

    When doing this in sql 2005 by right click, new database; this is the error I get:
    create database failed. some file names listed could not be created. Check related errors. Can not create file 'c:\program files\...\TimeTracker.mdf' because it already exists. change the filepath or the file name, and retry the operation.
    Note that there is a .mdf file in the above path already and I would

    like to use that as the database.
    So I try to attached this .mdf file, and I get this error when attaching it:
    create file encouontered operating system error 32(error not found) while attempting to open the physical file 'c:\program files\TimeTracker.mdf' (Error 5123)

    Any suggestions please?

    Monday, January 5, 2009 10:13 AM

All replies

  • User1464216657 posted

     You need to attach the database in SQL Server Management Studio and not create it.

    Monday, January 5, 2009 12:57 PM
  • User555306248 posted

    Time Tracker use the TimeTracker.mdf' under SQL Server Express,

    So you have to attach to Sql server Management studio.

    Wednesday, January 7, 2009 10:25 PM
  • User-1209852231 posted

    The system does not allow me to attached.

    Friday, January 9, 2009 2:53 AM
  • User1464216657 posted

     Is this a local server?

    Friday, January 9, 2009 11:27 AM
  • User-1209852231 posted

    Yes it is.

    Friday, January 9, 2009 5:31 PM
  • User1566012831 posted

    Check to make sure that the sqlservr.exe user has read and write access to the MDF file.  You can see who the user is with Task Manager.

    Saturday, January 10, 2009 7:23 AM
  • User-1209852231 posted

    It shows Administrator who is me logged in to the machine.

    Saturday, January 10, 2009 5:18 PM
  • User555306248 posted

    Try to install VS 2005 SP1 and other other related updates

    May solve this one

    Monday, January 12, 2009 10:24 PM
  • User47344791 posted
    1    EXEC sp_attach_db @dbname = 'PUBS', 
    3         @filename1 = '\Program Files\Microsoft SQL Server\MSSQL\Data\PUBS.mdf', 
    4         @filename2 = '\Program Files\Microsoft SQL Server\MSSQL\Data\PUBS_LOG.ldf'
    6    sp_detach_db [ @dbname = ] 'dbname' 
    7                 [ , [ @skipchecks = ] 'skipchecks' ] 


      Hope this helps run this with master
    Friday, January 23, 2009 2:09 AM
  • User2019742093 posted

    When you have the web site open in Visual Studio you can use the Database Explorer to examine the database. You should find it on the View menu of VS.

    Friday, January 23, 2009 12:50 PM
  • User555306248 posted

    What is the status, Please update

    Thursday, January 29, 2009 10:28 PM
  • User555306248 posted

    Have solved your error

    Wednesday, February 4, 2009 10:25 PM
  • User-1315434892 posted

    if you start the vs,it may be use the database.you should to release it!

    Wednesday, February 11, 2009 10:01 PM
  • User555306248 posted

    Any updates on this

    Wednesday, February 25, 2009 10:22 PM
  • User47344791 posted

     close your post when resolved that helps fellow users

    Tuesday, March 10, 2009 2:21 AM
  • User-1209852231 posted

    Ok, thanks.

    Tuesday, March 10, 2009 3:06 AM
  • User555306248 posted

    Please mark the replies as answers if they help, Let other users get benefited.

    Tuesday, March 10, 2009 11:28 PM
  • User555306248 posted

    Please mark the answer if it solved

    Thursday, April 23, 2009 11:22 PM