Restore Database 2008 to 2005

I have Database  .mdf and .ldf file for the version of 2008. but I have need to attach 2005 format. but I can not do this
anyone please help.

Hello,
It is not possible to restore/attach a SQL Server database to a previous Version (2008 to 2005). You have to install the same Version or you have to script out all database objects + data.
Olaf Helper
[ Blog] [ Xing] [ MVP]

Similar Messages

  • Restore database in SQL 2005

    Hello All,
    still today it works fine to Copy or Restore a databe.
    beginning today i got a problem.
    if i try to copy a database to another one with the Copy Wizard from SQL
    i got an error: Library not registered.(Copy Database Wizard)
    or
    If i create a new database and want to restore from another database ore Backup file i got an error:
    System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'TestPigmenti_08122010' database. (Microsoft.SqlServer.Smo)
    so i have actually no clou how can i copy live database to a test database??
    Thank you and best regards

    > so i have actually no clou how can i copy live database to a test database??
    You can't copy a "running" database using explorer and copying the files over. The proper way of copying a system can be found in the system copy guides in addition to
    Note 151603 - Copying an SQL Server database
    Markus

  • Problem with restore database in sql server 2008

    hi,,,when i want to restore database from a .bak file i see this error
    TITLE: Microsoft SQL Server Management Studio
    Restore failed for Server 'ALI-PC'.  (Microsoft.SqlServer.SmoExtended)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
    ADDITIONAL INFORMATION:
    System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.4000. That version is incompatible with this server, which is running version 10.00.1600. Either restore the database on a server that supports the backup, or use a
    backup that is compatible with this server. (Microsoft.SqlServer.Smo)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&LinkId=20476
    BUTTONS:
    OK
    i checked overwrite the existing database(WUTH REPLACE) in option,but i cant restore again,,,please help me

    Hi,
    You need to install SQL Server 2008 R2 Service Pack 2
    Download
    http://www.microsoft.com/en-us/download/details.aspx?id=11093, you are currently running the RTM and the backup was from Version 10.50.4000 and your attempting to restore to version 10.00.1600.
    To find your current SQL Version open a New Query and paste the following then execute
    SELECT @@VERSION AS 'SQL Server Version
    Reference:
    http://sqlserverbuilds.blogspot.com/
    http://support.microsoft.com/kb/321185
    http://technet.microsoft.com/en-us/library/ms177512.aspx
    Cheers,
    -Ivan

  • Error restoring SQL 2008 R2 DB into SQL 2012: BACKUP LOG cannot be performed because there is no current database backup.

    I have a SQL 2008 R2 database that I am trying to move to 2012.  Made a full backup of the database in 2008 R2.  Recovery model is Simple, compatibility level is 2008  Went to 2012, created a dummy database, did Tasks--> Restore -->
    Database , located the backup file, selected it, changed the file locations and tried to restore the backup (with overwrite option), got the following error:
    BACKUP LOG cannot be performed because there is no current database backup.
    This is a simple task that has always worked in 2008 R2.  Does anyone know what the problem is and a possible solution?
    Thanks

    Hi,
    This error occurs when the database recovery model has been changed to Simple and/or the recovery model has been changed back to Full but a full backup has not been performed since the change.
      If a full backup has been performed, the following conditions will require that another full backup be taken:
     · The recovery model had been changed without taking a full backup
     · A SQL maintenance plan task had changed the recovery model (reindexing can cause this)
     · A backup specifying TRUNCATE_ONLY had been run on the database
     · The database was detached from another server and attached to the current server
    Additionally, if we take full database backup after the Database is set to readonly, Then transaction log backup we will end up with this error. This is expected behavior. I have list an example within the link below.
    Please check above conditions and fix your issue, if you have any concern, please let me know.
    Example:
    BACKUP LOG cannot be performed because there is no current database backup.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b5c36e60-836f-4c9e-b9d7-3fb3f3ee4d37/backup-log-cannot-be-performed-because-there-is-no-current-database-backup
    Thanks
    Candy Zhou

  • Restoring database using C sharp console application(SQl server 2008 R2)

    Hi All,
    I want to take backup and restore database from one server to another through C sharp Console Application.
    My Backup is working fine but restoring is not working and throwing below error:
    An unhandled exception of type 'Microsoft.SqlServer.Management.Smo.FailedOperationException' occurred in Microsoft.SqlServer.SmoExtended.dll
    Database name is fine while restoring.
    Please give me some ideas in resolving this.
    Thanks in advance.
    blrSvsTech

    Hi Olaf,
    I used Replace database option.
    My code is something like this.
      public void Restoredb(string serverName, string useraame, string password)
                ServerConnection conn;
                if (useraame == " ") // for Windows Authentication
                    SqlConnection sqlCon = new SqlConnection(@"Data Source=" + serverName + @";Integrated Security=True;");
                    conn = new ServerConnection(sqlCon);
                else // for Server Authentication
                    conn = new ServerConnection(serverName, useraame, password);
                Server srv = new Server(conn);
                Database database = srv.Databases["db_Miller"];
                string dbPath = Path.Combine(database.PrimaryFilePath, "db_Miller.mdf");
                string logPath = Path.Combine(database.PrimaryFilePath, "db_Miller.ldf");
                Restore restore = new Restore();
                BackupDeviceItem deviceItem = new BackupDeviceItem(path, DeviceType.File);
                restore.Devices.Add(deviceItem);
                restore.Action = RestoreActionType.Database;
                restore.ReplaceDatabase = true;
                restore.NoRecovery = true;
                restore.SqlRestore(srv);  ------------- Getting error in this line.
                database = srv.Databases["db_Miller"];
                database.SetOnline();
                srv.Refresh();
                database.Refresh(); 
    Thanks in advance.
    blrSvsTech
    Hi blrSvsTech,
    You haven’t specified the restore destination database, please try the following codes:
    public void Restoredb(string serverName, string useraame, string password)
    ServerConnection conn;
    if (useraame == " ") // for Windows Authentication
    SqlConnection sqlCon = new SqlConnection(@"Data Source=" + serverName + @";Integrated Security=True;");
    conn = new ServerConnection(sqlCon);
    else // for Server Authentication
    conn = new ServerConnection(serverName, useraame, password);
    Server srv = new Server(conn);
    Database database = srv.Databases["db_Miller"];
    string dbPath = Path.Combine(database.PrimaryFilePath, "db_Miller.mdf");
    string logPath = Path.Combine(database.PrimaryFilePath, "db_Miller.ldf");
    Restore restore = new Restore();
    BackupDeviceItem deviceItem = new BackupDeviceItem(path, DeviceType.File);
    restore.Devices.Add(deviceItem);
    restore.Action = RestoreActionType.Database;
    restore.ReplaceDatabase = true;
    restore.NoRecovery = true;
    restore.database = srv.Databases["db_Miller"];
    restore.SqlRestore(srv); ------------- Getting error in this line.
    database = srv.Databases["db_Miller"];
    database.SetOnline();
    srv.Refresh();
    database.Refresh();
    If the issue occurs again, please post all the error message here for analysis.
    For more detail information, you can refer to he following link:
    Restore.SqlRestore Method
    http://technet.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.restore.sqlrestore.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1
    Best Regards,
    Allen Li
    Allen Li
    TechNet Community Support

  • File name in msdb.dbo.backupset no longer matches the actual file name on the storage media. Error 3013 Restore Database is terminating abnormally.

    Thanks in advance for taking the time to read this and comment. Platform: Windows Server 2008 R2 Enterprise Edition SP1 (X64) Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Jun 17 2011 00:54:03 Copyright (c) Microsoft Corporation
     Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)Problem Description: The file name recorded in the msdb.dbo.backupset (sans the extension) no longer matches the actual file name written to the backup media which is
    in this case a NETAPP NAS storage share. Example:
    Mohave_backup_2014_03_14_233001_1158878.bak      (from NETAPP NAS filer)
    Mohave_backup_2014_03_16_233001_4167237             (from MSDB.dbo.backupset), as you can see, the last 7 digits (chars) of the file name are different, although the date and time are identical. The
    file names had previously been matching perfectly. The first occurance of this problem occured on 03/13/2014 at 5:00 AM MST. The error generated by the job was:
    Date  3/14/2014 10:29:23 AM
    Log  Job History (Refresh - Restore Mohave_93_DEV AD HOC)
    Step ID  1
    Server  OurDevServer
    Job Name  Refresh - Restore Mohave_93_DEV AD HOC
    Step Name  Restore Mohave_93_DEV
    Duration  00:00:01
    Sql Severity  0
    Sql Message ID  50000
    Operator Emailed  
    Operator Net sent  
    Operator Paged  
    Retries Attempted  0
    Message
    Executed as user: OurDomain\OurNetworkServiceLogin. Restore Mohave Prod to Mohave_93_DEV - ERROR: 3013 RESTORE DATABASE is terminating abnormally. [SQLSTATE 01000] (Message 50000).  The step succeeded.

    Olaf:
    Thanks for your reply. Sorry, my bad. I inadvertently copied wrong [name] form the msdb.dbo.backupset. On 3/13 and 3/14, the two file names did not match. In trying to select another example to show you this morning, I found that the names are now matching!
    What I was doing was to create dynamic t-sql to retrieve the latest prod backup of the database, and then restore it with move to the development server. This is an ad-hoc job that the developers can run by themselves whenever they require a refresh. Unfortunately,
    we only keep 3 days worth of backups for these databases, so the original disk file I was trying to use to restore no longer exists. Researching the original error, one of the error descriptions was that the restore could not find the file requested.
    I thought this very strange since I get the file name directly from the backupset table. Further research did indeed show that the file names were different, but unfortunately, I failed to save the details of the file names. Anyway, in looking for a new example
    to show you this morning, I have found that the file names are indeed matching exactly again. If this error pops up again, I will be sure to save all details and re-post.
    Thanks, regards and best wishes to you and yours, 

  • Restore database failed on Oracle 10g 10.2.0.1 linux 32 bit

    Hi,
    I am working on test database for testing database disaster recovery.
    1) i made full database backup by RMAN and ui also have archive log
    2) i noted DBID and all folders of database
    3)Turn on the Controlfile auto backup
    4) then i drop database
    5) then i follow all the steps , which include restoration of spfile and controlfile
    6)After that when i have mounted database and in RMAN WRITING RESTORE DATABASE, it is giving following error.
    Starting restore at 02-APR-08
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 04/02/2008 17:54:56
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    Please help me
    Regards,

    1) i made full database backup by RMAN and ui also
    have archive logWhat's the command used?
    2) i noted DBID and all folders of databaseWhat's inside the folders.
    ls -l <your folder>
    3)Turn on the Controlfile auto backup
    4) then i drop databaseHow did you drop it? delete files from OS? or DROP DATABASE statement?
    5) then i follow all the steps , which include
    restoration of spfile and controlfileWhat's the steps you followed? And from where you got the steps.
    6)After that when i have mounted database and in RMAN
    WRITING RESTORE DATABASE, it is giving following
    error.
    Starting restore at 02-APR-08
    using channel ORA_DISK_1
    RMAN-06026: some targets not found - aborting
    restore
    RMAN-06023: no backup or copy of datafile 4 found to
    restore
    RMAN-06023: no backup or copy of datafile 3 found to
    restore
    RMAN-06023: no backup or copy of datafile 1 found to
    restoreOracle Error :: RMAN-06026
    some targets not found - aborting restore
    Cause
    Some of the files specified for restore could not be found. Message 6023, 6024, or 6025 is also issued to indicate which files could not be found. Some common reasons why a file can not be restored are that there is no backup or copy of the file that is known to recovery manager, or there are no backups or copies that fall within the criteria specified on the RESTORE command, or some datafile copies have been made but not cataloged.
    Action
    The Recovery Manager LIST command can be used to display the backups and copies that Recovery Manager knows about. Select the files to be restored from that list.

  • Error during Restore Database

    Hello everyone!
    First of all, i'm sorry for posting another restore problem, but i read all threads related and i still have my problem.
    I have a fresh new install of oracleXE, but when i try to restore de database from a backup store in other disk install in the same computer, using the restore database option include with the application, the program show me these steps:
    STEP 1:
    This operation will shut down and restore the database. Are you sure [Y/N]?
    I write 'Y'.
    STEP 2:
    This operation will shut down and restore the database. Are you sure [Y/N]?y
    Restore in progress...
    El servicio solicitado ya ha sido iniciado.
    Puede obtener más ayuda con el comando NET HELPMSG 2182.
    Recovery Manager : Release 10.2.0.1.0 - Production on Vie Ago 31 10:20:45 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    conectado a la base de datos destino: XE (DBID=2513092923)
    RMAN> set echo on;
    2> startup nomount pfile=C:\DOCUME~1\imgltda\CONFIG~1\Temp\rman_dummy.ora force;
    3>
    echo activado
    instancia Oracle iniciada
    Total del ┴rea Global del Sistema 285212672 bytes
    Fixed Size 1287016 bytes
    Variable Size 92277912 bytes
    Database Buffers 188743680 bytes
    Redo Buffers 2904064 bytes
    Recovery Manager terminado.
    Enter the flash recovery area location:
    I write this in my flash recovery area, where i have the backup files: D:\Respaldo.
    In this path i have de following folders: D:\Respaldo\XE; Inside this folder i have other folders: ARCHIVELOG, AUTOBACKUP, BACKUPSET, ONLINELOG.
    STEP 3 This is my problem:
    MAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: fallo del comando startup en 08/31/2007 10:24:10
    RMAN-04014: fallo al iniciar: ORA-01261: Parameter db_recovery_file_dest destina
    tion string cannot be translated
    ORA-01263: Name given for file destination directory is invalid
    OSD-04018: No se ha podido acceder al directorio o dispositivo especificado.
    O/S-Error: (OS 21) El dispositivo no est┐ listo.
    Recovery Manager terminado.
    ==================== ERROR =============================
    Restore of the database failed.
    RMAN Error - See log for error .
    Log file is at C:\ORACLEXE\APP\ORACLE\PRODUCT\10.2.0\SERVER\DATABASE\OX
    E_RESTORE.LOG.
    ==================== ERROR =============================
    Presione una tecla para continuar . . .
    The OXE_RESTORE file show me this:
    Recovery Manager : Release 10.2.0.1.0 - Production on Vie Ago 31 10:23:58 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Windows XP Version V5.1 Service Pack 2
    CPU : 2 - type 586
    Process Affinity : 0x00000000
    Memory (Avail/Total): Ph:1652M/2021M, Ph+PgF:3435M/3914M, VA:2003M/2047M
    Starting with debugging turned off
    conectado a la base de datos destino: xe (no montada)
    RMAN> set echo on;
    2> restore (spfile from autobackup db_recovery_file_dest='D:\Respaldo');
    3> startup nomount force;
    4> restore (controlfile from autobackup);
    5> alter database mount;
    6> configure controlfile autobackup off;
    7> restore database;
    8>
    echo activado
    Iniciando restore en 31/08/07
    se utiliza el archivo de control de la base de datos destino en lugar del catálogo de recuperación
    canal asignado: ORA_DISK_1
    canal ORA_DISK_1: sid=37 devtype=DISK
    destino del área de recuperación: D:\Respaldo
    nombre de base de datos (o nombre único de base de datos) utilizado para la búsqueda: XE
    canal ORA_DISK_1: se ha encontrado una copia de seguridad automática en el área de recuperación
    canal ORA_DISK_1: se ha encontrado la copia de seguridad automática: D:\RESPALDO\XE\AUTOBACKUP\2007_08_27\O1_MF_S_631711029_3F5TQOVT_.BKP
    canal ORA_DISK_1: restauración de SPFILE a partir de la copia de seguridad automática terminada
    restore terminado en 31/08/07
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: fallo del comando startup en 08/31/2007 10:24:10
    RMAN-04014: fallo al iniciar: ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
    ORA-01263: Name given for file destination directory is invalid
    OSD-04018: No se ha podido acceder al directorio o dispositivo especificado.
    O/S-Error: (OS 21) El dispositivo no est¿ listo.
    Recovery Manager terminado.
    I really do not know what is my problem and how to solve it. I hope you guys can help me. I'm under a big pressure to solve this soon.
    My Operating System is: WinXP Pro
    I'm using APEX 2.01
    When I create the backup I use ARCHIVELOG enable
    Things i try:
    1. Install fresh oracle XE database, and restore
    2. Install fresh oracle XE database, enable archivelog and restore
    3. Install fresh oracle XE database, enable archivelog, change path of DB_RECOVERY_FILE_DEST to 'D:\Respaldo'.
    4. Install fresh oracle XE database, enable archivelog, change path of DB_RECOVERY_FILE_DEST to 'D:\Respaldo', and execute: @?/sqlplus/admin/movelogs;
    5. Install fresh oracle XE database, enable archivelog, change path of DB_RECOVERY_FILE_DEST to 'D:\Respaldo';, and change DB_RECOVERY_FILE_DEST_SIZE to 20G;
    NOTE: sorry for my english it is not my native language. and sorry for using a spanish version of the database.
    Message was edited by:
    Minning

    Well,
    After a lot of reading, i try this using rman:
    SQL
    1. SQL> connect xx/xx as sysdba
    2. SQL> shutdown immediate
    RMAN
    1. RMAN> connect target XE
    2. RMAN> startup nomount;
    3. RMAN> restore spfile to 'C:\xe.ora' from 'D:\Respaldo\XE\AUTOBACKUP\2007_08_27\O
    1_MF_S_631711029_3F5TQOVT_.BKP';
    4. RMAN> alter database mount;
    5. RMAN> restore database;
    in point n°5 i have the following problem:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: fallo del comando restore en 09/06/2007 16:27:09
    RMAN-06026: no se han encontrado algunos destinos - abortando la restauraci¾n
    RMAN-06023: no se ha encontrado ninguna copia de seguridad o copia del archivo d
    e datos 4 para restaurar
    RMAN-06023: no se ha encontrado ninguna copia de seguridad o copia del archivo d
    e datos 3 para restaurar
    RMAN-06023: no se ha encontrado ninguna copia de seguridad o copia del archivo d
    e datos 2 para restaurar
    RMAN-06023: no se ha encontrado ninguna copia de seguridad o copia del archivo d
    e datos 1 para restaurar
    I try this command to find what's going on:
    RMAN> list backup;
    with this result:
    Lista de Juegos de Copias de Seguridad
    ===================
    Clave BS Tipo LV Tama±o Tipo de Dispositivo Tiempo Transcurrido Hora de F
    inalizaci¾n
    15 Full 736.04M DISK 00:00:19 24/08/07
    Clave BP: 15 Estado: EXPIRED Comprimido: NO Etiqueta: TAG20070824T12
    4938
    Nombre de Parte: E:\RESPALDO\XE\BACKUPSET\2007_08_24\O1_MF_NNNDF_TAG2007
    0824T124938_3DY3143F_.BKP
    Lista de Archivos de Datos en el juego de copias de seguridad 15
    Tipo de Archivo LV SCN Pto. Ctrl. Hora de Punto de Control Nombre
    1 Full 2747434 24/08/07 C:\ORACLEXE\ORADATA\XE\SYSTEM
    .DBF
    2 Full 2747434 24/08/07 C:\ORACLEXE\ORADATA\XE\UNDO.D
    BF
    3 Full 2747434 24/08/07 C:\ORACLEXE\ORADATA\XE\SYSAUX
    .DBF
    4 Full 2747434 24/08/07 C:\ORACLEXE\ORADATA\XE\USERS.
    DBF
    Clave BS Tipo LV Tama±o Tipo de Dispositivo Tiempo Transcurrido Hora de F
    inalizaci¾n
    16 Full 6.83M DISK 00:00:01 24/08/07
    Clave BP: 16 Estado: EXPIRED Comprimido: NO Etiqueta: TAG20070824T12
    5005
    Nombre de Parte: E:\RESPALDO\XE\AUTOBACKUP\2007_08_24\O1_MF_S_631457405_
    3DY31Y0H_.BKP
    Archivo de Control Incluido: SCN de Punto de Control: 2747446 Hora de Pun
    to de Control: 24/08/07
    SPFILE Incluido: Hora de Modificaci¾n: 24/08/07
    Clave BS Tipo LV Tama±o Tipo de Dispositivo Tiempo Transcurrido Hora de F
    inalizaci¾n
    17 Full 736.04M DISK 00:00:20 24/08/07
    Clave BP: 17 Estado: EXPIRED Comprimido: NO Etiqueta: TAG20070824T17
    0028
    Nombre de Parte: E:\RESPALDO\XE\BACKUPSET\2007_08_24\O1_MF_NNNDF_TAG2007
    0824T170028_3DYKQGTC_.BKP
    Lista de Archivos de Datos en el juego de copias de seguridad 17
    Tipo de Archivo LV SCN Pto. Ctrl. Hora de Punto de Control Nombre
    1 Full 2773728 24/08/07 C:\ORACLEXE\ORADATA\XE\SYSTEM
    .DBF
    2 Full 2773728 24/08/07 C:\ORACLEXE\ORADATA\XE\UNDO.D
    BF
    3 Full 2773728 24/08/07 C:\ORACLEXE\ORADATA\XE\SYSAUX
    .DBF
    4 Full 2773728 24/08/07 C:\ORACLEXE\ORADATA\XE\USERS.
    DBF
    Clave BS Tipo LV Tama±o Tipo de Dispositivo Tiempo Transcurrido Hora de F
    inalizaci¾n
    18 Full 6.83M DISK 00:00:02 24/08/07
    Clave BP: 18 Estado: EXPIRED Comprimido: NO Etiqueta: TAG20070824T17
    0054
    Nombre de Parte: E:\RESPALDO\XE\AUTOBACKUP\2007_08_24\O1_MF_S_631472454_
    3DYKR7OZ_.BKP
    Archivo de Control Incluido: SCN de Punto de Control: 2773741 Hora de Pun
    to de Control: 24/08/07
    SPFILE Incluido: Hora de Modificaci¾n: 24/08/07
    Clave BS Tipo LV Tama±o Tipo de Dispositivo Tiempo Transcurrido Hora de F
    inalizaci¾n
    19 Full 740.95M DISK 00:00:20 27/08/07
    Clave BP: 19 Estado: EXPIRED Comprimido: NO Etiqueta: TAG20070827T11
    1642
    Nombre de Parte: E:\RESPALDO\XE\BACKUPSET\2007_08_27\O1_MF_NNNDF_TAG2007
    0827T111642_3F5TPWHN_.BKP
    Lista de Archivos de Datos en el juego de copias de seguridad 19
    Tipo de Archivo LV SCN Pto. Ctrl. Hora de Punto de Control Nombre
    1 Full 2916556 27/08/07 C:\ORACLEXE\ORADATA\XE\SYSTEM
    .DBF
    2 Full 2916556 27/08/07 C:\ORACLEXE\ORADATA\XE\UNDO.D
    BF
    3 Full 2916556 27/08/07 C:\ORACLEXE\ORADATA\XE\SYSAUX
    .DBF
    4 Full 2916556 27/08/07 C:\ORACLEXE\ORADATA\XE\USERS.
    DBF
    Where it says 'Estado' (Status in english) I found this: 'EXPIRED', it seems that my 4 dbf files have some problem, right now i'm looking for a way to solve this, but with no luck.
    I think i need a little help again...

  • Can't Remove Datasets From SQL Server Management Studio Restore Database Dialog

    Hello,
    I am trying to restore a database in MS SQL 2008 R2 Management Studio on a Windows 2008 server.
    - I right click the Databases folder and choose Restore Databases.
    - I select the From device radio button as usual and click Add.
    - I specify a .bck file as usual and click OK.
    - When I return to the Restore Database dialog are two backup sets already in the "Select backup location to restore" part of the dialog that I unsuccessfully tried to restore earlier already there.
    - I can see the path to the backup set that I want to add in the "From device" field of the "Restore Database" dialog. The backup is not listed in "Select backup location to restore" as it should be.
    - I tried restarting the SQL Server service and I rebooted the server but the files were still there when I tried to do a restore.
    - There is no option to remove the extra datasets in the "Select backup location to restore" part of the dialog. I am hoping that if I can remove the extra datasets that this will resolve the problem. Does anyone have any idea how to remove them?
    Martin Mann

    Hello,
    My issue was a bit different then your screenshot. I was able to choose a backup dataset with no problem from the "Select backup devices" dialog as you show in the screenshot. At that time the "Restore Database" dialog box you show in the background had
    no backup files, you show filetest1, filetest2. However after clicking the "Add" to files were listed in the "Restore Database" dialog neither of which was the one that I was trying to add. The problem was that the wrong files were listed in the "Restore Database"
    dialog and I couldn't remove them.
    The problem turned out to be two issues. I resolved the problem as follows:
    It turned out that someone had compressed my server c:\ drive and I was not aware of it. Disk compression and SQL server have conflicts. As I had never compressed a drive I didn't know that Windows Explorer displays compressed files in blue letters. So the
    first step was to decompress the drive. Which did not fix the problem.
    What had caused the files to show up was that I had somehow created a backup with two data sets in it. It seems that when SQL Server creates a backup one of the first things it does is check the drive for the required space and create an empty backup file
    the size of the backup to reserve the disk space. It seems that I had created a file that contained space for a backup but no data with another back with data behind it. When I looked at the backup file size in explorer it was almost twice the size it should
    have been.
    I resolved the problem by changing the path of the default backup folder. I was able to do a restore from there. Afterwords the default backup folder worked and the files listed were no longer there.
    Sorry for the confusion and thanks for the help.
    Martin Mann

  • I need explanation about RESTORE DATABASE PREVIEW SUMMARY;

    After executing the command:
    RMAN> RESTORE DATABASE PREVIEW SUMMARY;
    It finished with the following lines:
    Media recovery start SCN is 1487308
    Recovery must be done beyond SCN 1726503 to clear data files fuzziness
    Finished restore at 2008-04-30:17:13:59
    What does it mean "recovery start SCN is 1487308" and "Recovery must be done beyond SCN 1726503..." ?
    I would like to restore/recover untill a SCN... but I don't understand if it means I must set a SCN between 1487308 and 1726503, or 1726503 is simply a starting SCN ...
    Below there's my list of backup by file with SCN:
    RMAN> list backup by file;
    List of Datafile Backups
    ========================
    File Key TY LV S Ckp SCN Ckp Time #Pieces #Copies Compressed Tag
    1 121266 B F A 1726482 2008-04-18:17:10:06 1 1 YES TAG20080418T170953
    2 121262 B F A 1726496 2008-04-18:17:10:23 1 1 YES TAG20080418T170953
    3 121261 B F A 1487308 2008-04-15:12:59:31 1 1 YES TAG20080418T170953
    4 121265 B F A 1726503 2008-04-18:17:10:27 1 1 YES TAG20080418T170953
    5 121263 B F A 1726499 2008-04-18:17:10:24 1 1 YES TAG20080418T170953
    6 121241 B F A 1726455 2008-04-18:17:09:53 1 1 YES TAG20080418T170953
    7 121242 B F A 1726456 2008-04-18:17:09:53 1 1 YES TAG20080418T170953
    8 121243 B F A 1726458 2008-04-18:17:09:54 1 1 YES TAG20080418T170953
    9 121244 B F A 1726459 2008-04-18:17:09:54 1 1 YES TAG20080418T170953
    10 121245 B F A 1726460 2008-04-18:17:09:55 1 1 YES TAG20080418T170953
    11 121246 B F A 1726461 2008-04-18:17:09:55 1 1 YES TAG20080418T170953
    12 121248 B F A 1726463 2008-04-18:17:09:57 1 1 YES TAG20080418T170953
    13 121247 B F A 1726464 2008-04-18:17:09:57 1 1 YES TAG20080418T170953
    14 121249 B F A 1726466 2008-04-18:17:09:58 1 1 YES TAG20080418T170953
    15 121250 B F A 1726467 2008-04-18:17:09:58 1 1 YES TAG20080418T170953
    16 121251 B F A 1726469 2008-04-18:17:09:59 1 1 YES TAG20080418T170953
    17 121252 B F A 1726470 2008-04-18:17:09:59 1 1 YES TAG20080418T170953
    18 121253 B F A 1726471 2008-04-18:17:10:00 1 1 YES TAG20080418T170953
    19 121254 B F A 1726472 2008-04-18:17:10:00 1 1 YES TAG20080418T170953
    20 121255 B F A 1726473 2008-04-18:17:10:02 1 1 YES TAG20080418T170953
    21 121256 B F A 1726474 2008-04-18:17:10:02 1 1 YES TAG20080418T170953
    22 121258 B F A 1726476 2008-04-18:17:10:03 1 1 YES TAG20080418T170953
    23 121257 B F A 1726477 2008-04-18:17:10:03 1 1 YES TAG20080418T170953
    24 121259 B F A 1726478 2008-04-18:17:10:04 1 1 YES TAG20080418T170953
    25 121260 B F A 1726480 2008-04-18:17:10:05 1 1 YES TAG20080418T170953
    List of Archived Log Backups
    ============================
    Thrd Seq Low SCN Low Time BS Key S #Pieces #Copies Compressed Tag
    1 10 1487308 2008-04-15:12:59:31 121240 A 1 1 YES TAG20080418T170947
    1 11 1726433 2008-04-18:17:06:08 121333 A 1 1 YES TAG20080418T171040
    2 26 1591040 2008-04-15:23:15:47 121239 A 1 1 YES TAG20080418T170947
    2 27 1726430 2008-04-18:17:09:42 121332 A 1 1 YES TAG20080418T171040
    List of Control File Backups
    ============================
    CF Ckp SCN Ckp Time BS Key S #Pieces #Copies Compressed Tag
    1726501 2008-04-18:17:10:24 121264 A 1 1 YES TAG20080418T170953
    List of SPFILE Backups
    ======================
    Modification Time BS Key S #Pieces #Copies Compressed Tag
    2008-04-16:13:04:18 121267 A 1 1 YES TAG20080418T170953

    Yes, you're right. It's just what I wanted to know.
    Does it also mean 1726504 is the nearest scn compared with the time I finished to complete that online backup ???
    I mean... what should I do to restore just that backup without applying current available archived log and online redo log ???

  • Restore database

    Hi,
    I try learn how restore database.
    Case:
    Database is in archivelog mode and hot backup runs every night at 2:00am by cron job and backup.sh
    I drop table using
    drop table mytbl purge;So I can not get it from recyclebin.
    Or I do some other mistake and I like restore whole database to state where it was in certain time
    I have try read all kind documents and experiment how to do this without luck.
    If someone could give me steps to do restore
    Thanks advance
    Br,Jari

    Here is a full scenario with RMAN.
    First backup database with RMAN:
    C:\oraclexe\oradata\XE>rman target /
    Recovery Manager: Release 10.2.0.1.0 - Production on Thu May 13 20:26:46 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    connected to target database: XE (DBID=2584040801)
    RMAN> backup database plus archivelog;
    Starting backup at 13-MAY-10
    current log archived
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=38 devtype=DISK
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=166 recid=165 stamp=718921614
    channel ORA_DISK_1: starting piece 1 at 13-MAY-10
    channel ORA_DISK_1: finished piece 1 at 13-MAY-10
    piece handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2010_05_13\
    O1_MF_ANNNN_TAG20100513T202656_5YRK3KKF_.BKP tag=TAG20100513T202656 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
    Finished backup at 13-MAY-10
    Starting backup at 13-MAY-10
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00001 name=C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
    input datafile fno=00003 name=C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF
    input datafile fno=00002 name=C:\ORACLEXE\ORADATA\XE\UNDO.DBF
    input datafile fno=00004 name=C:\ORACLEXE\ORADATA\XE\USERS.DBF
    input datafile fno=00005 name=C:\TMP\DF1
    channel ORA_DISK_1: starting piece 1 at 13-MAY-10
    channel ORA_DISK_1: finished piece 1 at 13-MAY-10
    piece handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2010_05_13\
    O1_MF_NNNDF_TAG20100513T202658_5YRK3LWO_.BKP tag=TAG20100513T202658 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    including current control file in backupset
    including current SPFILE in backupset
    channel ORA_DISK_1: starting piece 1 at 13-MAY-10
    channel ORA_DISK_1: finished piece 1 at 13-MAY-10
    piece handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2010_05_13\
    O1_MF_NCSNF_TAG20100513T202658_5YRK4FH7_.BKP tag=TAG20100513T202658 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
    Finished backup at 13-MAY-10
    Starting backup at 13-MAY-10
    current log archived
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=167 recid=166 stamp=718921646
    channel ORA_DISK_1: starting piece 1 at 13-MAY-10
    channel ORA_DISK_1: finished piece 1 at 13-MAY-10
    piece handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2010_05_13\
    O1_MF_ANNNN_TAG20100513T202726_5YRK4HRM_.BKP tag=TAG20100513T202726 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
    Finished backup at 13-MAY-10
    RMAN> exit
    Recovery Manager complete.Drop the table:
    C:\oraclexe\oradata\XE>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 13 20:27:34 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL>  select to_char(sysdate,'YYYY-MM-DD:HH24:MI:SS') time_now from dual;
    TIME_NOW
    2010-05-13:20:27:38
    SQL> select count(*) from test.t;
      COUNT(*)
             1
    SQL>  select to_char(sysdate,'YYYY-MM-DD:HH24:MI:SS') time_now from dual;
    TIME_NOW
    2010-05-13:20:27:56
    SQL> drop table test.t purge;
    Table dropped.
    SQL>  select to_char(sysdate,'YYYY-MM-DD:HH24:MI:SS') time_now from dual;
    TIME_NOW
    2010-05-13:20:28:10Stop database instance, restart database in MOUNT mode (this is the missing step in your last message)
    and restore database (RMAN will use last backup by default):
    SQL> shutdown abort
    ORACLE instance shut down.
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Produ
    ction
    C:\oraclexe\oradata\XE>rman target /
    Recovery Manager: Release 10.2.0.1.0 - Production on Thu May 13 20:28:34 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    connected to target database (not started)
    RMAN> startup mount;
    Oracle instance started
    database mounted
    Total System Global Area     805306368 bytes
    Fixed Size                     1289996 bytes
    Variable Size                213909748 bytes
    Database Buffers             587202560 bytes
    Redo Buffers                   2904064 bytes
    RMAN> restore database;
    Starting restore at 13-MAY-10
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=35 devtype=DISK
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
    restoring datafile 00002 to C:\ORACLEXE\ORADATA\XE\UNDO.DBF
    restoring datafile 00003 to C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF
    restoring datafile 00004 to C:\ORACLEXE\ORADATA\XE\USERS.DBF
    restoring datafile 00005 to C:\TMP\DF1
    channel ORA_DISK_1: reading from backup piece C:\ORACLEXE\APP\ORACLE\FLASH_RECOV
    ERY_AREA\XE\BACKUPSET\2010_05_13\O1_MF_NNNDF_TAG20100513T202658_5YRK3LWO_.BKP
    channel ORA_DISK_1: restored backup piece 1
    piece handle=C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\BACKUPSET\2010_05_13\
    O1_MF_NNNDF_TAG20100513T202658_5YRK3LWO_.BKP tag=TAG20100513T202658
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:36
    Finished restore at 13-MAY-10Recover database to a point in time before DROP TABLE
    RMAN> recover database until time "to_date('2010-05-13:20:27:00','YYYY-MM-DD:HH2
    4:MI:SS')";
    Starting recover at 13-MAY-10
    using channel ORA_DISK_1
    starting media recovery
    media recovery complete, elapsed time: 00:00:01
    Finished recover at 13-MAY-10Open the database and check that dropped table is back:
    RMAN> alter database open resetlogs;
    database opened
    RMAN> exit
    Recovery Manager complete.
    C:\oraclexe\oradata\XE>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 13 20:34:24 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> select count(*) from test.t;
      COUNT(*)
             1
    SQL>

  • After Piecemeal Primary FileGroup Restoration, Database Property Window Shows other FileGroups also

    Hi,
    I have a SQL Server 2008 database with 90 Gigs of Capacity.
    The database consists of a huge table with 80 Gigs of Capacity and these entire 80 Gigs of data is Static in nature.
    We need the to restore the backup of this database frequently in to the Development environment, so we moved this static data into a Secondary File Group.
    Now, the database Consists of 2 Filegroups : Primary & Secondary_fg.
    The entire Static table is moved to the Secondary FileGroup.
    We have taken the backup of Primary FileGroup using the following Backup Command :
    Backup Database MYDB FILEGROUP = 'PRIMARY' to disk = 'E:\SQLBackup\MYDB_Primary_FG_Only.bak'
    WITH NOFORMAT, NOINIT, NAME = N'MYDB - Full Filegroup backup', SKIP, NOREWIND, NOUNLOAD
    The backup went file with the expected capacity of 10 Gigs.
    I have restored this backup in to a New Database : MYDB_PRIMARY_ONLY using the following command
    RESTORE DATABASE [MYDB_PRIMARY_ONLY] FILE = 'MYDB_DATA', FILEGROUP = 'PRIMARY'
    FROM DISK = 'E:\SQLBackup\MYDB_Primary_FG_Only.bak',
    WITH FILE=1,
    MOVE 'MYDB_DATA' TO 'E:\SQLDATA\MYDB_PRIMARY_ONLY_DATA.mdf',
    MOVE 'MYDB_LOG' TO 'E:\SQLDATA\MYDB_PRIMARY_ONLY_LOG.ldf', NOUNLOAD, PARTIAL
    GO
    The Restoration also went fine and the size of the Newly Restored Database : "MYDB_PRIMARY_ONLY" is with 10 Gigs in Capacity.
    But, the gotcha here is whilst checking the Database Properties of this Newly restored database, on the FILES & FILEGROUPS tab, the files & filegroups related to the SECONDARY FILEGROUP is also showing.
    MY ACTUAL QUESTION :
    On the PRIMARY FILEGROUP ONLY RESTORATION HOW THIS SECONDARY FILEGROUP IS COMING INTO PICTURE ?
    MOREOVER, WHEN I TRIED TO REMOVE THE SECONDARY FILEGROUP AND IT'S RESPECTIVE DATA FILE IT THROUGH THE FOLLOWING ERROR :
    COMMAND USED TO REMOVED THE FILE & FILEGROUP :
    USE [MYDB_PRIMARY_ONLY]
    GO
    ALTER DATABASE [MYDB_PRIMARY_ONLY]  REMOVE FILE [SECONDARY_DATA_FILE.ndf]
    GO
    ALTER DATABASE [MYDB_PRIMARY_ONLY] REMOVE FILEGROUP [SECONDARY_FG]
    GO
    Error :
    Msg 5056, Level 16, State 2, Line 1
    Cannot add, remove, or modify a file in filegroup 'SECONDARY_FG' because the filegroup is not online.
    Can anyone explain why such this error message ? Thanks in advance for any guidance in this regard.

    On the PRIMARY FILEGROUP ONLY RESTORATION HOW THIS SECONDARY FILEGROUP IS COMING INTO PICTURE ?
    When you restore only the primary filegroup, all database meta data is restored, including references to the filegroups and files not yet restored.  Filegroups/files not restored will be recovery pending state and data on those filegroups will be inaccessible. 
    Removing the filegroup will change the status to defunct but the meta data will remain.  You'll need to copy the restored objects and data to a new clean database if you want to tidy up.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • RMAN restore database validate

    All,
    I cannot seem to find anything in the Oracle documentation what the RMAN restore database validate checks for? Does it check for physical and logical corruption or do I need to validate the backup using logical statement to check for this?
    I would appreciate it if somebody could point me in the right direction.
    This is for Oracle 9iR2
    Many thanks

    user647138 wrote:
    Many thanks for all your help. Much appreciated :)Handle:      user647138
    Status Level:      Newbie
    Registered:      Jul 15, 2008
    Total Posts:      10
    Total Questions:      5 (4 unresolved)
    why dont you mark the thread as answered/helpful?
    Many thanks for all your help.  Much appreciated :) is it?
    Posters, please mind these common-sense rules when participating here:
    - When asking a question, provide all the details that someone would need to answer it. Consulting documentation first is highly recommended.
    - When answering a question, please be courteous and respectful; there are different levels of experience represented here. A poorly worded question is better ignored than flamed - or better yet, help the poster ask a better question.
    - It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    - See more tips in the FAQ
    Thanks for doing your part to make this community as valuable as possible for everyone!
    - OTN

  • Restore database that has mirroring enabled

    I apologize, as I'm the default SQL person now and my skill level is pretty much limited to running queries. SQL 2008 R2
    We have a Test database that is mirrored and has severely outdated data. I'd like to copy the data in from a recent back up of our Production environment.
    I understand I need to break mirroring first by going to the database > tasks > mirror > mirroring > hit "remove mirroring" button.
    Then I can do a normal restore, correct? (Databases > Tasks > Restore). On the options page I should select "NORECOVERY".
    Then what? I will need to restore the mirroring. Do I just go to database > tasks > mirror > mirroring and uncheck "remove mirroring"?
    Any pitfalls I should be aware of?

    Hi ,
    According to your description, when you manually stop a database mirroring session via removing database mirroring, To continue mirroring after stopping a session, you must establish a new database mirroring session. For more information, see:http://technet.microsoft.com/en-us/library/ms180801.aspx
    In addition, we need to verify which database you want to do a normal restore. After removing database mirroring, the database in Principal server will become a normal database, you can do a normal restore. The database in Mirroring server will stay in recoverying.
    You  need to restore it with recovery for becoming a normal database.
    Restore database <Mirroring database name> with recovery
    -------------in Mirroring Server.
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Restore Database .ndf files

    I have a backup (.BAK file) which has bunch of .ndf files. I want to restore it on a database which has only .mdf and .ldf files. How to restore it? I am new to Sql server 2008 R2 and never restored .bak file which contains .ndf files...
    Thanks in advance...
    Thank you,

    I don't want to eliminate them. I want to restore them as well but don't know how to. Also the database where I want to restore the .bak only have .mdf and .ldf files.
    The target database is completely overwritten during the restore.  The number and size of the files after the restore will be the same as the original.  You can use the WITH MOVE and REPLACE options to relocate the files and replace the target
    database:
    RESTORE DATABASE TargetDatabase
    FROM DISK='D:\Backups\SourceDatabase.bak'
    WITH
    MOVE 'SourceDatabase' TO 'E:\DataFiles\SourceDatabase.mdf'
    ,MOVE 'SourceDatabase_Data2' TO 'F:\DataFiles\SourceDatabase_Data2.ndf'
    ,MOVE 'SourceDatabase_Data3' TO 'G:\DataFiles\SourceDatabase_Data3.ndf'
    ,MOVE 'SourceDatabase_Log' TO 'L:\DataFiles\SourceDatabase_Log.ldf'
    ,REPLACE;
    ALTER AUTHORIZATION ON DATABASE::TargetDatabase TO sa;
    Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/

Maybe you are looking for