SQL Server Restore

  • Hi,

    I'm facing one problem in restoring a database in sql server 2000. Although restoring a database seems to be simple task but when i try to restore a database it give me following error

    "An internal consistency error occured.Contact Technical support for assistance. Restore Database is terminating abnormally"

    This is the first time I have faced this problem. Please help me to restore the database.

    Thanks,

    Sumit Malik

     

  • Hi sumit,

    Before attempting to restore a backup, Verify the database for integrity DBCC commands & using Restore Command. See SQL server Help for further assistance

    RESTORE VERIFYONLY

    Regards,
    NEO

  • Hi sumit,

    before taking the backup remember to run the command dbcc checkdb dbname.  this is first step assurance that your db is in shape and u can take the backup. in yr case i do not know whether u run this or not. general speaking the backyp and restore seems to be simple. but there are many hidden things that makes it complex.

  • Hi Sumit,

    Try your verify only command as suggested. If the backup is corrupt, we do provide a service to recover the data, if the data is important to you.

    If your backup was to disk, you should check your NT Logs when the backup was taken to see why the backup is corrupt, as SQL Server Files are very reliable and corruption is generally caused by a hardware issue or an ungraceful shutdown.

    Douglas Chrystall

    Imceda Software, Inc

    http://www.imceda.com

     

  • hi,

    I have the script to take SQL databases backup as below but i wish to run it using a batch file and then use the schedule task to schedule the backup.

    I am using the MSDE2000 engine.

    I have tried using the script at the osql prompt and it works.

    Use master

    go

    declare @IDENT INT, @sql varchar(1000), @DBNAME VARCHAR(200)

    select @IDENT=min(DBID) from SYSDATABASES WHERE [DBID] > 0 AND NAME NOT IN ('PUBS', 'NORTHWIND', 'TEMPDB')

    while @IDENT is not null

    begin

           SELECT @DBNAME = NAME FROM SYSDATABASES WHERE DBID = @IDENT

    /*Change disk location here as required*/

           SELECT @sql = 'BACKUP DATABASE '+@DBNAME+' TO DISK = ''d:\backup\jaison\'+@DBNAME+'.BAK''WITH INIT'

    PRINT @sql

           EXEC (@SQL)

           select @IDENT=min(DBID) from SYSDATABASES WHERE [DBID] > 0 and DBID>@IDENT AND NAME NOT IN ('PUBS', 'NORTHWIND', 'TEMPDB')

    end

    Thanx,

    Jaison lucas.

  • How do i check a backup file?

  • RESTORE VERIFYONLY FROM [yourbackupfile]

    Example:

    RESTORE VERIFYONLY FROM e:\backups\pubs.bak

    In Books online you can check further syntax, search for RESTORE VERIFYONLY.

    Regards

    Douglas

    Imceda Software

    http://www.imceda.com

  • HI

     

    Thank for fast response.

     

    When i do

    RESTORE VERIFYONLY FROM f:\cp.bak

     

    It say's

     

    Server: Msg 170, Level 15, State 1, Line 1

    Line 1: Incorrect syntax near 'f:'.

     

     

     

    Where should i run it? from the query analyser, right ?

     

  • encapsulate it in quotes

  • RESTORE VERIFYONLY FROM "f:\cp.bak"

  • Hi again...

     

    Now it's

    Server: Msg 3206, Level 16, State 1, Line 1

    No entry in sysdevices for backup device 'f:\cp.bak'. Update sysdevices and rerun statement.

    Server: Msg 3013, Level 16, State 1, Line 1

    VERIFY DATABASE is terminating abnormally.

     

     

    The backup is NOT from that server...

     

    undestand ?

     

  • is it not posible to check a backup file from a tool or something like that ?

     

  • This exact command should work:

     

    restore verifyonly from disk = 'f:\cp.bak'

  • Thanks, now it works, by bad...

     

    But it say's "TheBackup is valid" but when i try to restore it, it tels me that:

     

    An internal consistency error occured.Contact Technical support for assistance. Restore Database is terminating abnormally"

     

  • What size is the backup?

    Is the data important in the backup file?

     

Viewing 15 posts - 1 through 15 (of 18 total)

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