Restore database check readonly;

We are finding that we are getting empty RO datafiles created with the above command. Support is trying to tell us that the files actually get populated on the recover database command.
Can anyone confirm this? We have 1400+ RO files that are like this.

We got a hold of someone at Oracle support who figured it out for us.
Since we lost the control file and hence our rman info - we had to rebuild the catalog in the control file. We missed some backup pieces and when the restore occurred, RMAN didnt know we had it on tape - so it creates the datafile. We have since removed those empty files, updated the catalog with the piece info and soon will be rerunning the restore command to reprocess those files.
Thanks for taking a look at our issue.

Similar Messages

  • How restore database with duplicate command where backuppiece moved

    hello
    i have 2 hosts
    on the host 1 my production database and on host2 my developlment database
    i would like to duplicate the first one on the host2 i have created an auxiliary database
    all seems ok expect 1 not small problem :
    on host1 my backuppiece are in F:\oracle\backup_%d_%u
    and i don't have a F drive on my host2 i have copy all the rman backup in : e:\oracle\backup
    but i don't find how tell to rman to take my backuppiece in E: and not in F:
    this is my result of my rman script :
    RMAN> run {
    2> set newname for datafile 1 to 'e:\oracle\oradata\dpbsdev2\SYSTEM01.DBF' ;
    3> set newname for datafile 2 to 'e:\oracle\oradata\dpbsdev2\UNDOTBS01.DBF' ;
    4> set newname for datafile 3 to 'e:\oracle\oradata\dpbsdev2\SYSAUX01.DBF' ;
    5> set newname for datafile 4 to 'e:\oracle\oradata\dpbsdev2\USERS01.DBF' ;
    6> set newname for datafile 5 to 'e:\oracle\oradata\dpbsdev2\CIF.ORA' ;
    7> set newname for datafile 6 to 'e:\oracle\oradata\dpbsdev2\DEVELOPMENT.ORA' ;
    8> set newname for datafile 7 to 'e:\oracle\oradata\dpbsdev2\COMPLIANCE.ORA' ;
    9> set newname for datafile 8 to 'e:\oracle\oradata\dpbsdev2\COMPLIANCE_EOM.ORA'
    10> set newname for datafile 9 to 'e:\oracle\oradata\dpbsdev2\CWMLITE.ORA' ;
    11> set newname for datafile 10 to 'e:\oracle\oradata\dpbsdev2\DADIC.ORA' ;
    12> set newname for datafile 12 to 'e:\oracle\oradata\dpbsdev2\DRSYS.ORA' ;
    13> set newname for datafile 13 to 'e:\oracle\oradata\dpbsdev2\DUW_LAN_ENCRYPT.O
    14> set newname for datafile 14 to 'e:\oracle\oradata\dpbsdev2\ERASE.ORA' ;
    15> set newname for datafile 15 to 'e:\oracle\oradata\dpbsdev2\EXPRIM.ORA' ;
    16> set newname for datafile 16 to 'e:\oracle\oradata\dpbsdev2\EXPRIM_EOM.ORA' ;
    17> set newname for datafile 17 to 'e:\oracle\oradata\dpbsdev2\EXPRIM_EOY.ORA' ;
    18> set newname for datafile 18 to 'e:\oracle\oradata\dpbsdev2\IDX_COMMON.ORA' ;
    19> set newname for datafile 19 to 'e:\oracle\oradata\dpbsdev2\IDX_DWH.ORA' ;
    20> set newname for datafile 20 to 'e:\oracle\oradata\dpbsdev2\IDX_EXPRIM.ORA' ;
    21> set newname for datafile 21 to 'e:\oracle\oradata\dpbsdev2\IDX_IMPORT.ORA' ;
    22> set newname for datafile 22 to 'e:\oracle\oradata\dpbsdev2\IDX_SPECIAL.ORA'
    23> set newname for datafile 23 to 'e:\oracle\oradata\dpbsdev2\IDX_WINDEKIS.ORA'
    24> set newname for datafile 24 to 'e:\oracle\oradata\dpbsdev2\IMPORT.ORA' ;
    25> set newname for datafile 25 to 'e:\oracle\oradata\dpbsdev2\IMPORT_EOM.ORA' ;
    26> set newname for datafile 26 to 'e:\oracle\oradata\dpbsdev2\IMPORT_EOY.ORA' ;
    27> set newname for datafile 27 to 'e:\oracle\oradata\dpbsdev2\INDX.ORA' ;
    28> set newname for datafile 28 to 'e:\oracle\oradata\dpbsdev2\ODM.ORA' ;
    29> set newname for datafile 29 to 'e:\oracle\oradata\dpbsdev2\OMS_REPOSITORY.OR
    30> set newname for datafile 31 to 'e:\oracle\oradata\dpbsdev2\OWB_REPOSITORY.OR
    31> set newname for datafile 32 to 'e:\oracle\oradata\dpbsdev2\OWB_REPOSITORY_ID
    32> set newname for datafile 34 to 'e:\oracle\oradata\dpbsdev2\SECURITY.ORA' ;
    33> set newname for datafile 35 to 'e:\oracle\oradata\dpbsdev2\SIMS.ORA' ;
    34> set newname for datafile 36 to 'e:\oracle\oradata\dpbsdev2\TOOLS.ORA' ;
    35> set newname for datafile 37 to 'e:\oracle\oradata\dpbsdev2\TRANSTAT.ORA' ;
    36> set newname for datafile 38 to 'e:\oracle\oradata\dpbsdev2\UTILS.ORA' ;
    37> set newname for datafile 39 to 'e:\oracle\oradata\dpbsdev2\WINDEKIS.ORA' ;
    38> set newname for datafile 40 to 'e:\oracle\oradata\dpbsdev2\WINDEKIS_EOM.ORA'
    39> set newname for datafile 41 to 'e:\oracle\oradata\dpbsdev2\WINDEKIS_EOY.ORA'
    40> set newname for datafile 42 to 'e:\oracle\oradata\dpbsdev2\XDB.ORA' ;
    41> set newname for datafile 43 to 'e:\oracle\oradata\dpbsdev2\CHANGE_MGT_PACK.D
    42> set newname for datafile 44 to 'e:\oracle\oradata\dpbsdev2\DWH.ORA' ;
    43> set newname for datafile 46 to 'e:\oracle\oradata\dpbsdev2\DEXIA_JOBS.ORA' ;
    44> duplicate target database to DPBSDEV2
    45> logfile
    46> group 1 ('E:\oracle\oradata\dpbsdev2\redo01.log' ) size 500M ,
    47> group 2 ('E:\oracle\oradata\dpbsdev2\redo02.log' ) size 500M ,
    48> group 3 ('E:\oracle\oradata\dpbsdev2\redo03.log' ) size 500M ;
    49> }
    executing command: SET NEWNAME
    using target database control file instead of recovery catalog
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting Duplicate Db at 06-FEB-08
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: sid=157 devtype=DISK
    contents of Memory Script:
    set until scn 2519944319;
    set newname for datafile 1 to
    "E:\ORACLE\ORADATA\DPBSDEV2\SYSTEM01.DBF";
    set newname for datafile 2 to
    "E:\ORACLE\ORADATA\DPBSDEV2\UNDOTBS01.DBF";
    set newname for datafile 3 to
    "E:\ORACLE\ORADATA\DPBSDEV2\SYSAUX01.DBF";
    set newname for datafile 4 to
    "E:\ORACLE\ORADATA\DPBSDEV2\USERS01.DBF";
    set newname for datafile 5 to
    "E:\ORACLE\ORADATA\DPBSDEV2\CIF.ORA";
    set newname for datafile 6 to
    "E:\ORACLE\ORADATA\DPBSDEV2\DEVELOPMENT.ORA";
    set newname for datafile 7 to
    "E:\ORACLE\ORADATA\DPBSDEV2\COMPLIANCE.ORA";
    set newname for datafile 8 to
    "E:\ORACLE\ORADATA\DPBSDEV2\COMPLIANCE_EOM.ORA";
    set newname for datafile 9 to
    "E:\ORACLE\ORADATA\DPBSDEV2\CWMLITE.ORA";
    set newname for datafile 10 to
    "E:\ORACLE\ORADATA\DPBSDEV2\DADIC.ORA";
    set newname for datafile 12 to
    "E:\ORACLE\ORADATA\DPBSDEV2\DRSYS.ORA";
    set newname for datafile 13 to
    "E:\ORACLE\ORADATA\DPBSDEV2\DUW_LAN_ENCRYPT.ORA";
    set newname for datafile 14 to
    "E:\ORACLE\ORADATA\DPBSDEV2\ERASE.ORA";
    set newname for datafile 15 to
    "E:\ORACLE\ORADATA\DPBSDEV2\EXPRIM.ORA";
    set newname for datafile 16 to
    "E:\ORACLE\ORADATA\DPBSDEV2\EXPRIM_EOM.ORA";
    set newname for datafile 17 to
    "E:\ORACLE\ORADATA\DPBSDEV2\EXPRIM_EOY.ORA";
    set newname for datafile 18 to
    "E:\ORACLE\ORADATA\DPBSDEV2\IDX_COMMON.ORA";
    set newname for datafile 19 to
    "E:\ORACLE\ORADATA\DPBSDEV2\IDX_DWH.ORA";
    set newname for datafile 20 to
    "E:\ORACLE\ORADATA\DPBSDEV2\IDX_EXPRIM.ORA";
    set newname for datafile 21 to
    "E:\ORACLE\ORADATA\DPBSDEV2\IDX_IMPORT.ORA";
    set newname for datafile 22 to
    "E:\ORACLE\ORADATA\DPBSDEV2\IDX_SPECIAL.ORA";
    set newname for datafile 23 to
    "E:\ORACLE\ORADATA\DPBSDEV2\IDX_WINDEKIS.ORA";
    set newname for datafile 24 to
    "E:\ORACLE\ORADATA\DPBSDEV2\IMPORT.ORA";
    set newname for datafile 25 to
    "E:\ORACLE\ORADATA\DPBSDEV2\IMPORT_EOM.ORA";
    set newname for datafile 26 to
    "E:\ORACLE\ORADATA\DPBSDEV2\IMPORT_EOY.ORA";
    set newname for datafile 27 to
    "E:\ORACLE\ORADATA\DPBSDEV2\INDX.ORA";
    set newname for datafile 28 to
    "E:\ORACLE\ORADATA\DPBSDEV2\ODM.ORA";
    set newname for datafile 29 to
    "E:\ORACLE\ORADATA\DPBSDEV2\OMS_REPOSITORY.ORA";
    set newname for datafile 31 to
    "E:\ORACLE\ORADATA\DPBSDEV2\OWB_REPOSITORY.ORA";
    set newname for datafile 32 to
    "E:\ORACLE\ORADATA\DPBSDEV2\OWB_REPOSITORY_IDX.ORA";
    set newname for datafile 34 to
    "E:\ORACLE\ORADATA\DPBSDEV2\SECURITY.ORA";
    set newname for datafile 35 to
    "E:\ORACLE\ORADATA\DPBSDEV2\SIMS.ORA";
    set newname for datafile 36 to
    "E:\ORACLE\ORADATA\DPBSDEV2\TOOLS.ORA";
    set newname for datafile 37 to
    "E:\ORACLE\ORADATA\DPBSDEV2\TRANSTAT.ORA";
    set newname for datafile 38 to
    "E:\ORACLE\ORADATA\DPBSDEV2\UTILS.ORA";
    set newname for datafile 39 to
    "E:\ORACLE\ORADATA\DPBSDEV2\WINDEKIS.ORA";
    set newname for datafile 40 to
    "E:\ORACLE\ORADATA\DPBSDEV2\WINDEKIS_EOM.ORA";
    set newname for datafile 41 to
    "E:\ORACLE\ORADATA\DPBSDEV2\WINDEKIS_EOY.ORA";
    set newname for datafile 42 to
    "E:\ORACLE\ORADATA\DPBSDEV2\XDB.ORA";
    set newname for datafile 43 to
    "E:\ORACLE\ORADATA\DPBSDEV2\CHANGE_MGT_PACK.DBF";
    set newname for datafile 44 to
    "E:\ORACLE\ORADATA\DPBSDEV2\DWH.ORA";
    set newname for datafile 46 to
    "E:\ORACLE\ORADATA\DPBSDEV2\DEXIA_JOBS.ORA";
    restore
    check readonly
    clone database
    executing Memory Script
    executing command: SET until clause
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 06-FEB-08
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: starting datafile backupset restore
    channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to E:\ORACLE\ORADATA\DPBSDEV2\SYSTEM01.DBF
    restoring datafile 00002 to E:\ORACLE\ORADATA\DPBSDEV2\UNDOTBS01.DBF
    restoring datafile 00003 to E:\ORACLE\ORADATA\DPBSDEV2\SYSAUX01.DBF
    restoring datafile 00004 to E:\ORACLE\ORADATA\DPBSDEV2\USERS01.DBF
    restoring datafile 00005 to E:\ORACLE\ORADATA\DPBSDEV2\CIF.ORA
    restoring datafile 00006 to E:\ORACLE\ORADATA\DPBSDEV2\DEVELOPMENT.ORA
    restoring datafile 00007 to E:\ORACLE\ORADATA\DPBSDEV2\COMPLIANCE.ORA
    restoring datafile 00008 to E:\ORACLE\ORADATA\DPBSDEV2\COMPLIANCE_EOM.ORA
    restoring datafile 00009 to E:\ORACLE\ORADATA\DPBSDEV2\CWMLITE.ORA
    restoring datafile 00010 to E:\ORACLE\ORADATA\DPBSDEV2\DADIC.ORA
    restoring datafile 00012 to E:\ORACLE\ORADATA\DPBSDEV2\DRSYS.ORA
    restoring datafile 00013 to E:\ORACLE\ORADATA\DPBSDEV2\DUW_LAN_ENCRYPT.ORA
    restoring datafile 00014 to E:\ORACLE\ORADATA\DPBSDEV2\ERASE.ORA
    restoring datafile 00015 to E:\ORACLE\ORADATA\DPBSDEV2\EXPRIM.ORA
    restoring datafile 00016 to E:\ORACLE\ORADATA\DPBSDEV2\EXPRIM_EOM.ORA
    restoring datafile 00017 to E:\ORACLE\ORADATA\DPBSDEV2\EXPRIM_EOY.ORA
    restoring datafile 00018 to E:\ORACLE\ORADATA\DPBSDEV2\IDX_COMMON.ORA
    restoring datafile 00019 to E:\ORACLE\ORADATA\DPBSDEV2\IDX_DWH.ORA
    restoring datafile 00020 to E:\ORACLE\ORADATA\DPBSDEV2\IDX_EXPRIM.ORA
    restoring datafile 00021 to E:\ORACLE\ORADATA\DPBSDEV2\IDX_IMPORT.ORA
    restoring datafile 00022 to E:\ORACLE\ORADATA\DPBSDEV2\IDX_SPECIAL.ORA
    restoring datafile 00023 to E:\ORACLE\ORADATA\DPBSDEV2\IDX_WINDEKIS.ORA
    restoring datafile 00024 to E:\ORACLE\ORADATA\DPBSDEV2\IMPORT.ORA
    restoring datafile 00025 to E:\ORACLE\ORADATA\DPBSDEV2\IMPORT_EOM.ORA
    restoring datafile 00026 to E:\ORACLE\ORADATA\DPBSDEV2\IMPORT_EOY.ORA
    restoring datafile 00027 to E:\ORACLE\ORADATA\DPBSDEV2\INDX.ORA
    restoring datafile 00028 to E:\ORACLE\ORADATA\DPBSDEV2\ODM.ORA
    restoring datafile 00029 to E:\ORACLE\ORADATA\DPBSDEV2\OMS_REPOSITORY.ORA
    restoring datafile 00031 to E:\ORACLE\ORADATA\DPBSDEV2\OWB_REPOSITORY.ORA
    restoring datafile 00032 to E:\ORACLE\ORADATA\DPBSDEV2\OWB_REPOSITORY_IDX.ORA
    restoring datafile 00034 to E:\ORACLE\ORADATA\DPBSDEV2\SECURITY.ORA
    restoring datafile 00035 to E:\ORACLE\ORADATA\DPBSDEV2\SIMS.ORA
    restoring datafile 00036 to E:\ORACLE\ORADATA\DPBSDEV2\TOOLS.ORA
    restoring datafile 00037 to E:\ORACLE\ORADATA\DPBSDEV2\TRANSTAT.ORA
    restoring datafile 00038 to E:\ORACLE\ORADATA\DPBSDEV2\UTILS.ORA
    restoring datafile 00039 to E:\ORACLE\ORADATA\DPBSDEV2\WINDEKIS.ORA
    restoring datafile 00040 to E:\ORACLE\ORADATA\DPBSDEV2\WINDEKIS_EOM.ORA
    restoring datafile 00041 to E:\ORACLE\ORADATA\DPBSDEV2\WINDEKIS_EOY.ORA
    restoring datafile 00042 to E:\ORACLE\ORADATA\DPBSDEV2\XDB.ORA
    restoring datafile 00043 to E:\ORACLE\ORADATA\DPBSDEV2\CHANGE_MGT_PACK.DBF
    restoring datafile 00044 to E:\ORACLE\ORADATA\DPBSDEV2\DWH.ORA
    restoring datafile 00046 to E:\ORACLE\ORADATA\DPBSDEV2\DEXIA_JOBS.ORA
    channel ORA_AUX_DISK_1: reading from backup piece F:\ORACLE\BACKUP\BACKUP_DPBSPR
    ORA-19870: error reading backup piece F:\ORACLE\BACKUP\BACKUP_DPBSPRD1_BLJ7VKO3
    ORA-19505: failed to identify file "F:\ORACLE\BACKUP\BACKUP_DPBSPRD1_BLJ7VKO3"
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 3) The system cannot find the path specified.
    failover to previous backup
    thanks for your help
    Regards

    can you post your connection string to the source and auxillary databases please. with a duplicate you don't need to copy any files, rman does the whole process for you.
    regards
    Alan

  • 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 while restoring database with different name on subscriber

    Hi all,
    I am using merge replication in sql server 2008R2. Yesterday I wanted to create a test environment, so
    I did:
    1. on publisher I restored from backup production db with another name ( lets call it TEST and new files
    .mdf, .ldf and no switch KEEP_REPLICATION). After this step original replication between production
    dbs worked fine.
    2. on subscriber I did the same: restore as new db TEST with new
    files .mdf, .ldf and no switch KEEP_REPLICATION.
    Unfortunately I noticed, that after second step replication stopped. SQL agent replication job on Subscriber
    is gone.
    Why restoring db with new name did affect original replication?
    Finally the most important: replication was set up by external company and I have to bring it to live now
    but I don't know this subject so good. How can I do it?
    Assuming, that there is no data change on subscriber in replicated tables is it enough when I select ‘reinitialize’
    on Publisher and Subscriber?
    Thanks in advance
    Artur

    Hello,
    Sorry for late response, but I was out of the office during last week.
    Regarding problem 1: restoring replication. I contacted guy who made originally our replication and he recreated subscription agent. So this is solved.
    problem 2: why did it happen?
    Lydia, in link which you provided I found only info about restoring db in replication, but I didn't want to restore replication.
    I checked SQL Server and Server Agent logs and there were no entries on that time. The only entries are regarding db restoring. Below:
    09/11/2014 12:45:59,Backup,Unknown,Database was restored: Database: Logik_ATData_TEST<c/> creation date(time): 2012/04/27(13:55:41)<c/> first LSN: 21392:66:267<c/> last LSN: 21392:227:1<c/> number of dump devices: 1<c/> device information: (FILE=1<c/> TYPE=DISK: {'D:\MSSQLBackup\Dzienny\Logik_ATData_PROD\Logik_ATData_PROD_backup_2014_09_10_231001_6391536.bak'}). Informational message. No user action required.
    09/11/2014 12:45:59,Backup,Unknown,Restore is complete on database 'Logik_ATData_TEST'. The database is now available.
    09/11/2014 12:45:59,spid72,Unknown,CHECKDB for database 'Logik_ATData_TEST' finished without errors on 2012-04-26 22:50:05.490 (local time). This is an informational message only; no user action is required.
    09/11/2014 12:44:53,spid72,Unknown,Recovery is writing a checkpoint in database 'Logik_ATData_TEST' (13). This is an informational message only. No user action is required.
    09/11/2014 12:44:53,spid72,Unknown,Starting up database 'Logik_ATData_TEST'.
    09/11/2014 12:44:51,spid72,Unknown,The database 'Logik_ATData_TEST' is marked RESTORING and is in a state that does not allow recovery to be run.
    09/11/2014 12:44:51,spid72,Unknown,Starting up database 'Logik_ATData_TEST'.
    In Windows application log there were also no other entries, besides these above.
    I also could not check job history, because the job was gone in SSMS jobs list, while the subscription was present in SSMS Replication with info, that last successful synchronization was at 12:42 (there is a 5 min. sync period).
     I also don't understand how the job was deleted, because according this manual (http://www.mssqltips.com/sqlservertip/1803/auto-alert-for-sql-agent-jobs-when-they-are-enabled-or-disabled/) I have 2 triggers in sysjobs table and every time, when
    job is deleted/disabled I got @ notification. In this case I got no @.
    My SQL Server version:
    Product_Version Product_Level Edition
    10.50.2550.0 SP1 Standard Edition (64-bit)
    Any idea what happened?
    Thanks,
    Artur

  • Database Portability of restored Database in Production server

    Hi All,
    I have a query regarding database portability in Exchange 2010 server.
    I have restored a Journaling Database which is ~ 350 GB and just wanted to check if i dismount the prod database which does not have any data in the DB and only journlaing mailbox is pointed to this DB , can i move restored DB .edb file to the production
    server physical location and mount it, will the journaling account will connect to this restored database which i have copied. or do i have to run any command which will reconnect the mailbox. 
    BR/Deepak

    Hi,
    You can use the Connect-Mailbox -Identity -Archive cmdlet to re-connect an archive mailbox.
    You can refer to the following article.
    https://technet.microsoft.com/en-GB/library/ee633490(v=exchg.141).aspx
    Best regards,
    Belinda Ma
    TechNet Community Support

  • 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

  • Problem with restoring database from backupset

    Hello,
    I'm newie in working with RMAN and I have problem with restoring database from backup set in my testcase.
    I've restored controlfile, but I couldn't restore database - it fails with:
    RMAN-00571: =============================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
    RMAN-00571: =============================================
    RMAN-03002: failure of restore command at 08/31/2006 12:06:47
    ORA-01180: can not create datafile 1
    ORA-01110: data file 1: 'C:\ORACLE\ORADATA\LOCA10G2\SYSTEM01.DBF'
    List of backupsets from restored controlfile
    (I restored controlfile by command: restore controlfile from 'C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NCSNF_TAG20060829T113622_2H82OW77_.BKP'; -- I have disabled controlfile autobackup, therefore I couldn't restore from autobackup);
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    36 Full 6.98M DISK 00:00:02 29-AUG-06
    BP Key: 36 Status: AVAILABLE Compressed: NO Tag: 01_CTL
    Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NCNNF_01_CTL_2H82NDQT_.BKP
    Control File Included: Ckp SCN: 578469 Ckp time: 29-AUG-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    37 Full 322.96M DISK 00:00:27 29-AUG-06
    BP Key: 37 Status: AVAILABLE Compressed: NO Tag: TAG20060829T113622
    Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NNNDF_TAG20060829T113622_2H82NQ58_.BKP
    List of Datafiles in backup set 37
    File LV Type Ckp SCN Ckp Time Name
    1 Full 578481 29-AUG-06 C:\ORACLE\ORADATA\LOCA10G2\SYSTEM01.DBF
    2 Full 578481 29-AUG-06 C:\ORACLE\ORADATA\LOCA10G2\UNDOTBS01.DBF
    3 Full 578481 29-AUG-06 C:\ORACLE\ORADATA\LOCA10G2\SYSAUX01.DBF
    4 Full 578481 29-AUG-06 C:\ORACLE\ORADATA\LOCA10G2\USERS01.DBF
    BS Key Size Device Type Elapsed Time Completion Time
    38 650.50K DISK 00:00:00 29-AUG-06
    BP Key: 38 Status: AVAILABLE Compressed: NO Tag: TAG20060829T113804
    Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_ANNNN_TAG20060829T113804_2H82QYOV_.BKP
    List of Archived Logs in backup set 38
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 32 577277 29-AUG-06 578529 29-AUG-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    39 Full 7.02M DISK 00:00:00 29-AUG-06
    BP Key: 39 Status: AVAILABLE Compressed: NO Tag: TAG20060829T113622
    Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NCSNF_TAG20060829T113622_2H82OW77_.BKP
    Control File Included: Ckp SCN: 578493 Ckp time: 29-AUG-06
    SPFILE Included: Modification time: 28-AUG-06
    I can successfully crosscheck backup sets (by command crosscheck backup), but I couldn't restore database.
    Path C:\ORACLE\ORADATA\LOCA10G2\ exists and I have right privileges.
    Output of command restore database validate:
    RMAN> restore database validate;
         Starting restore at 31-AUG-06
         allocated channel: ORA_DISK_1
         channel ORA_DISK_1: sid=102 devtype=DISK
         data file 1 will be created automatically during restore operation
         data file 2 will be created automatically during restore operation
         data file 3 will be created automatically during restore operation
         data file 4 will be created automatically during restore operation
         restore not done; all files readonly, offline, or already restored
         Finished restore at 31-AUG-06
    What's wrong?
    Thanks
         Paul

    Hi,
    I think, that everything seems to be OK.
    Commands which I use to validation of existence backup:
    RMAN> crosscheck backup;
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=102 devtype=DISK
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NCNNF_01_CTL_2H82NDQT_.BKP recid=36 stamp=599744172
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NNNDF_TAG20060829T113622_2H82NQ58_.BKP recid=37 stamp=599744183
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_ANNNN_TAG20060829T113804_2H82QYOV_.BKP recid=38 stamp=599918805
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NCSNF_TAG20060829T113622_2H82OW77_.BKP recid=39 stamp=599918805
    Crosschecked 4 objects
    RMAN> list backup summary;
    List of Backups
    ===============
    Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    36 B F A DISK 29-AUG-06 1 1 NO 01_CTL
    37 B F A DISK 29-AUG-06 1 1 NO TAG20060829T113622
    38 B A A DISK 29-AUG-06 1 1 NO TAG20060829T113804
    39 B F A DISK 29-AUG-06 1 1 NO TAG20060829T113622
    RMAN> list backup;
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    36 Full 6.98M DISK 00:00:02 29-AUG-06
    BP Key: 36 Status: AVAILABLE Compressed: NO Tag: 01_CTL
    Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NCNNF_01_CTL_2H82NDQT_.BKP
    Control File Included: Ckp SCN: 578469 Ckp time: 29-AUG-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    37 Full 322.96M DISK 00:00:27 29-AUG-06
    BP Key: 37 Status: AVAILABLE Compressed: NO Tag: TAG20060829T113622
    Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NNNDF_TAG20060829T113622_2H82NQ58_.BKP
    List of Datafiles in backup set 37
    File LV Type Ckp SCN Ckp Time Name
    1 Full 578481 29-AUG-06 C:\ORACLE\ORADATA\LOCA10G2\SYSTEM01.DBF
    2 Full 578481 29-AUG-06 C:\ORACLE\ORADATA\LOCA10G2\UNDOTBS01.DBF
    3 Full 578481 29-AUG-06 C:\ORACLE\ORADATA\LOCA10G2\SYSAUX01.DBF
    4 Full 578481 29-AUG-06 C:\ORACLE\ORADATA\LOCA10G2\USERS01.DBF
    BS Key Size Device Type Elapsed Time Completion Time
    38 650.50K DISK 00:00:00 29-AUG-06
    BP Key: 38 Status: AVAILABLE Compressed: NO Tag: TAG20060829T113804
    Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_ANNNN_TAG20060829T113804_2H82QYOV_.BKP
    List of Archived Logs in backup set 38
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 32 577277 29-AUG-06 578529 29-AUG-06
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    39 Full 7.02M DISK 00:00:00 29-AUG-06
    BP Key: 39 Status: AVAILABLE Compressed: NO Tag: TAG20060829T113622
    Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NCSNF_TAG20060829T113622_2H82OW77_.BKP
    Control File Included: Ckp SCN: 578493 Ckp time: 29-AUG-06
    SPFILE Included: Modification time: 28-AUG-06
    RMAN> restore database validate;
    Starting restore at 04-SEP-06
    using channel ORA_DISK_1
    data file 1 will be created automatically during restore operation
    data file 2 will be created automatically during restore operation
    data file 3 will be created automatically during restore operation
    data file 4 will be created automatically during restore operation
    restore not done; all files readonly, offline, or already restored
    Finished restore at 04-SEP-06
    Is something wrong? After crosscheck backup set with system datafile is AVAILABLE.
    If i tried to test existence of backup pieces on disk and permissisons - everything is OK too:
    C:\>dir C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\
    Volume in drive C has no label.
    Volume Serial Number is E003-9FC6
    Directory of C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29
    29.08.2006 11:38 <DIR> .
    29.08.2006 11:38 <DIR> ..
    29.08.2006 11:38 666 624 O1_MF_ANNNN_TAG20060829T113804_2H82QYOV_.BKP
    29.08.2006 11:36 7 340 032 O1_MF_NCNNF_01_CTL_2H82NDQT_.BKP
    29.08.2006 11:37 7 372 800 O1_MF_NCSNF_TAG20060829T113622_2H82OW77_.BKP
    29.08.2006 11:36 338 657 280 O1_MF_NNNDF_TAG20060829T113622_2H82NQ58_.BKP
    4 File(s) 354 036 736 bytes
    2 Dir(s) 56 865 202 176 bytes free
    C:\>copy C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\ C:\ORACLE\ORADATA\LOCA10G2\
    C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_ANNNN_TAG20060829T113804_2H82QYOV_.BKP
    C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NCNNF_01_CTL_2H82NDQT_.BKP
    C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NCSNF_TAG20060829T113622_2H82OW77_.BKP
    C:\ORACLE\FLASH_RECOVERY_AREA\LOCA10G2\BACKUPSET\2006_08_29\O1_MF_NNNDF_TAG20060829T113622_2H82NQ58_.BKP
    4 file(s) copied.
    Thanks
    Pavel

  • 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

  • RMAN Error - restore database validate

    Hi all
    I am trying to validate a full database backup taken on tape using 'restore database validate' command but for some reason this command spits out multi-page long PL/SQL code (below truncated output). I have searched all over for a solution but can't seem to figure out the problem.
    Any assistance will be appreciated.
    RMAN> allocate channel for maintenance type SBT_TAPE parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    2> crosscheck backup;
    3> restore database validate;
    4> release channel;
    5> exit;
    allocated channel: ORA_MAINT_SBT_TAPE_1
    channel ORA_MAINT_SBT_TAPE_1: SID=82 device type=SBT_TAPE
    channel ORA_MAINT_SBT_TAPE_1: Data Protection for Oracle: version 5.4.1.0
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=c-822607628-20101006-02 RECID=66 STAMP=731711718
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=DB_20101007_77_2dlpsj84_1_1.dbf RECID=67 STAMP=731794692
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=CF_20101008_116_3klpt5iv_1_1.ctl RECID=106 STAMP=731813472
    crosschecked backup piece: found to be 'AVAILABLE'
    backup piece handle=c-822607628-20101008-01 RECID=107 STAMP=731813518
    Crosschecked 42 objects
    Starting restore at 08-OCT-10
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=110 device type=DISK
    DBGANY: CMD type=IRESTORE cmdid=1 status=NOT STARTED
    DBGANY: 1 STEPstepid=1 cmdid=1 status=NOT STARTED devtype=SBT_TAPE bs.stamp=731812991 step_size=0 Bytes
    DBGANY: 1 TEXTNOD = -- rsdf_start
    DBGANY: 2 TEXTNOD = declare
    DBGANY: 3 TEXTNOD = /* restoreStatus */
    DBGANY: 4 TEXTNOD = state binary_integer;
    DBGANY: 5 TEXTNOD = pieces_done binary_integer;
    DBGANY: 6 TEXTNOD = files binary_integer;
    DBGANY: 7 TEXTNOD = datafiles boolean;
    DBGANY: 8 TEXTNOD = incremental boolean;
    DBGANY: 9 TEXTNOD = device boolean;
    DBGANY: 10 TEXTNOD = /* restorebackuppiece */
    DBGANY: 11 TEXTNOD = done boolean;
    DBGANY: 12 TEXTNOD = currcf boolean;
    DBGANY: 266 TEXTNOD = sys.dbms_backup_restore.restoreCancel(FALSE);
    DBGANY: 267 TEXTNOD = exception
    DBGANY: 268 TEXTNOD = when others then
    DBGANY: 269 TEXTNOD = krmicd.writeMsg(1005,
    DBGANY: 270 TEXTNOD = 'c. dbms_backup_restore.restoreCancel() failed');
    DBGANY: 271 TEXTNOD = end;
    DBGANY: 272 TEXTNOD = sys.dbms_backup_restore.setRmanStatusRowId(rsid=>0, rsts=>0);
    DBGANY: 273 TEXTNOD = end;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00601: fatal error in recovery manager
    RMAN-03004: fatal error during execution of command
    RMAN-00600: internal error, arguments [6000] [] [] [] []

    Hi Sybrand
    So here's the deal:
    1) 'backup validate database;' is run before RMAN backup to check for any logical or physical corruption in datafiles or archivelogs.
    If the backup validation discovers corrupt blocks, then RMAN updates the V$DATABASE_BLOCK_CORRUPTION view with rows describing the corruptions.
    2)
    a- 'restore database validate;' is run after RMAN backup to check for any logical or physical corruption in backupsets.
    b- 'validate backupset <n>;' is also run after RMAN backup to check for any logical or physical corruption in backupsets. The difference being you have to run it for each individual backupset as opposed to the previous option (2a), which loops through all existing backupsets.
    I believe for now only option 2b is available for use in my case.
    Cheers.

  • Do I need to check "READONLY" parameter in BBP_SC_AUTO_RETRANSFER report?

    Hi Gurús,
    I applied SAP Note 1499352 - SRM Transfer: Redesign, bug fixes (and all its correction notes).
    The new BBP_SC_AUTO_RETRANSFER report is needed to scheduled with a job.
    The report has three parameters:
    ADD_TIME (Hours since last "changed at") - default value 48
    ADDTIME2 (Timeout hours) - default value 24
    READONLY (Read only, no Updates) - checked by default
    But I don't know if READONLY must be checked in job scheduled.
    My system is:
    Component software: SRM_SERVER
    Release: 700
    Level: 8
    Support package: SAPKIBKV08
    I'm using extended classic scenario.
    Do I need to check "READONLY" parameter in BBP_SC_AUTO_RETRANSFER report?
    Thanks in advance,
    Alonso Valenzuela

    The parameter was unchecked to save changes in database.

  • Access Denied Error Trying to Restore Database

    I have a database backup of a 2008R2 database sitting on Machine1.  I want to restore it to Machine 2, which is SQL 2012.  both machines are on the same domain.  Below is my script but I am getting the error" The operating sytem returned
    the error '5(Access is denied,)' while attempting 'RestoreContainer: ValidateTargerForCreation on 'D:SQL\MSSQL11.MSSQLSERVER\MSSQL\Data'.  This error is followed by File 'DBName" cannot be restored to 'D:SQL\MSSQL11.MSSQLSERVER\MSSQL\Data'.  Use
    WITH MOVE to identify a valid location for the file.
    RESTORE DATABASE DatabaseName FROM DISK = N'\\SQLSVR\FullBackups\DatabaseName\DatabaseName.bak' WITH FILE = 1,
    MOVE N'DatabaseName' TO N'D:\SQL\MSSQL11.MSSQLSERVER\MSSQL\DATA';
    RESTORE DATABASE ISSPortal FROM DISK = N'\\SQLSVR\FullBackups\ISSPortal\ISSPortal.bak' WITH FILE = 1,
    MOVE N'ISSPortal' TO N'D:\SQL\MSSQL11.MSSQLSERVER\MSSQL\DATA' ,
    MOVE N'ISSPortal_Log' TO N'D:\SQL\MSSQL11.MSSQLSERVER\MSSQL\DATA',
    REPLACE
    GO
    If I run the second query then I get File 'D:SQL\MSSQL11.MSSQLSERVER\MSSQL\Data' is claimed by 'DatabaseName_Log' and 'DatabaseName' .  The WITH MOVE clause can be used to relocate one or more files.
    I have granted the database engine service access to the path where the backup lives on machine 1.
    Lee Markum

    Can you try to create a dummy database in the below path? Try from SSMS
    D:\SQL\MSSQL11.MSSQLSERVER\MSSQL\DATA
    Can you check the output of the first query and then change the restore as per the output
    RESTORE FILELISTONLY FROM DISK = N'\\SQLSVR\FullBackups\ISSPortal\ISSPortal.bak'
    WITH FILE = 1
    RESTORE DATABASE ISSPortal FROM DISK = N'\\SQLSVR\FullBackups\ISSPortal\ISSPortal.bak' WITH FILE = 1,
    MOVE 'ISSPortal' TO N'D:\SQL\MSSQL11.MSSQLSERVER\MSSQL\DATA\ISSPortalData.mdf',
    MOVE 'ISSPortal_Log' TO N'D:\SQL\MSSQL11.MSSQLSERVER\MSSQL\DATA\ISSPortal_Log.ldf',
    REPLACE,
    STATS = 10
    --Prashanth

  • "Error restoring Databases" SMS import failing!

    Hey all-
    I keep getting an "error restoring databases" message when trying to put all of the SMS texts from my Curve 8330 onto my World Edition.  I did this yesterday and it worked fine.  The problem is the screen on my curve is dead so until I get a new one, I have to keep making backup files and uploading them onto my world edition so I can see my texts/phone calls that I've been receiving on the curve.
    I managed to do this successfully yesterday morning but since then I keep getting this error message.  I have tried clearing the SMS on the World then pulling in just the SMS from the backup file, full deviced transfers and partial/full restores!   All of them are giving me the same "error restoring databases" and it may pull in a few of the 1334 texts I have to import.
    Both Blackberrys are up to date OS-wise and BB Desktop Manager is v5
    Any help would be appreciated!!!  THANKS

    Hi,
    The IMP indicates this this error is coming from the old imp. This dump file could be from the expdp utility, which would require you to use the impdp utility.
    Source
    OS : Solaris 10
    Oracle version : 11.2.0.2
    Export dump : exp_CAAU2.dmp.gz (Export taken by zipping)
    Target
    OS : Windows server 2003
    Oracle Version : 10.2.0.2.0
    While importing into windows env, it is failing..
    What really matters here is the compatibility level. If your source and target compatibility levels are the same, then with Data Pump, the dumpfile created on the source, would work on the target. If the compatibility levels are different, then use expdp with the version parameter set to the compatibility level of the target.
    Please let me know the reason why the import is failing?Check the suggestions above first.
    Can i upgrade the target oracle version to 11.2.0.2 to succeed the import?It could help, but first check to see if you are using the right utility and then check the compatibility versions.
    Dean

  • SQL Server 2012 restoring database from backup file

    Hi All,
    1. I was restoring the database from PROD box to DEV box with the deferent name.
    For Ex: Both PROD and DEV boxes are having "A" database. Now I am refreshing database"A" from PROD bot to DEV box with name "B". Now while restoring in SQL server 2012 I used GUI and took database name as "A" by default.
    by mistake I executed the request. before completing I notice that "A" database in DEV Box went to restoring mode.
    Now, in middle I stopped the query but still I am seeing database "A" is in restoring state.
    Please guide me is there any way to bring database online with current data?
    2. Why sql server 2012 takes tail log backup of the existing database while restoring database with different name?

    Hi,
    check this link for the same issue and solutions:
    http://stackoverflow.com/questions/520967/sql-server-database-stuck-in-restoring-state
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

Maybe you are looking for