Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Problem with LDF files ( database log file )

Problem with LDF files ( database log file )

Scheduled Pinned Locked Moved Database
databasehelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Developer611
    wrote on last edited by
    #1

    Hi there . I have a problem with SqlServer 2005 Log file . I have an application and i want to attach my database to SqlServer , I did it by SqlConnection and ConnectionString ,in many times it gives me an error. I know that when we use AttachDbFilename property in Connection for attach DB we don't need database log file, But most of times it gives me this error: "Unable to open physical file 'filpath_log.LDF'. Operation system error 5: "5(error not found)". Could not open new database 'DbName'. CREATE DATABASE is aborted. Cannot attach the file 'FilPath.mdf' as database 'DbName'. File activation failure. The physical file name 'filpath_log.LDF' may be incorrect. The log cannot be rebuilt when the primary file is read-only.' I wonder to say sometimes attachment works but sometimes not.:wtf: I already did this attachment process with SQLServer 2000 and it never gives me error X| .

    DMASTER

    F R 2 Replies Last reply
    0
    • D Developer611

      Hi there . I have a problem with SqlServer 2005 Log file . I have an application and i want to attach my database to SqlServer , I did it by SqlConnection and ConnectionString ,in many times it gives me an error. I know that when we use AttachDbFilename property in Connection for attach DB we don't need database log file, But most of times it gives me this error: "Unable to open physical file 'filpath_log.LDF'. Operation system error 5: "5(error not found)". Could not open new database 'DbName'. CREATE DATABASE is aborted. Cannot attach the file 'FilPath.mdf' as database 'DbName'. File activation failure. The physical file name 'filpath_log.LDF' may be incorrect. The log cannot be rebuilt when the primary file is read-only.' I wonder to say sometimes attachment works but sometimes not.:wtf: I already did this attachment process with SQLServer 2000 and it never gives me error X| .

      DMASTER

      F Offline
      F Offline
      Frank Kerrigan
      wrote on last edited by
      #2

      What are you trying to do ????? Load a log file via a connection ????

      Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture) http://www.frankkerrigan.com/[^]

      1 Reply Last reply
      0
      • D Developer611

        Hi there . I have a problem with SqlServer 2005 Log file . I have an application and i want to attach my database to SqlServer , I did it by SqlConnection and ConnectionString ,in many times it gives me an error. I know that when we use AttachDbFilename property in Connection for attach DB we don't need database log file, But most of times it gives me this error: "Unable to open physical file 'filpath_log.LDF'. Operation system error 5: "5(error not found)". Could not open new database 'DbName'. CREATE DATABASE is aborted. Cannot attach the file 'FilPath.mdf' as database 'DbName'. File activation failure. The physical file name 'filpath_log.LDF' may be incorrect. The log cannot be rebuilt when the primary file is read-only.' I wonder to say sometimes attachment works but sometimes not.:wtf: I already did this attachment process with SQLServer 2000 and it never gives me error X| .

        DMASTER

        R Offline
        R Offline
        rohitsrivastava
        wrote on last edited by
        #3

        hello friend where u get the back of data base it is not saved full some thing is missing so again take back up and there is no error tell me how to creat database with sqlscript or enterprisemanager if u take backup of enterprisemanager is best this is the step (1) open Enterprisemanager (2) right click on database name (3) All Task (4) Attach database (5) MDF File database to attach (Browse the path) (6) click mdf file and ok button you have succesfully attach in the server database then your problem is solve connection to database coding have a nice day

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups