Restore a database with LDF file only












2















First of all, i know how stupid it is not to have a any backup. I can't help it, but i have to (try) to solve it.



I have a transaction log (LDF) file from a SQL Server 2000 database that contains all transactions since the creation of the database. No truncation has been done. The MDF file is gone. Probably because of some disk failure. There is no backup. Not from the original database and not from the transaction log.



I have tried to link the transaction log to a new clean database. But (ofcourse) that failed because SQL Server checks the identity of both files.
I have read about software that can read the transaction log. ApexSQL seems to do that. I tried to install the trial version but it gives weird errors when trying to start the program.



Anyone knows a solution for me? It may contain third party software, but i prefer a clean SQL Server solution.










share|improve this question























  • i'm curious as to how you came to have an ldf file without an mdf file. As far as i am aware, you are pretty well out of luck. If you have solved this, let us know how!

    – DForck42
    Jan 16 '13 at 22:22
















2















First of all, i know how stupid it is not to have a any backup. I can't help it, but i have to (try) to solve it.



I have a transaction log (LDF) file from a SQL Server 2000 database that contains all transactions since the creation of the database. No truncation has been done. The MDF file is gone. Probably because of some disk failure. There is no backup. Not from the original database and not from the transaction log.



I have tried to link the transaction log to a new clean database. But (ofcourse) that failed because SQL Server checks the identity of both files.
I have read about software that can read the transaction log. ApexSQL seems to do that. I tried to install the trial version but it gives weird errors when trying to start the program.



Anyone knows a solution for me? It may contain third party software, but i prefer a clean SQL Server solution.










share|improve this question























  • i'm curious as to how you came to have an ldf file without an mdf file. As far as i am aware, you are pretty well out of luck. If you have solved this, let us know how!

    – DForck42
    Jan 16 '13 at 22:22














2












2








2








First of all, i know how stupid it is not to have a any backup. I can't help it, but i have to (try) to solve it.



I have a transaction log (LDF) file from a SQL Server 2000 database that contains all transactions since the creation of the database. No truncation has been done. The MDF file is gone. Probably because of some disk failure. There is no backup. Not from the original database and not from the transaction log.



I have tried to link the transaction log to a new clean database. But (ofcourse) that failed because SQL Server checks the identity of both files.
I have read about software that can read the transaction log. ApexSQL seems to do that. I tried to install the trial version but it gives weird errors when trying to start the program.



Anyone knows a solution for me? It may contain third party software, but i prefer a clean SQL Server solution.










share|improve this question














First of all, i know how stupid it is not to have a any backup. I can't help it, but i have to (try) to solve it.



I have a transaction log (LDF) file from a SQL Server 2000 database that contains all transactions since the creation of the database. No truncation has been done. The MDF file is gone. Probably because of some disk failure. There is no backup. Not from the original database and not from the transaction log.



I have tried to link the transaction log to a new clean database. But (ofcourse) that failed because SQL Server checks the identity of both files.
I have read about software that can read the transaction log. ApexSQL seems to do that. I tried to install the trial version but it gives weird errors when trying to start the program.



Anyone knows a solution for me? It may contain third party software, but i prefer a clean SQL Server solution.







sql-server sql-server-2000






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 28 '12 at 8:27









MartinMartin

1113




1113













  • i'm curious as to how you came to have an ldf file without an mdf file. As far as i am aware, you are pretty well out of luck. If you have solved this, let us know how!

    – DForck42
    Jan 16 '13 at 22:22



















  • i'm curious as to how you came to have an ldf file without an mdf file. As far as i am aware, you are pretty well out of luck. If you have solved this, let us know how!

    – DForck42
    Jan 16 '13 at 22:22

















i'm curious as to how you came to have an ldf file without an mdf file. As far as i am aware, you are pretty well out of luck. If you have solved this, let us know how!

– DForck42
Jan 16 '13 at 22:22





i'm curious as to how you came to have an ldf file without an mdf file. As far as i am aware, you are pretty well out of luck. If you have solved this, let us know how!

– DForck42
Jan 16 '13 at 22:22










2 Answers
2






active

oldest

votes


















0














So how did the MDF go away? Did the data drive get corrupted or fail?



Outside of using a third-party tool, you don't have many options.



About the only thing I can think of doing is attaching the LDF to a dummy database and then taking a tail of the log backup. But even then, it doesn't buy you anything.



Here's the basic process:



create database MyDatabase
go

-- run a full backup, this can be disgarded

alter database MyDatabase
set offline
go

-- go delete the mdf and ldf

alter database MyDatabase
set online
go

backup log MyDatabase
to disk = 'C:SQL BackupsMyDatabase-tail.trn'
with no_truncate
go


Now you have a LOG backup of your LDF file, but I'm not sure what you can do with it from there.



Maybe search for a product that lets you read a backup file...



Good luck!






share|improve this answer































    0














    It is not possible. The ldf has changes, with specific transaction numbers.



    Even if you create a brand new database, EXACTLY the same as the original, the transaction numbers in the new database are not going to be related to the transaction numbers of the ldf file.



    It is possible to restore with only an mdf file Related StackOverflow post



    Create database dbname 
    On
    (
    Filename= 'path where you copied files'
    )
    For attach;


    There are some tools and consulting firms that claim they can do it, Possibly they can recover some or even all of your data. But it can not be done, with standard tools and experience.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f511705%2frestore-a-database-with-ldf-file-only%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      So how did the MDF go away? Did the data drive get corrupted or fail?



      Outside of using a third-party tool, you don't have many options.



      About the only thing I can think of doing is attaching the LDF to a dummy database and then taking a tail of the log backup. But even then, it doesn't buy you anything.



      Here's the basic process:



      create database MyDatabase
      go

      -- run a full backup, this can be disgarded

      alter database MyDatabase
      set offline
      go

      -- go delete the mdf and ldf

      alter database MyDatabase
      set online
      go

      backup log MyDatabase
      to disk = 'C:SQL BackupsMyDatabase-tail.trn'
      with no_truncate
      go


      Now you have a LOG backup of your LDF file, but I'm not sure what you can do with it from there.



      Maybe search for a product that lets you read a backup file...



      Good luck!






      share|improve this answer




























        0














        So how did the MDF go away? Did the data drive get corrupted or fail?



        Outside of using a third-party tool, you don't have many options.



        About the only thing I can think of doing is attaching the LDF to a dummy database and then taking a tail of the log backup. But even then, it doesn't buy you anything.



        Here's the basic process:



        create database MyDatabase
        go

        -- run a full backup, this can be disgarded

        alter database MyDatabase
        set offline
        go

        -- go delete the mdf and ldf

        alter database MyDatabase
        set online
        go

        backup log MyDatabase
        to disk = 'C:SQL BackupsMyDatabase-tail.trn'
        with no_truncate
        go


        Now you have a LOG backup of your LDF file, but I'm not sure what you can do with it from there.



        Maybe search for a product that lets you read a backup file...



        Good luck!






        share|improve this answer


























          0












          0








          0







          So how did the MDF go away? Did the data drive get corrupted or fail?



          Outside of using a third-party tool, you don't have many options.



          About the only thing I can think of doing is attaching the LDF to a dummy database and then taking a tail of the log backup. But even then, it doesn't buy you anything.



          Here's the basic process:



          create database MyDatabase
          go

          -- run a full backup, this can be disgarded

          alter database MyDatabase
          set offline
          go

          -- go delete the mdf and ldf

          alter database MyDatabase
          set online
          go

          backup log MyDatabase
          to disk = 'C:SQL BackupsMyDatabase-tail.trn'
          with no_truncate
          go


          Now you have a LOG backup of your LDF file, but I'm not sure what you can do with it from there.



          Maybe search for a product that lets you read a backup file...



          Good luck!






          share|improve this answer













          So how did the MDF go away? Did the data drive get corrupted or fail?



          Outside of using a third-party tool, you don't have many options.



          About the only thing I can think of doing is attaching the LDF to a dummy database and then taking a tail of the log backup. But even then, it doesn't buy you anything.



          Here's the basic process:



          create database MyDatabase
          go

          -- run a full backup, this can be disgarded

          alter database MyDatabase
          set offline
          go

          -- go delete the mdf and ldf

          alter database MyDatabase
          set online
          go

          backup log MyDatabase
          to disk = 'C:SQL BackupsMyDatabase-tail.trn'
          with no_truncate
          go


          Now you have a LOG backup of your LDF file, but I'm not sure what you can do with it from there.



          Maybe search for a product that lets you read a backup file...



          Good luck!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 28 '12 at 21:40









          StevenSteven

          1662




          1662

























              0














              It is not possible. The ldf has changes, with specific transaction numbers.



              Even if you create a brand new database, EXACTLY the same as the original, the transaction numbers in the new database are not going to be related to the transaction numbers of the ldf file.



              It is possible to restore with only an mdf file Related StackOverflow post



              Create database dbname 
              On
              (
              Filename= 'path where you copied files'
              )
              For attach;


              There are some tools and consulting firms that claim they can do it, Possibly they can recover some or even all of your data. But it can not be done, with standard tools and experience.






              share|improve this answer




























                0














                It is not possible. The ldf has changes, with specific transaction numbers.



                Even if you create a brand new database, EXACTLY the same as the original, the transaction numbers in the new database are not going to be related to the transaction numbers of the ldf file.



                It is possible to restore with only an mdf file Related StackOverflow post



                Create database dbname 
                On
                (
                Filename= 'path where you copied files'
                )
                For attach;


                There are some tools and consulting firms that claim they can do it, Possibly they can recover some or even all of your data. But it can not be done, with standard tools and experience.






                share|improve this answer


























                  0












                  0








                  0







                  It is not possible. The ldf has changes, with specific transaction numbers.



                  Even if you create a brand new database, EXACTLY the same as the original, the transaction numbers in the new database are not going to be related to the transaction numbers of the ldf file.



                  It is possible to restore with only an mdf file Related StackOverflow post



                  Create database dbname 
                  On
                  (
                  Filename= 'path where you copied files'
                  )
                  For attach;


                  There are some tools and consulting firms that claim they can do it, Possibly they can recover some or even all of your data. But it can not be done, with standard tools and experience.






                  share|improve this answer













                  It is not possible. The ldf has changes, with specific transaction numbers.



                  Even if you create a brand new database, EXACTLY the same as the original, the transaction numbers in the new database are not going to be related to the transaction numbers of the ldf file.



                  It is possible to restore with only an mdf file Related StackOverflow post



                  Create database dbname 
                  On
                  (
                  Filename= 'path where you copied files'
                  )
                  For attach;


                  There are some tools and consulting firms that claim they can do it, Possibly they can recover some or even all of your data. But it can not be done, with standard tools and experience.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 16 at 18:27









                  James JenkinsJames Jenkins

                  3831723




                  3831723






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f511705%2frestore-a-database-with-ldf-file-only%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Сан-Квентин

                      8-я гвардейская общевойсковая армия

                      Алькесар