Posted on 2009-04-20
Last Modified: 2012-05-06
Hello experts

I have a SQL Server 2005
I was suspended in a database and only have the file and run the following t04_historical_data.mdf ence to recreate the log file. Executo the following sequence:
Sp_attach_single_file_db exec @ dbname = 't04_historical', @ physname = 'e: \ tango04Data \ t04_historical_Data.MDF'
and the result is:
Msg 3415, Level 16, State 3, Line 1
Database 't04_historical' can not be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 't04_historical. CREATE DATABASE is aborted.

Question by:jmatarranz
    LVL 31

    Expert Comment

    do you have write permission on the folder in which you have placed .MDF file?
    LVL 31

    Expert Comment

    LVL 31

    Accepted Solution

    this one is also useful but not better than previous one.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
    Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now