Operating System - HP-UX
1748003 Members
4468 Online
108757 Solutions
New Discussion юеВ

Re: Reduced oracle datafile sizes after remote restoration with sapdba

 
Ashraf_1
Frequent Advisor

Reduced oracle datafile sizes after remote restoration with sapdba

Hi Experts,

When i remotely restored my database files into a new system using sapdba tools i noticed that all restored file sizes was less than the actual.

for example,
/oracle/YP1/sapdata1/system_1/system.data1 had a size 157286400 Bytes it became 12293120 Bytes.
/oracle/YP1/sapdata6/es30fd_1/es30fd.data1 had a size 2013265920 Bytes it became 157291520 Bytes

For your information the source backup was done locally while the restoration was remotely.

Anybody knows how to resolve this,

With best regards,
Ashraf
ASHRAFM
8 REPLIES 8
Graham Cameron_1
Honored Contributor

Re: Reduced oracle datafile sizes after remote restoration with sapdba

Don't use sap and don't know sapdba, but you may not have a problem.

The sapdba tool may have simply reclaimed unused space during the restore.

I would question the sap supplier or check your documentation.

But if the restored system behaves as expected then I think you're ok.

If you're really paranoid then you can query the data dictionary to see that the objects in the restored file are what they should be.

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Hoefnix
Honored Contributor

Re: Reduced oracle datafile sizes after remote restoration with sapdba

I do not know the SAP-tools, but if you dump an oracle database and restore it in a new created database you can have smaller table spaces(and files) because on filesystem level you clame space for the database at once, but the database is not using all the space really at once.

If the SAPtools did not gave errors I would not be very paranoid.
Brian Crabtree
Honored Contributor

Re: Reduced oracle datafile sizes after remote restoration with sapdba

Ashraf,

I would recommend performing an "alter database datafile resize ;" where size is the size you want plus 1m more. Oracle shouldn't start if there is a problem, however this should verify that the files are correct, and should reclaim the space from the OS before it is written to or allocated.

Thanks,

Brian
Ashraf_1
Frequent Advisor

Re: Reduced oracle datafile sizes after remote restoration with sapdba

Thanks all,

Actually Oracle didn't start because of this and it gave the following error:
ORA-00201: control file version 7.3.3.0.0 incompatible with ORACLE version 7.0.1.2.0.0
ORA-00202: control file: '/oracle/YP1/sapdata1/cntrl/cntrlYP1.dbf'

Even though that control file as well as all restored file sizes was different.

For you infromation sapdba tool is using dd command to backup the datafile.

Does any body suspect that dd had performed file size conversion during restore.

Appreciate your assistance,

Regards,
Ashraf
ASHRAFM
Volker Borowski
Honored Contributor

Re: Reduced oracle datafile sizes after remote restoration with sapdba

Hi Ashraf,

most likely, you have a version missmatch.
Looks like your Source System runs Oracle 7.3.3 and the system where you restored has Oracle 7.0 installed.

Now this suspects, that the SAP version does not match as well, in this case esp. the brrestore has to match the version of brbackup. In addition, the parameters of the backup/restore parameter file initYP1.sap have to match, otherwise you can get strange rearangements upon restore.

Tape format of a brbackup tape is
.tape.hdr0 -> cpio file (-> Blocksize from initYP1.sap)
Set of Parameter files -> cpio-fileset

datafile1 -> dd/cpio, depending on initYP1.sap
...

all datafiles as seperate set

logfiles -> cpio format

Now dd does not store the filenames to the tape, instead you need to have the logfile of the correct (!) backup belonging to the tape.

So your problem is either
a) you have an old logfile that you use for your restore-> thus the files simply get mixed up. Solution: restore the logs from the tapes first.

b) block-param mismatch in initYP1.sap with incompatible versions in addition (I think in older versions, initSID.sap and initSID.ora where saved as seperate filesets at the beginning of the tape). -> thus to a mismatch of the filesets at the beginning of the tape, your restored files are restored to the wrong filename.

Lastly:
- SAP 3.0F
- Oracle 7.0
- Oracle 7.3.3
are beyond support for quite a while now.

Hope this helps
Volker
Ashraf_1
Frequent Advisor

Re: Reduced oracle datafile sizes after remote restoration with sapdba

Thanks All,

Volker:
The source system that i backed the information from had the following:
Operating system: hp-ux 10.20.
Database was oracle 7.3.4.3.0
Sap System: 3.0f
Sap kernel: 3.1i
The target system that i restored the database to has the following:
Operating system: hp-ux 11.0 (64-bit).
Database was oracle 7.3.4.1.0
Sap System: 3.0f
Sap kernel: 3.1i

However, the backup was done locally from the source machine while the restoration was remotely to the new machine.

All i done was installing sap 3.0f into the target machine with default configuration and tablesapces. Then i restored data through sapdba.

So There are no version mismatch either in SAP or oracle.

Do i need to alter tablespaces to match the source existing tablespaces before restoring the data.

Appreciate your time,

Regards,
Ashraf
ASHRAFM
Volker Borowski
Honored Contributor

Re: Reduced oracle datafile sizes after remote restoration with sapdba

Hi Ashraf,

in this case (asuming you used brbackup target "disk_copy") it is most likely, that you have diffret locations of the controlfiles on both machines.
(May be you can describe a little bit more detailed, what exactly you did do)

While on source they might reside in
/oracle/YP1/origlogA/cntrl
/oracle/YP1/saparch/cntrl
/oracle/YP1/sapdata1/cntrl
--> which is a proper setup

They might be located on target
/oracle/YP1/sapdata1/cntrl
/oracle/YP1/sapdata2/cntrl
/oracle/YP1/sapdata3/cntrl
-- and have diffrent names as well.

Check this in the initYP1.ora file parameter
CONTROL_FILES=(...)
on both machines.

Since your message is complaining that a version 7.0 controlfile is found, something has to be wrong.

Other question: I never knew that 7.3 was supported to run on 64-bit. Are you sure this system has ever been operatable before ?
Or did you just do an OS-Upgrade to 64-bit ?

So beside the point of a may be neccessary 64-bit migration of the database, you will need to run catalog.sql and catproc.sql after you are able to open the database to downgrade to your taget release 7.3.4.1.

Good Luck
Volker
Ashraf_1
Frequent Advisor

Re: Reduced oracle datafile sizes after remote restoration with sapdba

Thanks All,

i copied all datafiles using fbackup and it is working fine. Then, I upgraded my sapdba program to the latest version.

Regards,
Ashraf
ASHRAFM