Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Oracle standby database

Go to solution
Tilak Gamalath
Occasional Contributor

Oracle standby database

I want to create a standby database of the primary database. My problem is that the primary database uses raw volumes. (uncooked). I want the standby database to be on UFS. Have someone done this? Please help.
Ian Dennison_1
Honored Contributor

Re: Oracle standby database


The more differences between a production and standby system, the more chance there is for problems.

Unless raw volumes is unsupported or unworkable on the standby server, I would stick to the same standard as the production server.

Share and Enjoy! Ian
Building a dumber user
Tilak Gamalath
Occasional Contributor

Re: Oracle standby database

Thanks Ian,

is it still a possibility? If so, how do you do that? How do you convert datafiles from raw to ufs for the standby database.

Honored Contributor

Re: Oracle standby database


It is possible to move from raw volumes to filesystems by using "dd" command.

You can do this by just copying the number of oracle blocks(oracle block used by raw device datafile).
The count parameter will take care of actual size of datafile.

These are the following steps to move from raw volumes to filesystems :

STEP-1 :
What is the value of "db_block_size".
show parameter db_block_size
output like:
------------------------------------ ------- ------------------
db_block_size integer 8192

STEP-2 :
Find out how many oracle block used by raw device datafile.
select name,blocks from v$datafile;

Output like:
---------------------------------------------------- ----------
/dev/rVc1.jv.816sys1 30592

Note: The oracle datafilesize always = Number of oracle blocks + 1 File Header Block
The size of file header block is same as oracle block size.

So, Your new filesystem datafile size should be like below:
/dev/rVc1.jv.816sys1 = 30592 +1 = 30593 Blocks =30593*8K in KB as the block size is 8K.

Now you are in a position to configure your dd command to copy the exact portion of the raw device to filesystem datafile.
So you know how many bytes you have to copy. Lets build the dd command.

"bs"=BlockSize - Specifies both the input and output block size, superceding the ibs and obs flags. The block size values specified with
the bs flag must always be a multiple of the physical block size for the media being used. We have to choose the value of "bs"
like 1K or 2K or 4K .

"skip"=SkipInputBlocks - Skips the specified SkipInputBlocks value of input blocks before starting to copy.
So if we choose "bs"=4k, we have to choose "skip"=1 or for "bs"=2k, we have to choose "skip"=2.

"count" is for how many blocks ("bs") we should copy. Our case total number of oracle block need to be copied is 30593, which is of 8K.
So as the value of "bs" is 4k , count should be =30593*2=61186 or if the value of "bs" is 2k , count should be =30593*4=122372.

So the command should be like below:
dd if=< input raw device > bs= skip= count= of=
dd if=/dev/rVc1.jv.816sys1 bs=4096 skip=1 count=61186 of=/oracle/datafile/system.dbf

Hope this helps!

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Massimo Bianchi
Honored Contributor

Re: Oracle standby database

as stated, it's best if you adere to your production layout.

If you want to change from raw to fs, you can use rman.

When doing the restore, you specify different name for the datafiles, and rman takes care of skipping the right number of bytes.
You can check on Metalink or in rman manuals.