Restore database - table not restored

  • I tried to restore the Test database from production. This is the script I used. Somehow there is always a table that did not get restored. I am puzzled about that.

    RESTORE DATABASE [TEST] FROM DISK = N'C:\sqlbackup\Prod_backup_200909250430.bak' WITH FILE = 1, NOUNLOAD, STATS = 10

  • The backup is a full backup and the recovery mode of the test database is simple.

  • Have you query sys.objects to check if the table was created after the backup you are trying to restore from?

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

  • Maybe the table didnt exist at the time that the backup was taken.

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • This table exists in both test and production.

    What puzzled me is it happened to this one table only.

  • It's not a permissions issue is it? in that the table cannot be seen because the user hasn't got permission to view it?

    Facts are stubborn things, but statistics are more pliable - Mark Twain
    Carolyn
    SQLServerSpecialists[/url]

  • Loner (9/30/2009)


    This table exists in both test and production.

    If table was not restored, from where test version of the table comes from?

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • The data in that table remains the same. That meant the data in the production table did not come over to test. All tables have the same permission.

  • You have missed something. The backup contains all tables and I have never seen or heard of a table being missing. If it happens consistently, you are missing something with permissions, schema, or something else.

    If you restore the backup to production, new db name, is it there?

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply