SQL DB Recovery
Backup Plan:
Every Sunday @ 10.30 PM---> FullBackup
Everyday @ 8.30 PM --> Differential Backup
Every 2 hrs Transnational log backup.
On Wednesday @ 2.30 PM my DB corrupted.
Now i want recovery my database.
But unfortunately i came to know that my Tuesday's diff backup also got corrupted.
In this case how can i recover DB till Wednesday @ 2.29 PM?
Can you restore the transaction log backups taken monday's differential backup.
So, Sunday Full backup + Monday Differential backup + all log backups since then
So, is your full backup - corruption free - were you able to restore?
since you said, your differential backup is corrupted. it is more than likely one of your transaction log backups has the corruption too. so, your best bet would be to try restoring the log backups taken after the full backup one by one until you get
the corruption error message or till you finish restoring all the log backups.
between, what is the corruption message? what dbcc checkdb return?? what is the corruption message??
Also, you said, database was corrupted on wednesday 2:30 but differential backup (tuesday) has the corruption too-- that means your database was corrupted on Tuesday(8:30) or earlier but you did not identify till wednesday 2:30.
do you have checksum enabled on your back ups??
Hope it Helps!!
Similar Messages
-
Hi,
We have accidentally deleted a database from SQL server. Then we have used NTFS file recovery tools such as R-Studio and scanned the entire drive. As a result of the scanning process we found a set of MDF files. Then we tried to attach the MDF files using
SQL Management Studio. While doing so we got an error stating "MDF File is corrupted". Then we purchased a "Kernel for SQL Database" tool and opened the MDF file using that. We were able to recover only partial data. Is there any way that
we can recover the full data from the MDF files.
Any help on this would be greatly appreciated.
Thanks,
Sairam
Sairam Avacorp TechnologiesHi,
We have accidentally deleted a database from SQL server. Then we have used NTFS file recovery tools such as R-Studio and scanned the entire drive. As a result of the scanning process we found a set of MDF files. Then we tried to attach the MDF files using SQL
Management Studio. While doing so we got an error stating "MDF File is corrupted". Then we purchased a "Kernel for SQL Database" tool and opened the MDF file using that. We were able to recover only partial data. Is there any way that we
can recover the full data from the MDF files.
Any help on this would be greatly appreciated.
Thanks,
Sairam
Sairam Avacorp Technologies -
Automate SQL Disaster Recovery
Hi All,
Need some suggestions on automating the SQL DR tasks. Here is the scenario:
- We have a standby SQL Server which regularly gets updated with the content (through SSIS jobs etc) from the Primary SQL Server
- If the Primary SQL Server goes down, we point Lync pool to the backup SQL Store to restore the functionality while we rebuild the primary SQL Server. However this SQL Store change needs the use of Topology Builder (as SQL Server names are not the same),
a task which cannot be automated using Powershell or SQL scripts.
Can the Topology Builder step be automated in anyway?
PS: In OCS we had all tasks automated by using Update-PoolBackend and other cmdlets to point to the backup SQL Server. We want to do the same in Lync too, thereby reducing manual steps.
--HakeemIs your backup SQL server in a remote site or the same site? If it's remote, the only way to provide full HA failover is with a metropolitan data center design with a stretched SQL cluster and VLAN, SAN replication etc. See
this article.
Attempting to replicate or mirror the SQL content (using log shipping or database mirroring) is not supported and doesn't work properly. More info here on my blog http://www.justin-morris.net/sql-database-mirroring-with-lync-server-2010-series-%E2%80%93-backend-databases/.
The introduction of the CMS (xds database) complicates DR somewhat, so you will need to first assess what Lync services you require to be available in a DR situation.
Today, Lync provides voice resiliency quite well in a DR situation, but other services (IM and Presence, Conferencing) require more design work to provide availability in the event of disaster.
Justin Morris | Consultant | Modality Systems
Lync Blog - www.justin-morris.net
Twitter: @jm_deluxe
If this post has been useful please click the green arrow to the left or click "Propose as answer" -
MBAM 2.0 with SCCM Integration: Recovery Audit Reports errors.
I have installed MBAM 2.0 with SCCM integration according to the following website:
http://myitforum.com/myitforumwp/2013/06/10/how-to-install-mbam-2-0-with-configmgr-integration/
Topology:
SCCM 2012
SCCM SQL Server
MBAM Server
MBAM SQL Server
Components installed:
Integration components on SCCM 2012 server
Compliance and Audit Reports on SCCM SQL Server
Recovery and Audit Databases on MBAM SQL Server
Self-Service and Administration Monitoring on MBAM Server
Everything is running correctly: SCCM sees compliance reports, keys are populating into the Recovery database. Self-service works correctly as tested.
However, the Recovery Audit Report in the /Helpdesk webpage reports an error:
"Cannot create a connection to data source 'DataSource1'. (rsErrorOpeningConnection)
Browsing to the /Reports page on the MBAM SQL server (with reporting) yields an empty page.
If I install the Audit and Compliance reports onto the MBAM SQL server, those populate (but are empty, as SCCM is handling that component), however, the Recovery Audit Report still yields the same error.
Ideas?
Thanks,
-PatrickYou can put the Audit Reports on the SSRS instance on SCCM Server. But it has its own limitations. What if you want to configure the encrypted configuration within the MBAM environment using SSL certificate. In that case you have to take special
care while using the SSL certificate for configuring the reporting Point as it has been also used by the SCCM.
Gaurav Ranjan
So, let me get this clear, I can install the Audit Reports onto the SRSS I am using for SCCM and not have to deploy an SRSS instance elsewhere? The SSL certificate detail is not an issue. I am desperately trying to avoid yet another instance of
SRSS.
Thanks -
Change SharePoint_Config Database to simple recovery mode. Risk.
Hello,
we have SBS 2008 with Exchnage and OWA-Service.
The Logfile of SharePoint is very large (30 GB).
But we don't use SharePoint.
I want to change the recovery mode of SharePoint_Config Database to simple.
But i don't know, what of Application/Services/Programms use SharePoint Database.
What are the risks of changing SharePoint_Config Database to Simple Mode?
What of the Sevices/Programms use SharePoint Database ?
Thank YouHi ,
As Dimitri pointed out, SharePoint DB is in SQL database, the change of it won't affect Exchange and Outlook Web Access.
If you use SharePoint in future, you may take a look at the following article about the effect to SharePoint database with simple recovery mode.
http://searchwinit.techtarget.com/tip/How-SQL-Server-recovery-models-impact-your-SharePoint-databases
Thanks
Daniel Yang
TechNet Community Support -
Doing Block Recovery of a Table
Hello,
We have to do a single block recovery of a table on Oracle 10gR2 Solaris machine.
One of the archive was missing or corrupted.
I was trying to do block recovery from the backup of 3 days. But it is applying all the archives and after that errors out saying media recovery failure due to missing/corrupt archive log.
I have tried until scn , until sysdate-2 , using tag tagname etc....
But in all the situations it is applying archive logs and giving media recovery failure.
Is there any way I can only apply certain archive logs or do until a point in time of recovery of that single block.
or just get the block from the backup and not apply the archive logs.
ThanksStreet Hawk wrote:
Then you have to forget that block.
OR
you will have to do an incomplete recoveryI have to say that its "really wrong". How would you do an incomplete recovry of a corrupted block?
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc2.htm#i1008221
>
Note these restrictions of block media recovery:
You can only perform block media recovery with RMAN. No SQL*Plus recovery interface is available.
You can only perform complete recovery of individual blocks. In other words, you cannot stop recovery before all redo has been applied to the block.
You can only recover blocks marked media corrupt. The V$DATABASE_BLOCK_CORRUPTION view indicates which blocks in a file were marked corrupt since the most recent BACKUP or BACKUP ... VALIDATE command was run against the file.
You must have a full RMAN backup. Incremental backups are not used by block media recovery. Proxy backups are also not used by block media recovery. Only full backups and archived log files are used.
Block media recovery is able to restore blocks from parent incarnation backups and recover the corrupted blocks through a RESETLOGS.
Blocks that are marked media corrupt are not accessible to users until recovery is complete. Any attempt to use a block undergoing media recovery results in an error message indicating that the block is media corrupt.>
Flashback also is WRONG suggestion. It recovers your logical changes,not the physcial corruptions like block failure and you don't need to enable it. Its there by default. The flashback database option has to be enabled. But putting the whole database back in past , just because a block is corrupted , is that a wise thing to do?
@OP,
If you don't have all the archive logs, I would suggest to repair the block using [dbms_repair|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_repair.htm] package. Note that the name of the package is "misleading".
HTH
Aman.... -
SQL Database is corrupted....... plz help.
Respected Sir,
unfortunately hard disk of my system is damaged, now i recovered my database. but it cannot be attached again to SQL management
studio 2005.
the error is myfile.mdf is not a primary database file. (SQL server , error 5171)
plz sir help me...Corruption in SQL server database can happen due to any uncertain like virus attack, power
failure, hardware issue, OS malfunction, sudden system shutdown, so on. When a SQL server data file (.mdf) is corrupt then DBAs can try several methods to repair and recover data from it.
Run DBCC CHECKDB: It checks & reports all the error message
in errorlog, if there is any problem with the database. Try to analyze & understand the error message logged in the errorlog. Re-run DBCC CHECKDB with the recommended minimum repair option to repair the file.
Detailed information about DBCC CHECKDB is available here: http://www.techrepublic.com/forums/discussions/sql-database-recovery-from-corrupt-database-file/
Restore from backup: If above command fails to fix the error
message the try to restore the database from clean backup.
3rd party tool: Try 3rd party
Recovery Toolbox for SQL Server to recover data from corrupt mdf file. Most of the software have demo version that shows the preview of corrupt SQL server data file.
http://www.sql.recoverytoolbox.com/ -
World best tool for corruption of SQL server database
Many SQL repair tool company available but I am confuse.. please help me to choose best tool to repair and recover MDF files from corrupt and damaged SQL server.
I will suggest you to use SQL Database Recovery Software to solve all types of database file corruption. This software provide simple, fast and effective method to users. Software can recover multiple MDF file. You can run this software in all SQL Server version.
Get more features and download free trial version from - http://www.sqldatabaserecovery.org/
Get more information about software visit - http://www.sqlrepair.org/ -
dear dba's,
i'm using oracle 11gR2 in windows 2003 sever S2.
could anyone tell me
1. what is CANCEL BASED RECOVERY
2. pls give the commands with an explanation
3. In which suituation we must use this type of recovery.
Thanks & Regards,
John Marshal.A+1. what is CANCEL BASED RECOVERY+
It is an incomplete recovery option , at particular time you want to recover yours database for an audit purpose or to avoid any logical error by users in past , but flashback technology now been dominant to cancel based reocovery.
+2. pls give the commands with an explanation+
+3. In which suituation we must use this type of recovery.+
When yours controlfile does not know when so far yours recover could be go on and on by "recover database using backup controlfile until cancel" yours restored controlfile from backup typically does not know how far i need redo if you are doing manual recovery while RMAN does not need cancel based recovery it will keep applying log until it finds and bumped out with an error RMAN-06054: media recovery requesting unknown archived log for ..... .
Situation could be manual recovery in general when you do not define time.scn based recovery using until clause.
Copied from my blog but need to be a bit changes thats why pasting here.
Scenario 1
I lost all data file but my control file is intact at the same location where it was , before lost datafiles i have backed up the data files, controlfile and archive logs.
If you are just restoring the data files and not control files then you may know how much archive log sequence required for yours recovery after the backup taken using archived log repository.
RMAN> backup database;
Starting backup at 02-OCT-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=128 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/his/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/his/sysaux01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/his/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/his/users01.dbf
channel ORA_DISK_1: starting piece 1 at 02-OCT-09
channel ORA_DISK_1: finished piece 1 at 02-OCT-09
piece handle=/u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T112226_5dc712wg_.bkp tag=TAG20091002T112226 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 02-OCT-09
Starting Control File and SPFILE Autobackup at 02-OCT-09
piece handle=/u01/app/oracle/flash_recovery_area/HIS/autobackup/2009_10_02/o1_mf_s_699189791_5dc72j13_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 02-OCT-09
RMAN> sql 'alter system archive log current';
using target database control file instead of recovery catalog
sql statement: alter system archive log current
RMAN> sql 'alter system archive log current';
sql statement: alter system archive log current
RMAN> sql 'alter system archive log current';
sql statement: alter system archive log current
RMAN> exit
Recovery Manager complete.
[oracle@khurram his]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Oct 2 11:24:04 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name,sequence#
2 from v$archived_log
3 where status='A'
4 /
NAME SEQUENCE#
/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_2_699187272.dbf 2
/u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_2_5dc73qw2_.arc 2
/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_3_699187272.dbf 3
/u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_3_5dc73vgm_.arc 3
/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_4_699187272.dbf 4
/u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_4_5dc740d7_.arc 4
6 rows selected.You may know if yours control file intact (not lost or restored from backup), you may know how much recovery will go so far by knowing archived logs repository (conrolfile).From above v$archived_log archveilog repository you are seeing that after backup there are sequence required for the archive logs are 2,3 and 4 for recovering the restored backup which you have taken as above.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@khurram his]$ cd /u01/app/oracle/oradata/his/*.dbf
bash: cd: /u01/app/oracle/oradata/his/sysaux01.dbf: Not a directory
[oracle@khurram his]$ rm -rf /u01/app/oracle/oradata/his/*.dbf
[oracle@khurram his]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Oct 2 11:28:01 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1620115456 bytes
Fixed Size 2144864 bytes
Variable Size 922748320 bytes
Database Buffers 687865856 bytes
Redo Buffers 7356416 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@khurram his]$ rman target /
Recovery Manager: Release 11.1.0.6.0 - Production on Fri Oct 2 11:29:30 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: HIS (DBID=3219691467, not open)
RMAN> restore database;
Starting restore at 02-OCT-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=154 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/his/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/his/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/his/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/his/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T112226_5dc712wg_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T112226_5dc712wg_.bkp tag=TAG20091002T112226
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 02-OCT-09
RMAN> recover database;
Starting recover at 02-OCT-09
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_2_5dc73qw2_.arc
archived log for thread 1 with sequence 3 is already on disk as file /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_3_5dc73vgm_.arc
archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_4_5dc740d7_.arc
archived log file name=/u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_2_5dc73qw2_.arc thread=1 sequence=2
media recovery complete, elapsed time: 00:00:01
Finished recover at 02-OCT-09
as you can see that 2,3,4 were required during recovery process.Scenario 2
I lost all data file as well control file , i have backed up the data files, controlfile and archive logs.
Its like a disastre you lost alls data file and as well controlfile , if you backed the controlfile then remember during controlfile backup it will have file type flag 4 that tells Oracle it is a backup control file. The Stop SCN for alls data file marked to 0xffff.ffffffff (infinity).File type flag in the backup control file tells to oracle that it cannot rely on its redo thread,which means recovering will go on and on , controlfile will not aware how much should i go for redo it will never stop if you are able to supply redo.
It will always ask you more subsequent redo if you already supplied to it during process that's why it let you open the database in reset logs.
Lets see after restoring the controlfile and datafiles , you will see SQL tool recovery mechanism ask you recover database using backup controlfile which shows that controlfile does not know where to end the applying redo chain.
Here an excerpt which shows that restored controlfile does not know till how long the redo should be applied, its the RMAN robustness which does not ask you manually to supply redo, RMAN search the alls redo from archivelogs and if possible you have redo within redo logs.But if you are not with RMAN i.e recovering by SQL then you have to cancel recovery at some end.
RMAN> shutdown abort
Oracle instance shut down
RMAN> exit
Recovery Manager complete.
[oracle@khurram ~]$ rm -rf /u01/app/oracle/oradata/his/*
[oracle@khurram ~]$ rman target /
Recovery Manager: Release 11.1.0.6.0 - Production on Fri Oct 2 09:32:37 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
Oracle instance started
Total System Global Area 1620115456 bytes
Fixed Size 2144864 bytes
Variable Size 922748320 bytes
Database Buffers 687865856 bytes
Redo Buffers 7356416 bytes
RMAN> restore controlfile from autobackup;
Starting restore at 02-OCT-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=153 device type=DISK
recovery area destination: /u01/app/oracle/flash_recovery_area
database name (or database unique name) used for search: HIS
channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/flash_recovery_area/HIS/autobackup/2009_10_02/o1_mf_s_699182899_5dc0c49t_.bkp found in the recovery area
AUTOBACKUP search with format "%F" not attempted because DBID was not set
channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/flash_recovery_area/HIS/autobackup/2009_10_02/o1_mf_s_699182899_5dc0c49t_.bkp
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=/u01/app/oracle/oradata/his/control01.ctl
output file name=/u01/app/oracle/oradata/his/control02.ctl
output file name=/u01/app/oracle/oradata/his/control03.ctl
Finished restore at 02-OCT-09
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 02-OCT-09
Starting implicit crosscheck backup at 02-OCT-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=153 device type=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 02-OCT-09
Starting implicit crosscheck copy at 02-OCT-09
using channel ORA_DISK_1
Finished implicit crosscheck copy at 02-OCT-09
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle/flash_recovery_area/HIS/autobackup/2009_10_02/o1_mf_s_699182899_5dc0c49t_.bkp
File Name: /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_5_5dc0d1m8_.arc
File Name: /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_3_5dc0cx6p_.arc
File Name: /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_4_5dc0czx3_.arc
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/his/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/his/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/his/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/his/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T092724_5dc09dlc_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T092724_5dc09dlc_.bkp tag=TAG20091002T092724
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 02-OCT-09
[oracle@khurram ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Oct 2 09:34:51 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> recover database using backup contorlfile until cancel
Keep applying log as you can and you have and cancel at an end when alls logs are supplied to recovery process. -
Error: is not a primary database file.
Hello
If I try to set a database online with:
ALTER DATABASE mydb SET online
this error occurs:
Msg 5171, Level 16, State 1, Line 1
E:\Data\mydb_log.ldf is not a primary database file.
Msg 5171, Level 16, State 2, Line 1
E:\Data\mydb.mdf is not a primary database file.
File activation failure. The physical file name "E:\Data\mydb.mdf" may be incorrect.
Msg 945, Level 14, State 2, Line 1
Database 'mydb' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
The path of ldf and mdf file is correct.
And if I delete the database "DROP DATABASE mydb" and attach the files, then it works..
Thanks for your helpCause
This problem generally occurs if the MDF file of your SQL Server has got damaged. the problem could be due to file header corruption or wrong information in file header.
All such situations lead to the inaccessibility of MDF file and need to repair and restore the database. It is very important to work around this problem, as it may put your business at risk of destruction.
The MDF repair is possible with the help of third party applications known as SQL recovery software. These software are helpful in each and every case of MDF corruption and thus allow you to have perfect MDF recovery.
To perform SQL repair using these software, it is not necessary for the user to have sound technical knowledge as MDF repair software come with interactive user interface. SQL recovery software do systematic scan of corrupted MDF files, repair and restore them in original format.
Stellar Phoenix SQL Database Recovery is the most advanced and the most influential SQL recovery software which allows you to have effective and successful MDF recovery in all cases of corruption. This SQL repair software comes equipped with an interactive, simple and cool looking user interface.
This MDF repair software is powerful enough to carry out systematic scan of entire MDF file and extract all of the data from it. This SQL repair software can restore all of the MDF objects including tables, reports, forms, macros, database constraints, stored procedures, triggers etc.
Cheers, Sridhar -------------- Please Mark it as Answer if it helps u so that it will be useful to other forum guys -
What is correct method to deploy cluster aware technology using HA VMs?
Dear all,
I recently had experience creating Hyper-V Server 2012 cluster. This allows for deploying a highly available virtual machine. That's fine. The business machine (virtual machine) becomes highly available. This includes an existing VM enabled to be highly
available or a new VM installed into cluster from scratch.
On the other hand; we have cluster aware applications (SQL Server, SCVMM etc.) which are installed in clustered OS (Windows 2008 R2 Enterprise edition which has failover clustering service) .
Just for clearing concept; what is correct way of deploying a cluster aware technology (SQL Server, SCVMM) in the scenario where the underlying OS; running in VM(s) can be made highly available.
Method 1:
Create simple non clustered VM, install cluster aware application (SQL Server e.g.). Make this VM highly available using Hyper-V cluster. (This seems to be clustering the VM running cluster aware application, not the cluster ware application; which
requires clustering.)
Method 2:
Create HA-enabled VM onto Hyper-V Servers cluster; install cluster aware application within this HA-enabled VM. (This again; the underlying OS/VM is clustered first, the cluster aware application (SQL server or others) how would it leverage
the cluster?)
Please shed light on what is correct method. In both cases it seems the VM running the cluster aware application; is made highly available; meaning leveraging clustering. What about clustering the application
itself? The objective is to be able to not only make the VM highly available; but also deploy clustered SQL Server or other cluster aware technology using such HA VM.
Regards,
Shahzad.Dear all,
I recently had experience creating Hyper-V Server 2012 cluster. This allows for deploying a highly available virtual machine. That's fine. The business machine (virtual machine) becomes highly available. This includes an existing VM enabled to be highly
available or a new VM installed into cluster from scratch.
On the other hand; we have cluster aware applications (SQL Server, SCVMM etc.) which are installed in clustered OS (Windows 2008 R2 Enterprise edition which has failover clustering service) .
Just for clearing concept; what is correct way of deploying a cluster aware technology (SQL Server, SCVMM) in the scenario where the underlying OS; running in VM(s) can be made highly available.
Method 1:
Create simple non clustered VM, install cluster aware application (SQL Server e.g.). Make this VM highly available using Hyper-V cluster. (This seems to be clustering the VM running cluster aware application, not the cluster ware application; which
requires clustering.)
Method 2:
Create HA-enabled VM onto Hyper-V Servers cluster; install cluster aware application within this HA-enabled VM. (This again; the underlying OS/VM is clustered first, the cluster aware application (SQL server or others) how would it leverage
the cluster?)
Please shed light on what is correct method. In both cases it seems the VM running the cluster aware application; is made highly available; meaning leveraging clustering. What about clustering the application
itself? The objective is to be able to not only make the VM highly available; but also deploy clustered SQL Server or other cluster aware technology using such HA VM.
Regards,
Shahzad.
With SQL Server both M1 and M2 are by far the best solutions. See guest VM cluster is non-optimal as SQL Server works better with own clustering features (AlwaysOn, see link below). And HA would make VM re-boot on another physical host so there would be
both downtime and potential data loss. Run SQL Server in a pair of VMs on a different physical hosts, configue AlwaysOn (use failover SMB share as a witness) and you'll be fine. See:
Overview of AlwaysOn Availability Groups (SQL Server)
http://technet.microsoft.com/en-us/library/ff877884.aspx
How to Build SQL Server
2012 AlwaysOn Hyper-V Virtual Machines
http://social.technet.microsoft.com/wiki/contents/articles/6198.how-to-build-sql-server-2012-alwayson-hyper-v-virtual-machines-for-demos-emu-build.aspx
SQL Server 2012 AlwaysOn High Availability and Disaster Recovery Design Patterns
http://blogs.msdn.com/b/sqlcat/archive/2013/11/20/sql-server-2012-alwayson-high-availability-and-disaster-recovery-design-patterns.aspx
Also the best place to ask about SQL Server High Availability is dedicated MSFT group here:
SQL Disaster Recovery Forum
http://social.technet.microsoft.com/Forums/sqlserver/en-US/home?forum=sqldisasterrecoveryHope
this helped :)
StarWind VSAN [Virtual SAN] clusters Hyper-V without SAS, Fibre Channel, SMB 3.0 or iSCSI, uses Ethernet to mirror internally mounted SATA disks between hosts. -
Cloning of database to same host give error, unable to re-create online log
clone the database to same host
oracle version: 9.2.0.5
os HP
target db: tardb
catlog catlog
auxiliary: auxbr
After running this script, I am getting error unable to re-create online log.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/08/2009 23:17:38
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-00344: unable to re-create online log '/db/app/oracle/product/9.2.0.5/dbs/ /db
/redolog.001/catalog1/catalog1_log1.rdo'
ORA-27040: skgfrcre: create error, unable to create file
HP-UX Error: 2: No such file or directory
I tried to shutdown, and mount, recover with backup contorlfile until cancel. and open with reset logs ,
I am not able to make the copy of the database on same host.
Help is appreciated.
complete error log
oracle@dimondz{auxbr}/db/app/oracle/dba/sql> sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.5.0 - Production on Mon Jun 8 23:11:23 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile='/db/app/oracle/admin/catlog/pfile/initauxbr.ora';
ORACLE instance started.
Total System Global Area 219115512 bytes
Fixed Size 737272 bytes
Variable Size 83886080 bytes
Database Buffers 134217728 bytes
Redo Buffers 274432 bytes
SQL> create spfile from pfile='/db/app/oracle/admin/catlog/pfile/initauxbr.ora';
File created.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.5.0 - Production
oracle@dimondz{auxbr}/db/app/oracle/dba/sql>
oracle@dimondz{auxbr}/db/app/oracle/dba/sql> rman
Recovery Manager: Release 9.2.0.5.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
RMAN> connect catalog rman/rman@catlog
connected to recovery catalog database
RMAN> connect target sys/dimondz@tardb
connected to target database: tardb (DBID=3063303886)
RMAN> connect auxiliary sys/dimondz@auxbr
connected to auxiliary database: auxbr (not mounted)
RMAN>
RMAN> RUN
2> {
3> SET NEWNAME FOR DATAFILE 1 TO '/db/catalog1.001/oradata/system01.dbf';
4>
5> SET NEWNAME FOR DATAFILE 2 TO '/db/catalog1.001/oradata/undotbs01.dbf';
6>
SET NEWNAME FOR DATAFILE 3 TO '/db/catalog1.001/oradata/ptest01.dbf';
7> 8>
9> SET NEWNAME FOR DATAFILE 4 TO '/db/catalog1.001/oradata/users_01.dbf';
10>
11> SET NEWNAME FOR DATAFILE 5 TO '/db/catalog1.001/oradata/drsys_01.dbf';
12>
13> SET NEWNAME FOR DATAFILE 6 TO '/db/catalog1.001/oradata/qms_dat_01.dbf';
14>
15> SET NEWNAME FOR DATAFILE 7 TO '/db/catalog1.001/oradata/ultradat_01.dbf';
16>
17> SET NEWNAME FOR DATAFILE 11 TO '/db/catalog1.001/oradata/xmltbs_01.dbf';
18>
19> DUPLICATE TARGET DATABASE TO auxbr
20>
21> pfile=/db/app/oracle/admin/catlog/pfile/initauxbr.ora
22> logfile
23> ' /db/redolog.001/catalog1/catalog1_log1.rdo' size 5m,
24> ' /db/redolog.003/catalog1/catalog1_log2.rdo' size 5m,
25> ' /db/redolog.002/catalog1/catalog1_log3.rdo' size 5m;
26> }
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 08-JUN-09
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=11 devtype=DISK
printing stored script: Memory Script
set until scn 229907626;
set newname for datafile 1 to
"/db/catalog1.001/oradata/system01.dbf";
set newname for datafile 2 to
"/db/catalog1.001/oradata/undotbs01.dbf";
set newname for datafile 3 to
"/db/catalog1.001/oradata/ptest01.dbf";
set newname for datafile 4 to
"/db/catalog1.001/oradata/users_01.dbf";
set newname for datafile 5 to
"/db/catalog1.001/oradata/drsys_01.dbf";
set newname for datafile 6 to
"/db/catalog1.001/oradata/qms_dat_01.dbf";
set newname for datafile 7 to
"/db/catalog1.001/oradata/ultradat_01.dbf";
set newname for datafile 11 to
"/db/catalog1.001/oradata/xmltbs_01.dbf";
restore
check readonly
clone database
executing script: 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
Starting restore at 08-JUN-09
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 /db/catalog1.001/oradata/system01.dbf
restoring datafile 00002 to /db/catalog1.001/oradata/undotbs01.dbf
restoring datafile 00003 to /db/catalog1.001/oradata/ptest01.dbf
restoring datafile 00004 to /db/catalog1.001/oradata/users_01.dbf
restoring datafile 00005 to /db/catalog1.001/oradata/drsys_01.dbf
restoring datafile 00006 to /db/catalog1.001/oradata/qms_dat_01.dbf
restoring datafile 00007 to /db/catalog1.001/oradata/ultradat_01.dbf
restoring datafile 00011 to /db/catalog1.001/oradata/xmltbs_01.dbf
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/dump/DBA/RMAN/tardb_bkup/db_tardb_f_04kgt77h tag=WHOLE_DATABASE_tardb params=NULL
channel ORA_AUX_DISK_1: restore complete
Finished restore at 08-JUN-09
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "auxbr" RESETLOGS ARCHIVELOG
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 907
LOGFILE
GROUP 1 ' /db/redolog.001/catalog1/catalog1_log1.rdo' SIZE 5242880 ,
GROUP 2 ' /db/redolog.003/catalog1/catalog1_log2.rdo' SIZE 5242880 ,
GROUP 3 ' /db/redolog.002/catalog1/catalog1_log3.rdo' SIZE 5242880
DATAFILE
'/db/catalog1.001/oradata/system01.dbf'
CHARACTER SET UTF8
printing stored script: Memory Script
switch clone datafile all;
executing script: Memory Script
datafile 2 switched to datafile copy
input datafilecopy recid=1 stamp=689037446 filename=/db/catalog1.001/oradata/undotbs01.dbf
datafile 3 switched to datafile copy
input datafilecopy recid=2 stamp=689037446 filename=/db/catalog1.001/oradata/ptest01.dbf
datafile 4 switched to datafile copy
input datafilecopy recid=3 stamp=689037446 filename=/db/catalog1.001/oradata/users_01.dbf
datafile 5 switched to datafile copy
input datafilecopy recid=4 stamp=689037446 filename=/db/catalog1.001/oradata/drsys_01.dbf
datafile 6 switched to datafile copy
input datafilecopy recid=5 stamp=689037446 filename=/db/catalog1.001/oradata/qms_dat_01.dbf
datafile 7 switched to datafile copy
input datafilecopy recid=6 stamp=689037446 filename=/db/catalog1.001/oradata/ultradat_01.dbf
datafile 11 switched to datafile copy
input datafilecopy recid=7 stamp=689037446 filename=/db/catalog1.001/oradata/xmltbs_01.dbf
printing stored script: Memory Script
set until scn 229907626;
recover
clone database
delete archivelog
executing script: Memory Script
executing command: SET until clause
Starting recover at 08-JUN-09
using channel ORA_AUX_DISK_1
starting media recovery
channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=3
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=4
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/dump/DBA/RMAN/tardb_bkup/db_arch_tardb_f_06kgt7ih tag=ARCHIVE_LOG_tardb_BACKUP params=NULL
channel ORA_AUX_DISK_1: restore complete
archive log filename=/oradump/oradata/catlog/arch/catlog-1231663410_1_3.arc thread=1 sequence=3
channel clone_default: deleting archive log(s)
archive log filename=/oradump/oradata/catlog/arch/catlog-1231663410_1_3.arc recid=1 stamp=689037447
archive log filename=/oradump/oradata/catlog/arch/catlog-1231663410_1_4.arc thread=1 sequence=4
channel clone_default: deleting archive log(s)
archive log filename=/oradump/oradata/catlog/arch/catlog-1231663410_1_4.arc recid=2 stamp=689037447
media recovery complete
Finished recover at 08-JUN-09
printing stored script: Memory Script
shutdown clone;
startup clone nomount pfile= '/db/app/oracle/admin/catlog/pfile/initauxbr.ora';
executing script: Memory Script
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 219115512 bytes
Fixed Size 737272 bytes
Variable Size 83886080 bytes
Database Buffers 134217728 bytes
Redo Buffers 274432 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "auxbr" RESETLOGS ARCHIVELOG
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 907
LOGFILE
GROUP 1 ' /db/redolog.001/catalog1/catalog1_log1.rdo' SIZE 5242880 ,
GROUP 2 ' /db/redolog.003/catalog1/catalog1_log2.rdo' SIZE 5242880 ,
GROUP 3 ' /db/redolog.002/catalog1/catalog1_log3.rdo' SIZE 5242880
DATAFILE
'/db/catalog1.001/oradata/system01.dbf'
CHARACTER SET UTF8
printing stored script: Memory Script
catalog clone datafilecopy "/db/catalog1.001/oradata/undotbs01.dbf";
catalog clone datafilecopy "/db/catalog1.001/oradata/ptest01.dbf";
catalog clone datafilecopy "/db/catalog1.001/oradata/users_01.dbf";
catalog clone datafilecopy "/db/catalog1.001/oradata/drsys_01.dbf";
catalog clone datafilecopy "/db/catalog1.001/oradata/qms_dat_01.dbf";
catalog clone datafilecopy "/db/catalog1.001/oradata/ultradat_01.dbf";
catalog clone datafilecopy "/db/catalog1.001/oradata/xmltbs_01.dbf";
switch clone datafile all;
executing script: Memory Script
cataloged datafile copy
datafile copy filename=/db/catalog1.001/oradata/undotbs01.dbf recid=1 stamp=689037456
cataloged datafile copy
datafile copy filename=/db/catalog1.001/oradata/ptest01.dbf recid=2 stamp=689037456
cataloged datafile copy
datafile copy filename=/db/catalog1.001/oradata/users_01.dbf recid=3 stamp=689037456
cataloged datafile copy
datafile copy filename=/db/catalog1.001/oradata/drsys_01.dbf recid=4 stamp=689037457
cataloged datafile copy
datafile copy filename=/db/catalog1.001/oradata/qms_dat_01.dbf recid=5 stamp=689037457
cataloged datafile copy
datafile copy filename=/db/catalog1.001/oradata/ultradat_01.dbf recid=6 stamp=689037457
cataloged datafile copy
datafile copy filename=/db/catalog1.001/oradata/xmltbs_01.dbf recid=7 stamp=689037457
datafile 2 switched to datafile copy
input datafilecopy recid=1 stamp=689037456 filename=/db/catalog1.001/oradata/undotbs01.dbf
datafile 3 switched to datafile copy
input datafilecopy recid=2 stamp=689037456 filename=/db/catalog1.001/oradata/ptest01.dbf
datafile 4 switched to datafile copy
input datafilecopy recid=3 stamp=689037456 filename=/db/catalog1.001/oradata/users_01.dbf
datafile 5 switched to datafile copy
input datafilecopy recid=4 stamp=689037457 filename=/db/catalog1.001/oradata/drsys_01.dbf
datafile 6 switched to datafile copy
input datafilecopy recid=5 stamp=689037457 filename=/db/catalog1.001/oradata/qms_dat_01.dbf
datafile 7 switched to datafile copy
input datafilecopy recid=6 stamp=689037457 filename=/db/catalog1.001/oradata/ultradat_01.dbf
datafile 11 switched to datafile copy
input datafilecopy recid=7 stamp=689037457 filename=/db/catalog1.001/oradata/xmltbs_01.dbf
printing stored script: Memory Script
Alter clone database open resetlogs;
executing script: Memory Script
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/08/2009 23:17:38
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-00344: unable to re-create online log '/db/app/oracle/product/9.2.0.5/dbs/ /db
/redolog.001/catalog1/catalog1_log1.rdo'
ORA-27040: skgfrcre: create error, unable to create file
HP-UX Error: 2: No such file or directory
RMAN>
I tried to shutdown and open with resetlogs , it still error
oracle@dimondz{auxbr}/db/app/oracle/dba/sql> sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.5.0 - Production on Mon Jun 8 23:27:05 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.5.0 - Production
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 219115512 bytes
Fixed Size 737272 bytes
Variable Size 83886080 bytes
Database Buffers 134217728 bytes
Redo Buffers 274432 bytes
Database mounted.
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 229907626 generated at 06/06/2009 11:58:09 needed for thread
1
ORA-00289: suggestion : /oradump/oradata/catlog/arch/catlog-1814470384_1_5.arc
ORA-00280: change 229907626 for thread 1 is in sequence #5
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SQL> alter database open resetlogs;
alter database open resetlogs
ERROR at line 1:
ORA-00344: unable to re-create online log '/db/app/oracle/product/9.2.0.5/dbs/
/db/redolog.001/catalog1/catalog1_log1.rdo'
ORA-27040: skgfrcre: create error, unable to create file
HP-UX Error: 2: No such file or directory
SQL>
Thanks, Your help and guide will appreciated very much.Hello,
The directory for the creation of the logfiles does not exist, from the error:
RMAN-06136: ORACLE error from auxiliary database: ORA-00344: unable to re-create online log '/db/app/oracle/product/9.2.0.5/dbs/ /db
/redolog.001/catalog1/catalog1_log1.rdo'
ORA-27040: skgfrcre: create error, unable to create file
HP-UX Error: 2: No such file or directoryI.e., there is no such directory as *'/db/app/oracle/product/9.2.0.5/dbs/ /db/redolog.001/catalog1/catalog1_log1.rdo'*
Your db_recovery_file_dest parameter may be set here, therefore change this:
'/db/redolog.001/catalog1/catalog1_log1.rdo' size 5m,
' /db/redolog.003/catalog1/catalog1_log2.rdo' size 5m,
' /db/redolog.002/catalog1/catalog1_log3.rdo' size 5m;To this:
'catalog1_log1.rdo' size 5m,
'catalog1_log2.rdo' size 5m,
'catalog1_log3.rdo' size 5m;And try again. -
How to repair corrupt sharepoint server (mdf) files
SharePoint server has become a very popular enterprise application to enhanced collaboration. As the quantity and value of data stored on SharePoint platform rises, backup and recovery becomes critical and it proves to be a challenge for administrators.There
can any reason of corruption of your SharePoint Server database and MDF files include drive failures, accidental file deletion on WSS websites, Server downtime, saved backup turned back, etc.
If you come across SharePoint damage, then disaster recovery of SharePoint is important to execute. Third-party database recovery application for SharePoint is the best alternate solutions to be used for dealing with corrupted SharePoint database.
If only you need to repair your corrupted SharePoint database due to drive failures, accidental file deletion on WSS websites, drive failures, server downtime, saved backup turned bad, and any other etc.This also allows you to recover the MDF files in offline
mode. If you are searching for the recovery software like this, you are at the right spot.
From here, you may get the Free Trail Version Demo to check the features and to see the recovery process.
Visit:- http://www.filesrecoverytool.com/sharepoint-database-repair.htmlMS SQL Database Recovery software is an advanced solution to fix extremely corrupted MDF files of MS SQL Server. It effectively recovers maximum possible data from corrupted MDF files which are originally created in SQL Server 2000, 2005 and 2008 and higher
versions.
In case, MDF database has gone corrupt, damaged due to occurrence of this error, you can repair SQL database easily and productively using SQL Database recovery software to repair all items of corrupt MDF file.To know more about the software visit :-
Repair MDF File of SQL Server
Thanks
Regards -
If the offline tablespace will be backuped when I issue the BACKUP DATABASE
will the offline tablespace be backuped if I issue the BACKUP DATABASE command?------No.148
Message was edited by:
frank.qianSimple answer is yes. Use the SKIP OFFLINE to skip offline tablespaces.
sys@ORCL> create tablespace test datafile 'c:\oracle\product\10.2.0\oradata\orcl\test01.dbf' size 100m autoextend on
2 extent management local uniform size 1m;
Tablespace created.
Elapsed: 00:00:06.96
sys@ORCL> alter tablespace test offline;
Tablespace altered.
Elapsed: 00:00:02.54
sys@ORCL> select tablespace_name, status from dba_tablespaces;
TABLESPACE_NAME STATUS
SYSTEM ONLINE
UNDOTBS1 ONLINE
SYSAUX ONLINE
TEMP ONLINE
USERS ONLINE
EXAMPLE ONLINE
TEST OFFLINE
7 rows selected.
Elapsed: 00:00:00.01
sys@ORCL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
c:\sql>rman
Recovery Manager: Release 10.2.0.2.0 - Production on Mon Jan 15 11:40:06 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN> connect target /
connected to target database: ORCL (DBID=1133000557)
RMAN> backup database;
Starting backup at 15-JAN-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=159 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
input datafile fno=00002 name=C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
input datafile fno=00003 name=C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
input datafile fno=00005 name=C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
input datafile fno=00006 name=C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEST01.DBF
input datafile fno=00004 name=C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 15-JAN-07
channel ORA_DISK_1: finished piece 1 at 15-JAN-07
piece handle=C:\ORACLE\PRODUCT\10.2.0\ORADATA\BACKUP\0AI7IGP2_1_1 tag=TAG20070115T114018 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
Finished backup at 15-JAN-07
Starting Control File and SPFILE Autobackup at 15-JAN-07
piece handle=C:\ORACLE\PRODUCT\10.2.0\ORADATA\BACKUP\C-1133000557-20070115-02 comment=NONE
Finished Control File and SPFILE Autobackup at 15-JAN-07
RMAN> -
Creating RMAN catalog. Are these steps correct?
Are these steps to set up the RMAN catalog correct?
I.
The following two databases are the target databases which needs to be backed up.
1. a 11.1.0.7.0 database
2. a 10.2.0.1.0 databaseII.
Catalog schema in a 10.2.0.4.0 database called catdb.
III.
I am going to use the RMAN client(10.2.0.1.0) in my laptop (Windows Server 2003).
CATALOG schema creation
=======================
To create the Catalog Database (10.2.0.4.0), this what i am going to do in catdb
a. create tablespace CAT_TBS
b. CREATE USER rman_cat_schema
IDENTIFIED BY rman_cat_schema
DEFAULT TABLESPACE cat_tbs
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON cat_tbs;
c. GRANT create session TO rman_cat_schema;
d. GRANT recovery_catalog_owner TO rman_cat_schema;
e. GRANT execute ON dbms_stats TO rman_cat_schema;
f. Invoke the <font color="red"><b>RMAN binary from my laptop</b></font> :
C:\>set ORACLE_SID=catdb
C:\>rman catalog rman_cat_schema/rman_cat_schema@catdb log=catalog.log
Hopefully Catalog will get the created at catdb .
Registering the database
=========================
To register the database,this is what i am going to do.
a. Add the Tns Entry about the catdb in tnsnames.ora file of the target database
b. Log in to target database's machine and invoke the<font color="red"><b> RMAN executable in the target database. </b></font>
$ export ORACLE_SID=oraprod314
$ rman TARGET / CATALOG rman_cat_schema/rman_cat_schema@catdb
c. Then i can give the REGISTER DATABASE command. like
$rman > register database;
Edited by: Citizen_2 on 14-Sep-2009 11:46Yes, You can connect to RMAN catalog using a lower version client. see this.
SQL> conn rman/rman@mycatdb
Connected.
SQL> select * from rcver;
VERSION
11.01.00.06
SQL>
rman
Recovery Manager: Release 9.2.0.7.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
RMAN> connect target /
connected to target database: STSTDB (DBID=2045697105)
RMAN> connect catalog rman/rman@abcd.
connected to recovery catalog database
RMAN>
You can take the backups and do recoveries. But, if you want to achieve certain features of the recovery catalog of higher versions to backup / recover your database, you better use the right RMAN client which allows the features to use.
It is always advisable to use the RMAN Client same as the database version you want to backup to avoid any confusions.
Hope it is helpul.
Regards
Edited by: vasu77 on Sep 15, 2009 10:01 AM
Edited by: vasu77 on Sep 15, 2009 2:11 PM
Maybe you are looking for
-
Demo - SAP Strategy Management (SSM)
Hey All, I`m in need a demo related with SAP Strategy Management that shows all the aplication, like core concepts and features. Can someone help me to get this? Best Regards, Bruno Heissler
-
Ultrabeat weirdness - can you replicate this? urgent advice needed
I am using the kick drum from the default patch in one of my tracks - the weird think is that when i look at the master output channel the right level is hitting about 4 db higher than the left.... is anyone else able to replicate this or better stil
-
there are so many bad stuff like crashing and the maps and some other things.
-
If we create more indexes in what way it decreases performance ??
If we create more indexes in what way it decreases performance
-
Hi Gurus, i have requirement of displaying popup while saving MIGO. i have tried by implementing the user exit MB_CF001. but it gives a dump saying POSTING_ILLEGAL_STATEMENT can anyone guide me how to implement this? points will be rewarded.